Пример #1
0
 private void btnOpenSerial_Click(object sender, EventArgs e)
 {
     mf.OpenGPSPort();
     if (mf.spGPS.IsOpen)
     {
         cboxBaud.Enabled       = false;
         cboxPort.Enabled       = false;
         btnCloseSerial.Enabled = true;
         btnOpenSerial.Enabled  = false;
         lblCurrentBaud.Text    = mf.spGPS.BaudRate.ToString();
         lblCurrentPort.Text    = mf.spGPS.PortName;
     }
     else
     {
         cboxBaud.Enabled       = true;
         cboxPort.Enabled       = true;
         btnCloseSerial.Enabled = false;
         btnOpenSerial.Enabled  = true;
     }
 }