Example #1
0
 //' The delegates subroutine.
 public void SetLabelText_ThreadSafe(Label lbl, String txt)
 {
     if (lbl.InvokeRequired)
     {
         SetLabelText_Delegate mydelegate = new SetLabelText_Delegate(SetLabelText_ThreadSafe);
         this.Invoke(mydelegate, new object[] { lbl, txt });
     }
     else
     {
         lbl.Text = txt;
     }
 }
Example #2
0
 //' The delegates subroutine.
 public void SetLabelText_ThreadSafe(Label lbl, String txt)
 {
     if(lbl.InvokeRequired){
         SetLabelText_Delegate mydelegate= new SetLabelText_Delegate(SetLabelText_ThreadSafe);
         this.Invoke(mydelegate, new object[]{lbl, txt});
     }else{
         lbl.Text= txt;
     }
 }