예제 #1
0
파일: Form1.cs 프로젝트: t3knoid/DATChecker
 private void OnValidateStatus(object sender, ValidationStatusEventArgs e)
 {
     if (InvokeRequired) // Make sure to check that if being called from a different thread
     {
         this.Invoke(new Action(() =>
         {
             if (tbStatus.Text.Length + e.Message.Length > tbStatus.MaxLength) // Make sure we dont store too much text to avoid out of memory error
             {
                 tbStatus.Clear();
             }
         }));
     }
     else
     {
         if (tbStatus.Text.Length + e.Message.Length > tbStatus.MaxLength) // Make sure we dont store too much text to avoid out of memory error
         {
             tbStatus.Clear();
         }
     }
 }
예제 #2
0
 private void OnValidateStatus(object sender, ValidationStatusEventArgs e)
 {
     Console.WriteLine(e.Message);
 }