Ejemplo n.º 1
0
 private void consoleOutputTextBox_TextChanged(object sender, EventArgs e)
 {
     ControlExtensions.Suspend(consoleOutputTextBox);
     consoleOutputTextBox.SelectionStart = consoleOutputTextBox.Text.Length;
     consoleOutputTextBox.ScrollToCaret();
     ControlExtensions.Resume(consoleOutputTextBox);
 }
Ejemplo n.º 2
0
 private void txt_description_TextChanged(object sender, EventArgs e)
 {
     try
     {
         ControlExtensions.Suspend(txt_description);
         // string str = txt_description.Text;
         int noofhash = Regex.Matches(txt_description.Text, "[#]").Count;
         int getcount = 0;
         var pattern  = @"(\#(?:.*?)\#)";
         if (noofhash % 2 == 0)
         {
             // this.txt_description.ForeColor = Color.Black;//parag
             foreach (var m in System.Text.RegularExpressions.Regex.Split(txt_description.Text.Trim(), pattern))
             {
                 getcount++;
                 if (m.StartsWith("#") && m.EndsWith("#"))
                 {
                     itemofdata = m;
                     itemofdata = itemofdata.Trim();
                     this.CheckKeyword(itemofdata, Color.Red, 0);
                 }
                 else
                 {
                     if (getcount == 1 || m.Trim() == "" || m.Trim() == " ")
                     {
                         continue;
                     }
                     itemofdata = m;
                     itemofdata = itemofdata.Trim();
                     this.CheckKeyword(itemofdata, Color.Black, 0);
                 }
             }
         }
         ControlExtensions.Resume(txt_description);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message.ToString(), s);
     }
 }