private void SetButtonEnable(Button b, bool value)
 {
     if (b.InvokeRequired)
     {
         SetButtonEnableCallback d = new SetButtonEnableCallback(SetButtonEnable);
         b.BeginInvoke(d, new object[] { b, value });
     }
     else
     {
         b.Enabled = value;
     }
 }
Пример #2
0
 private void SetButtonEnable(Button control, bool data)
 {
     if (control.InvokeRequired)
     {
         SetButtonEnableCallback d = new SetButtonEnableCallback(SetButtonEnable);
         this.Invoke(d, new object[] { control, data });
     }
     else
     {
         control.Enabled = data;
     }
 }
 private void SetButtonEnable(Button b, bool value)
 {
     if (b.InvokeRequired)
     {
         SetButtonEnableCallback d = new SetButtonEnableCallback(SetButtonEnable);
         b.BeginInvoke(d, new object[] { b, value });
     }
     else
     {
         b.Enabled = value;
     }
 }