示例#1
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (PuertoDatos.IsOpen)
     {
         PuertoDatos.Close();
     }
 }
示例#2
0
 private void Start_Stop_DB9(object sender, EventArgs e)
 {
     if (button1.Text == "Abrir Puerto")
     {
         button1.Text = "Cerrar Puerto";
         PuertoDatos.Open();
         PuertoDatos.RtsEnable = Recepcion;
     }
     else
     {
         button1.Text = "Abrir Puerto";
         PuertoDatos.Close();
         PollingStatus = false;
     }
 }