예제 #1
0
 //串口发送
 private void serialPort_SendData(byte[] buf, int index, int len)
 {
     if (true == scom.IsOpen)
     {
         try
         {
             scom.WritePort(buf, index, len);
         }
         catch (Exception ex)
         {
             MessageBox.Show("发送错误:" + ex.Message);
         }
     }
 }