public static void HandleScanEvent(object o, VmMdScannerEventArgs e) { lock( VmApplication.Default ) { VmMdKeyboardInterface.PostKeyboardMessage(e.BarCode); } }
private void r_ReadNotify(object sender, EventArgs e) { ReaderData rd = _reader.GetNextReaderData(); if ( rd.Result == Results.SUCCESS ) { VmMdScannerEventArgs sea = new VmMdScannerEventArgs( rd.Text, rd.TimeStamp); OnScanned(sea); EnableNextRead(); } }
private void OnScanned(VmMdScannerEventArgs sea) { if (Scanned != null) Scanned(this, sea); }
private void OnScanned(VmMdScannerEventArgs sea) { try { if (Scanned != null) Scanned(this, new VmMdScannerEventArgs(sea.BarCode + '\r',DateTime.Now)); } catch (Exception x) { System.Windows.Forms.MessageBox.Show("An unexpected error has occurred: " + x.ToString() ); Application.Exit(); } }
protected void _HandleScanEvent(object o, VmMdScannerEventArgs e) { HandleScan(e.BarCode); }