Пример #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();
 }