示例#1
0
        private void btnFindMatches_Click(object sender, EventArgs e)
        {
            ValidateInput();

            var logic = new TextMatchLogic.ProcessTextMatch { MainText = txtMain.Text, SubText = txtSubText.Text };
            lblResult.Text = logic.Process();
        }
示例#2
0
        static void Main(string[] args)
        {
            string text = String.Empty;
            string subText = String.Empty;

            var options = new CommandLineHelper();
            if (Parser.Default.ParseArguments(args, options))
            {
                // Values are available here
                text = options.Text + " " + String.Join<string>(" ", options.RestOfText);
                subText = options.Subtext;
            }

            if (text.Length > 0 && subText.Length > 0)
            {
                var logic = new TextMatchLogic.ProcessTextMatch { MainText = text, SubText = subText };
                Console.WriteLine(logic.Process());
                Console.ReadLine();
            }
            else
            {
                options.GetUsage();
            }
        }