Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 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();
 }