void Barcode_CaptureCompleted(object sender, CSLibrary.Barcode.BarcodeEventArgs e) { Device.BeginInvokeOnMainThread(() => { switch (e.MessageType) { case CSLibrary.Barcode.Constants.MessageType.DEC_MSG: entryBarcode.Text = ((CSLibrary.Barcode.Structures.DecodeMessage)e.Message).pchMessage; StopScanBarcode(); if (_automatic == 1) { buttonWriteClicked(this, null); } else { Xamarin.Forms.DependencyService.Get <ISystemSound>().SystemSound(1); } break; case CSLibrary.Barcode.Constants.MessageType.ERR_MSG: //UpdateUI(null, String.Format("Barcode Returned: {0}", e.ErrorMessage)); break; } }); }
void Linkage_CaptureCompleted(object sender, CSLibrary.Barcode.BarcodeEventArgs e) { switch (e.MessageType) { case CSLibrary.Barcode.Constants.MessageType.DEC_MSG: AddOrUpdateBarcodeData((CSLibrary.Barcode.Structures.DecodeMessage)e.Message); //UpdateUI((DecodeMessage)e.Message, "Barcode Captured..."); break; case CSLibrary.Barcode.Constants.MessageType.ERR_MSG: //UpdateUI(null, String.Format("Barcode Returned: {0}", e.ErrorMessage)); break; } }
void Linkage_CaptureCompleted(object sender, CSLibrary.Barcode.BarcodeEventArgs e) { switch (e.MessageType) { case CSLibrary.Barcode.Constants.MessageType.DEC_MSG: { string msg = ((CSLibrary.Barcode.Structures.DecodeMessage)e.Message).pchMessage; Debug.WriteLine(msg); TypeText(msg); barcodescanning = false; BarcodeScanningOff(); } break; case CSLibrary.Barcode.Constants.MessageType.ERR_MSG: //UpdateUI(null, String.Format("Barcode Returned: {0}", e.ErrorMessage)); break; } }