public SettingViewModel(IComPortProvider comPortProvider)
        {
            ComPorts  = new ObservableCollection <string>(SerialPort.GetPortNames());
            BaudRates = new ObservableCollection <string>(new string[] { "2400", "4800", "9600" });
            DataBits  = new ObservableCollection <string>(new string[] { "5", "6", "7", "8" });
            StopBits  = new ObservableCollection <string>(new string[] { "One", "Two" });
            Parity    = new ObservableCollection <string>(new string[] { "None", "Odd", "Even" });

            ComPortSetting   = ComPortConnectorSetting.GetComPortConnectorSetting() ?? new ComPortConnectorSetting();
            SaveSetting      = ReactiveCommand.Create(ExecuteSaveSetting);
            _comPortProvider = comPortProvider;
        }
 public void Start()
 {
     ComPortConnector.InitializeSerialPort(ComPortConnectorSetting.GetComPortConnectorSetting());
 }