Exemple #1
0
 internal void SetTestTimerButtonState(bool buttonState)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.WiimoteStatus.InvokeRequired)
     {
         SetTestTimerButtonStateCallback d = new SetTestTimerButtonStateCallback(SetTestTimerButtonState);
         this.Invoke(d, new object[] { buttonState });
     }
     else
     {
         this.TestTimer.Enabled = buttonState;
     }
 }
 internal void SetTestTimerButtonState(bool buttonState)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.WiimoteStatus.InvokeRequired)
     {
         SetTestTimerButtonStateCallback d = new SetTestTimerButtonStateCallback(SetTestTimerButtonState);
         this.Invoke(d, new object[] { buttonState });
     }
     else
     {
         this.TestTimer.Enabled = buttonState;
     }
 }