Пример #1
0
 private void SelLabel(string text)
 {
     if (this.lblStatus.InvokeRequired)
     {
         SetLabelDelegate d = new SetLabelDelegate(SelLabel);
         this.Invoke(d, new object[] { text });
     }
     else
     {
         this.lblStatus.Text = text;
     }
 }
Пример #2
0
 private void SetText(string value)
 {
     if (this.InvokeRequired)
     {
         SetLabelDelegate d = new SetLabelDelegate(SetText);
         this.Invoke(d, new object[] { value });
     }
     else
     {
         textBox1.AppendText(value);
     }
 }
Пример #3
0
 void SetLabel(Label lab, string t)
 {
     if (lab.InvokeRequired)
     {
         SetLabelDelegate setLabel = new SetLabelDelegate(SetLabel);
         this.BeginInvoke(setLabel, lab, t);
     }
     else
     {
         lab.Text = t;
     }
 }