//判断是否是扫码枪输入,是的话执行事件 void ShowInfo(BardCodeHooK.BarCodes barCode) { if (this.InvokeRequired) { this.BeginInvoke(new ShowInfoDelegate(ShowInfo), new object[] { barCode }); } else { //MessageBox.Show(barCode.IsValid.ToString()); if (barCode.IsValid == true) { object[] objects = new object[1]; objects[0] = barCode.BarCode; webBrowser1.Document.InvokeScript("scalabel", objects); } } }
public void BarCode_BarCodeEvent(BardCodeHooK.BarCodes barCode) { ShowInfo(barCode); }