Beispiel #1
0
        void HandleScanResult(ZxingBarcodeResult result)
        {
            string msg = "";

            if (result != null && !string.IsNullOrEmpty(result.Value))
            {
                msg = "Found Barcode: " + result.Value;
            }
            else
            {
                msg = "Scanning Canceled!";
            }

            Toast.MakeText(this, msg, ToastLength.Short).Show();
        }
        void HandleScanResult(ZxingBarcodeResult result)
        {
            string msg = "";

            if (result != null && !string.IsNullOrEmpty(result.Value))
            {
                msg = "Found Barcode: " + result.Value;
            }
            else
            {
                msg = "Scanning Canceled!";
            }

            var av = new UIAlertView("Barcode Result", msg, null, "OK", null);

            av.Show();
        }
Beispiel #3
0
        void HandleScanResult(ZxingBarcodeResult result)
        {
            string msg = "";

            if (result != null && !string.IsNullOrEmpty(result.Value))
            {
                msg = "Found Barcode: " + result.Value;
            }
            else
            {
                msg = "Scanning Canceled!";
            }

            MessageBox.Show(msg);

            //Go back to the main page
            NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));

            //Don't allow to navigate back to the scanner with the back button
            NavigationService.RemoveBackEntry();
        }