internal void SetRecordingButtonState(bool recordingState) { // 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) { SetRecordingButtonStateCallback d = new SetRecordingButtonStateCallback(SetRecordingButtonState); this.Invoke(d, new object[] { recordingState }); } else { if (recordingState == true) { this.RecordReference.Enabled = false; this.RecordPlay.Enabled = false; } else { this.RecordReference.Enabled = true; this.RecordPlay.Enabled = true; } } }
internal void SetRecordingButtonState(bool recordingState) { // 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) { SetRecordingButtonStateCallback d = new SetRecordingButtonStateCallback(SetRecordingButtonState); this.Invoke(d, new object[] { recordingState }); } else { if (recordingState == true) { this.RecordReference.Enabled = false; this.RecordPlay.Enabled = false; } else { this.RecordReference.Enabled = true; this.RecordPlay.Enabled = true; } } }