RequestCancel() public static method

public static RequestCancel ( ) : void
return void
Exemplo n.º 1
0
        public override void ScanContinuously(MobileBarcodeScanningOptions options, Action <Result> scanHandler)
        {
            var scanIntent = new Intent(lifecycleListener.Context, typeof(ZxingActivity));

            scanIntent.AddFlags(ActivityFlags.NewTask);

            ZxingActivity.UseCustomOverlayView = this.UseCustomOverlay;
            ZxingActivity.CustomOverlayView    = this.CustomOverlay;
            ZxingActivity.ScanningOptions      = options;
            ZxingActivity.ScanContinuously     = true;
            ZxingActivity.TopText    = TopText;
            ZxingActivity.BottomText = BottomText;

            ZxingActivity.OnCanceled += () =>
            {
                ZxingActivity.RequestCancel();
            };

            ZxingActivity.OnScanCompleted += (Result result) =>
            {
                if (scanHandler != null)
                {
                    scanHandler(result);
                }
            };

            lifecycleListener.Context.StartActivity(scanIntent);
        }
 internal void PlatformCancel()
 => ZxingActivity.RequestCancel();
Exemplo n.º 3
0
 public override void Cancel()
 {
     ZxingActivity.RequestCancel();
 }