public virtual void ConnectBarcode() { barcode1.OnBarcodeReported += OnBarcodeReported; barcode1.Connect(); barcode2.OnBarcodeReported += OnBarcodeReported; barcode2.Connect(); }
void initBarcode(string barcodeComPort) { try { barcodeDevice = new BarcodeDevice(barcodeComPort); barcodeDevice.OnBarcodeReported += OnBarcodeReported; barcodeDevice.Connect(); } catch (Exception) { } }
public void initBarcode() { try { barcode1 = new BarcodeDevice(SysConfig.ScannerPort_1); barcode2 = new BarcodeDevice(SysConfig.ScannerPort_2); barcode1.OnBarcodeReported += OnBarcodeReported; barcode1.Connect(); barcode2.OnBarcodeReported += OnBarcodeReported; barcode2.Connect(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }