Beispiel #1
0
 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;
     }
 }
Beispiel #2
0
        public void ApplicationDeactivated()
        {
            VmAccountData.LogGeneralEvent("Scanner - App De-activated");
            lock( this )
            {
                if( ! ShouldControlScannerEnabling() ) return;
                _scanModeAtDeactivation = _scanMode;
                _scanHandlerAtDeactivation = _scanHandler;
                _inputSourceAtDeactivation = _inputSource;
                if( IsDisabled() ) return;

                SuspendScanner();
            }
        }
Beispiel #3
0
        public void SuspendScanner()
        {
            _scanMode = DISABLED;
            _scanHandler = null;

            _SuspendScanner();
        }
Beispiel #4
0
        public void ScanAreaGotFocus(Object inputSource, VmScanHandlerIF scanHandler)
        {
            lock( this )
            {

                if( ! ShouldControlScannerEnabling() ) return;
                _inputSource = inputSource;
                _scanHandler = scanHandler;

                ResumeScanner(ENABLE_MODE_SCAN);
            }
        }