Example #1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     comProc = new ComProc("COM19");
     string[] ports = SerialPort.GetPortNames();
     Array.Sort(ports);
     cbCom.Items.Clear();
     cbCom.Items.AddRange(ports);
     cbCom.Text         = "COM19";
     Read_76_TxList     = new byte[11];
     Read_76_TxList[0]  = 0x76;
     Read_76_TxList[1]  = 0;
     Read_76_TxList[2]  = 0;//命令
     Read_76_TxList[3]  = 0;
     Read_76_TxList[4]  = 0;
     Read_76_TxList[5]  = 0;
     Read_76_TxList[6]  = 0;
     Read_76_TxList[7]  = 0;
     Read_76_TxList[8]  = 0;
     Read_76_TxList[9]  = 0;
     Read_76_TxList[10] = 76;//校验
 }
Example #2
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     comProc = new ComProc("COM5");
 }