public void ApplicationActivated() { VmAccountData.LogGeneralEvent("Scanner - App Activated"); lock( this ) { if( ! ShouldControlScannerEnabling() ) return; if( _scanModeAtDeactivation != DISABLED ) { _scanHandler = _scanHandlerAtDeactivation; _inputSource = _inputSourceAtDeactivation; ResumeScanner(_scanModeAtDeactivation); } _scanModeAtDeactivation = -1; _scanHandlerAtDeactivation = null; } }
public void ApplicationDeactivated() { VmAccountData.LogGeneralEvent("Scanner - App De-activated"); lock( this ) { if( ! ShouldControlScannerEnabling() ) return; _scanModeAtDeactivation = _scanMode; _scanHandlerAtDeactivation = _scanHandler; _inputSourceAtDeactivation = _inputSource; if( IsDisabled() ) return; SuspendScanner(); } }
public void SuspendScanner() { _scanMode = DISABLED; _scanHandler = null; _SuspendScanner(); }
public void ScanAreaGotFocus(Object inputSource, VmScanHandlerIF scanHandler) { lock( this ) { if( ! ShouldControlScannerEnabling() ) return; _inputSource = inputSource; _scanHandler = scanHandler; ResumeScanner(ENABLE_MODE_SCAN); } }