/// <summary> /// Initializes a new instance of the <see cref="PackingCygestType"/> class. /// </summary> public PackingCygestType() { InitializeComponent(); BarCodeScannerViewModel = new BarCodeScannerViewModel(); PackingCygestTypeViewModel = new PackingCygestTypeViewModel(); InitializeLaser(); }
/// <summary> /// Handles the Tapped event of the TapGestureRecognizer control.NOT IN USE /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private async void TapGestureRecognizer_Tapped(object sender, EventArgs e) { string result = ""; //The Messaging centre gets the value scanned if (!DeviceInfo.Model.Equals("PX320")) { if (BarCodeScannerViewModel == null) { BarCodeScannerViewModel = new BarCodeScannerViewModel(); } result = await BarCodeScannerViewModel.BarcodePage(new PageService()); //reading -3 the barcode. if (!string.IsNullOrEmpty(result)) { // result = result.Substring(0, result.Length - 3); AdjustLayout(result); } else { //TO DO: Add localize to the messages //DisplayAlert(Localize.GetString()); await DisplayAlert(PackingCygestTypeViewModel.LblError, PackingCygestTypeViewModel.BarCodeError, PackingCygestTypeViewModel.LblOk); } } }