Example #1
0
 public void setButton(Button button, bool status)
 {
     if (button.InvokeRequired)
     {
         setButtonCallback buttonCallback = new setButtonCallback(setButton);
         this.Invoke(buttonCallback, button, status);
     }
     else
     {
         button.Enabled = status;
     }
 }
Example #2
0
 public void setButton(bool status)
 {
     if (this.LoginButton.InvokeRequired)
     {
         setButtonCallback buttonCallback = new setButtonCallback(setButton);
         this.Invoke(buttonCallback, status);
     }
     else
     {
         this.LoginButton.Enabled = status;
     }
 }