Пример #1
0
 public MainWindow()
 {
     InitializeComponent();
     _configJson = File.ReadAllText("config.json");
     foreach (var port in SerialPortService.GetSerialPorts())
     {
         SelectorBox.Items.Add(port);
     }
 }
Пример #2
0
 private void OnRefresh(object sender, RoutedEventArgs e)
 {
     AvailableSerialPorts = SerialPortService.GetSerialPorts();
 }
Пример #3
0
 public MainWindow()
 {
     AvailableSerialPorts = SerialPortService.GetSerialPorts();
     InitializeComponent();
     DataContext = this;
 }