void RefreshSerialPorts() { string[] ports = sm.GetPortNames(); SSerialPortList.ItemsSource = ports; if (ports.Length > 0) { SSerialPortList.SelectedIndex = 0; } }
void RefreshSerialPorts() { string[] ports = SerialManager.GetPortNames(); SSerialPortList.ItemsSource = ports; if (ports.Length > 0) { SSerialPortList.SelectedIndex = 0; SSerialConnect.IsEnabled = true; } else { SSerialConnect.IsEnabled = false; } }