private void OpenCloseSerialPort(object sender, RoutedEventArgs e)
 {
     if (string.IsNullOrWhiteSpace(CmbComPort.Text))
     {
         LblPortStatus.Content = "知道什么叫打开串口吗?要先有串口,懂吗?";
         return;
     }
     if (!SerialPortHelper.IsSerialPortOpened())
     {
         SerialPortHelper.OpenSerialPort(CmbComPort.Text,
                                         ((BaundRateSelectItem)CmbBoundRate.SelectedItem).Value,
                                         ((DataBitSelectItem)CmbDataBit.SelectedItem).Value,
                                         ((StopBitSelectItem)CmbStopBit.SelectedItem).Value,
                                         ((ParitySelectItem)CmbParity.SelectionBoxItem).Value);
     }
     else
     {
         SerialPortHelper.CloseSerialPort();
     }
     LblPortStatus.Content = SerialPortHelper.GetOperateMessage();
 }