コード例 #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
ファイル: ScanActivity.cs プロジェクト: abey/Shopinator
 protected override void OnPause()
 {
     GC.Collect();
     picker.StopScanning();
     base.OnPause();
 }