hMailServer.Administrator.Dialogs.formRuleCriteria.RunTest C# (CSharp) Method

RunTest() private method

private RunTest ( ) : void
return void
        private void RunTest()
        {
            if (comboSearchType.SelectedValue == null)
            {
                labelTestResult.Text = "";
                return;
            }

            string matchValue = txtMatchValue.Text;
            string testValue = textTestValue.Text;
            eRuleMatchType matchType = (eRuleMatchType)comboSearchType.SelectedValue;

            if (string.IsNullOrEmpty(testValue))
            {
                labelTestResult.Text = "";
                return;
            }

            bool match = _utilities.CriteriaMatch(matchValue, matchType, testValue);

            labelTestResult.Text = match ? Strings.Localize("Match") : Strings.Localize("No match");
        }