Esempio n. 1
0
 public DebugLogForm()
 {
     InitializeComponent();
     singleton          = DebugLogSingleton.GetInstance();
     singleton.OnEntry += SingletonOnOnEntry;
     richTextBox1.Text += singleton.ToString();
     comboBox1.Items.AddRange(singleton.DebugLogs.Select(x => x.Pattern).Distinct().ToArray());
 }
Esempio n. 2
0
 private void SingletonOnOnEntry(EventArgs eventArgs)
 {
     richTextBox1.Invoke(new Action(() => {
         comboBox1.Items.Clear();
         comboBox1.Items.AddRange(singleton.DebugLogs.Select(x => x.Pattern).Distinct().ToArray());
         richTextBox1.Clear();
         if (!string.IsNullOrEmpty(filter))
         {
             richTextBox1.Text += singleton.Filter(filter);
         }
         else
         {
             richTextBox1.Text += singleton.ToString();
         }
     }));
 }