public void InitScaner() { try { if (bcr == null) { bcr = new BarcodeReader(); //set BarcodeRead event } bcr.BarcodeRead += new BarcodeReadEventHandler(bcr_BarcodeRead); //sends the BarcodeRead event after each successful read bcr.ThreadedRead(true); bcr.symbology.Code128.Enable = true; //set Interleaved 2 of 5 bcr.symbology.Interleaved2Of5.Enable = false; //set PDF417 bcr.symbology.Pdf417.Enable = false; } catch (Exception exp) { //MessageBox.Show(exp.Message); CLog.WriteException("StartMenu.cs", "InitScaner", exp.Message); } }
/// <summary> /// Open the scanner device /// </summary> public void Open() { if (scannerStatus == ScannerStatus.Opened) { return; } try { if (reader == null) { reader = new IntermecBarcodeReader { ScannerOn = false, ScannerEnable = false } } ; reader.BarcodeRead += scanEvent; reader.ScannerEnable = true; reader.ThreadedRead(true); scannedData = new string[1]; scannerStatus = ScannerStatus.Opened; } catch { Close(); throw; } }
public Form1() { InitializeComponent(); readSettings(); readPersonData(); readProductData(); readCategoryData(); readBarcodes(); initCategoryBox(1); //initPersonBox(1); initProductBox(); categoryBox.SelectedIndex = 0; personListBox.SelectedIndex = 0; productBox.SelectedIndex = 0; succesTone = this.CreatePolyTone2(1); errorTone = this.CreatePolyTone1(1); try { //create a instance of BarcodeReader class bcr = new BarcodeReader(); //set BarcodeRead event bcr.BarcodeRead += new BarcodeReadEventHandler(bcr_BarcodeRead); //sends the BarcodeRead event after each successful read bcr.ThreadedRead(true); } catch (Exception exp) { MessageBox.Show(exp.Message); } }
public Form1() { InitializeComponent(); readSettings(); readPersonData(); readProductData(); readBarcodes(); initProductBox(); succesTone = this.CreatePolyTone2(1); errorTone = this.CreatePolyTone1(1); updates = 0; MAX_UPDATES = 5; personInListArray = new Person[0]; try { //create a instance of BarcodeReader class bcr = new BarcodeReader(); //set BarcodeRead event bcr.BarcodeRead += new BarcodeReadEventHandler(bcr_BarcodeRead); //sends the BarcodeRead event after each successful read bcr.ThreadedRead(true); } catch (Exception exp) { MessageBox.Show(exp.Message); } }
private void InitScaner() { if (bcr == null) { bcr = new BarcodeReader(); } //set BarcodeRead event bcr.BarcodeRead += new BarcodeReadEventHandler(bcr_BarcodeReadQueueTaskEU); //sends the BarcodeRead event after each successful read bcr.ThreadedRead(true); bcr.symbology.Code128.Enable = false; //set Interleaved 2 of 5 bcr.symbology.Interleaved2Of5.Enable = false; //set PDF417 bcr.symbology.Pdf417.Enable = false; bcr.symbology.QrCode.Enable = false; }
public void InitScaner() { try { bcr = new BarcodeReader(); //set BarcodeRead event bcr.BarcodeRead += new BarcodeReadEventHandler(bcr_BarcodeRead); //sends the BarcodeRead event after each successful read bcr.ThreadedRead(true); bcr.symbology.Code128.Enable = false; //set Interleaved 2 of 5 bcr.symbology.Interleaved2Of5.Enable = false; //set PDF417 bcr.symbology.Pdf417.Enable = false; } catch (Exception exp) { MessageBox.Show(exp.Message); } }