コード例 #1
0
 /// <summary>
 /// 打开串口
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnOpen_Click(object sender, EventArgs e)
 {
     if (btnOpen.Text.Equals("打开串口"))
     {
         portControl.OpenPort();
     }
     else
     {
         portControl.closePort();
     }
 }