private void LoadParams() { CmbBoundRate.ItemsSource = SerialPortHelper.GetSerialPortBoundRate(); CmbDataBit.ItemsSource = SerialPortHelper.GetSerialPortDataBits(); CmbStopBit.ItemsSource = SerialPortHelper.GetSerialPortStopBits(); CmbParity.ItemsSource = SerialPortHelper.GetSerialPortParity(); CmbBoundRate.SelectedIndex = 0; CmbDataBit.SelectedIndex = 0; CmbStopBit.SelectedIndex = 0; CmbParity.SelectedIndex = 0; RefreshSystemSerialPortList(); }
private void LoadParams() { CmbBoundRate.ItemsSource = SerialPortHelper.GetSerialPortBoundRate(); CmbDataBit.ItemsSource = SerialPortHelper.GetSerialPortDataBits(); CmbStopBit.ItemsSource = SerialPortHelper.GetSerialPortStopBits(); CmbParity.ItemsSource = SerialPortHelper.GetSerialPortParity(); CmbBoundRate.SelectedIndex = 9; CmbDataBit.SelectedIndex = 3; CmbStopBit.SelectedIndex = 0; CmbParity.SelectedIndex = 0; RefreshSystemSerialPortList(); _messageTimer.Elapsed += (sender, args) => Dispatcher.Invoke(() => LblMessage.Content = _messageBarMessage); _messageTimer.Start(); }