Ejemplo n.º 1
0
 private void ShowInfo(BardCodeHooK.BarCodes barCode)
 {
     richTextBox1.Focus();
     if (this.InvokeRequired)
     {
         this.BeginInvoke(new ShowInfoDelegate(ShowInfo), new object[] { barCode });
     }
     else
     {
         //richTextBox1.Focus();
         //textBox1.Text = barCode.KeyName;
         //textBox2.Text = barCode.VirtKey.ToString();
         //textBox3.Text = barCode.ScanCode.ToString();
         //textBox4.Text = barCode.Ascll.ToString();
         //textBox5.Text = barCode.Chr.ToString();
         //textBox6.Text = barCode.IsValid ? barCode.BarCode : "";//是否为扫描枪输入,如果为true则是 否则为键盘输入
         //textBox7.Text += barCode.KeyName;
         if (barCode.IsValid && thisSysConfig.workMode == ENUM_WORK_MODE.WORK_MODE_LOCAL)
         {
             LogMessage("条码内容:" + barCode.BarCode); textBoxCLHP.Text = barCode.BarCode;
             if (textBoxCLHP.Text.Trim().Length == thisSysConfig.BarCodeLength)
             {
                 startTest();
             }
             else
             {
                 LogWarning("VIN码长度错误,规定长度为" + thisSysConfig.BarCodeLength.ToString() + ",该车VIN长度为" + textBoxCLHP.Text.Length.ToString());
             }
         }
     }
 }
Ejemplo n.º 2
0
 void BarCode_BarCodeEvent(BardCodeHooK.BarCodes barCode)
 {
     ShowInfo(barCode);
 }