Beispiel #1
0
 public void ToggleProcessButton(bool bEnabled)
 {
     if (BtnProcess.InvokeRequired)
     {
         var d = new DisableButtonCallback(ToggleProcessButton);
         BtnProcess.Invoke(d, new object[] { bEnabled });
     }
     else
     {
         BtnProcess.Enabled = bEnabled;
     }
 }
 public void ToggleButtons(bool state)
 {
     if (this.PinEntry.InvokeRequired)
     {
         DisableButtonCallback a = new DisableButtonCallback(this.PinEntry.ToggleButton);
         this.PinEntry.Invoke(a, new object[] { this.PinEntry.btnClear, state });
         DisableButtonCallback b = new DisableButtonCallback(this.PinEntry.ToggleButton);
         this.PinEntry.Invoke(b, new object[] { this.PinEntry.btnEnter, state });
         DisableButtonCallback c = new DisableButtonCallback(this.PinEntry.ToggleButton);
         this.PinEntry.Invoke(c, new object[] { this.PinEntry.btnCancel, state });
     }
     else
     {
         this.PinEntry.btnClear.Enabled  = state;
         this.PinEntry.btnEnter.Enabled  = state;
         this.PinEntry.btnCancel.Enabled = state;
     }
 }