Exemple #1
0
 public void SetText(string text)
 {
     if (this.InvokeRequired)
     {
         SetText_Callback call = new SetText_Callback(SetText);
         this.Invoke(call, text);
     }
     else
     {
         this.Text = text;
     }
 }
Exemple #2
0
 private void SetText(Control ctrl, string text)
 {
     if (ctrl.InvokeRequired)
     {
         SetText_Callback call = new SetText_Callback(SetText);
         ctrl.Invoke(call, ctrl, text);
     }
     else
     {
         ctrl.Text = text;
     }
 }