internal void initializeCalibrationGUIButtons() { // 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 (m_parent.calibrationRecordingStatus.InvokeRequired || m_parent.startCalibration.InvokeRequired || m_parent.RecordStopButton.InvokeRequired || m_parent.resetCalibration.InvokeRequired) { initializeCalibrationGUIButtonsCallback d = new initializeCalibrationGUIButtonsCallback(initializeCalibrationGUIButtons); m_parent.calibrationRecordingStatus.Invoke(d, new object[] { }); } else { m_parent.startCalibration.Enabled = true; m_parent.RecordStopButton.Enabled = false; m_parent.resetCalibration.Enabled = true; } }