예제 #1
0
 private void DisposePhaseShiftDeviceController()
 {
     if (phaseShiftDeviceController != null)
     {
         phaseShiftDeviceController.Dispose();
         phaseShiftDeviceController = null;
     }
 }
 public void Connect(string port)
 {
     if (!_phaseShiftDeviceConnected)
     {
         _inner = new PhaseShiftDeviceController(port);
         _inner.Initialize();
         _phaseShiftDeviceConnected = true;
     }
 }
예제 #3
0
        private void InitPhaseShiftDeviceController()
        {
            if (phaseShiftSerialPortComboBox != null && phaseShiftSerialPortComboBox.SelectedItem != null)
            {
                string serialPort = phaseShiftSerialPortComboBox.SelectedItem.ToString();

                phaseShiftDeviceController = new PhaseShiftDeviceController(serialPort);
                phaseShiftDeviceController.Initialize();
            }
        }
 public void Disconnect()
 {
     _inner?.Dispose();
     _inner = null;
     _phaseShiftDeviceConnected = false;
 }