private void ensureController() { if (m_controller == null) { m_controller = new ControllerRQAX2850(comboBoxPort.Text); m_controller.init(); } }
private void disposeController() { if (m_controller != null) { lock (m_controller) { // Close the port m_controller.Dispose(); m_controller = null; } } foreach (Control cntrl in this.panel1.Controls) { if (cntrl.GetType() == typeof(RQMeasuredUserControl)) { ((RQMeasuredUserControl)cntrl).Cleanup(); } } this.motorActivationGroupBox.Enabled = false; stopMotorsButton.BackColor = this.motorActivationGroupBox.BackColor; stopMotorsButton.Text = "-"; }