public void Connect(string port) { if (!_phaseShiftDeviceConnected) { _inner = new PhaseShiftDeviceController(port); _inner.Initialize(); _phaseShiftDeviceConnected = true; } }
private void InitPhaseShiftDeviceController() { if (phaseShiftSerialPortComboBox != null && phaseShiftSerialPortComboBox.SelectedItem != null) { string serialPort = phaseShiftSerialPortComboBox.SelectedItem.ToString(); phaseShiftDeviceController = new PhaseShiftDeviceController(serialPort); phaseShiftDeviceController.Initialize(); } }