示例#1
0
 protected override void OnPause()
 {
     base.OnPause();
     GC.Collect();
     barcodePicker.StopScanning();
     paused = true;
 }
示例#2
0
        protected void SetScanState(ScanState state, IScanSession scanSession)
        {
            scanState = state;

            switch (state)
            {
            case ScanState.STOPPED:
                if (scanSession != null)
                {
                    scanSession.StopScanning();
                }
                else
                {
                    picker.StopScanning();
                }
                break;

            case ScanState.SCANNING:
                if (HasCameraPermission())
                {
                    picker.StartScanning();
                }
                else
                {
                    RequestCameraPermission();
                }
                break;
            }
        }
示例#3
0
 protected override void OnPause()
 {
     // Call GC.Collect() before stopping the scanner as the garbage collector for some reason does not
     // collect objects without references asap but waits for a long time until finally collecting them.
     GC.Collect();
     picker.StopScanning();
     base.OnPause();
 }
示例#4
0
        protected override void OnPause()
        {
            base.OnPause();

            //Chamada do GC.Collect, Garbage Collect não funcionou
            GC.Collect();
            barcodePicker.StopScanning();
            paused = true;
        }
示例#5
0
 /// <summary>
 /// Searchs the clicked.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">EventArgs</param>
 private void SearchClicked(object sender, EventArgs e)
 {
     _picker.StopScanning();
     _scanedItCamera.EditClicked?.Invoke();
 }
示例#6
0
 public override void DidCancel(ScanOverlay overlay, NSDictionary status)
 {
     Console.WriteLine("Cancel was pressed.");
     presentingViewController.DismissViewController(true, null);
     picker.StopScanning();
 }
示例#7
0
 protected override void OnPause()
 {
     GC.Collect();
     picker.StopScanning();
     base.OnPause();
 }