Ejemplo n.º 1
0
 public FormMain()
 {
     InitializeComponent();
     CP1616PacketHead.Addr_SIZE    = 0;
     CP1616PacketHead.DataLen_SIZE = 1;
     CP1616PacketHead.CalcHeaderLen();
 }
Ejemplo n.º 2
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     CP1616PacketHead.Addr_SIZE = 0;
     CP1616PacketHead.CalcHeaderLen();
     Application.Run(new Form1());
 }
Ejemplo n.º 3
0
 public Form1()
 {
     InitializeComponent();
     CP1616PacketHead.Addr_SIZE    = 0;
     CP1616PacketHead.DataLen_SIZE = 2;
     CP1616PacketHead.bCheckVerify = false;
     CP1616PacketHead.bIsDebugOut  = false;
     CP1616PacketHead.CalcHeaderLen();
 }
Ejemplo n.º 4
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            CP1616PacketHead.Addr_SIZE    = 0;
            CP1616PacketHead.DataLen_SIZE = 2;
            CP1616PacketHead.bCheckVerify = false;
            CP1616PacketHead.bIsDebugOut  = true;
            CP1616PacketHead.CalcHeaderLen();

            Application.Run(new formMain());
        }
Ejemplo n.º 5
0
 private void Form1_Load(object sender, EventArgs e)
 {
     toolStripStatusLabel1.Text    = "工作串口为" + serialPort1.PortName;
     CP1616PacketHead.Addr_SIZE    = 1;
     CP1616PacketHead.DataLen_SIZE = 1;
     CP1616PacketHead.CalcHeaderLen();
     if (!WFGlobal.OpenSerialPort(ref serialPort1, "工控机握手监测"))
     {
         this.Close();
         return;
     }
     RxCount = 0;
     TxCount = 0;
     HandWork();
     timer1.Enabled = true;
 }