/// <summary> /// When the ScanPage is about to go to the background, release the /// scanner. /// </summary> protected override void OnPause() { ScannerCode.Log("OnPause()..."); base.OnPause(); ScannerCode.CloseBarcodeScanner(); ScannerCode.Update_Event -= On_Update_Event; ScannerCode.Scan_Result_Event -= On_Result_Event; }
/// <summary> /// Toggles the reader object /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OpenScanner_CheckedChange(object sender, CompoundButton.CheckedChangeEventArgs e) { ScannerCode.mOpenReader = e.IsChecked; if (ScannerCode.mOpenReader) { ScannerCode.OpenBarcodeReader(); } else { ScannerCode.CloseBarcodeScanner(); } }