Esempio n. 1
0
 private void StartListeningToMouseMoves()
 {
     _spyState       = SpyState.Spying;
     _timer.Interval = TimeInterval;
     _timer.Tick    += HandelMouseMoveToUpdateHilight;
     _timer.Start();
     _keyboardHook.SetHook();
     KeyboardHook.OnKeyPress += ListenKeyPress;
     _systemTrayControl.Text  = Resources.Stop_Spying;
 }
Esempio n. 2
0
 private void StopListening()
 {
     _spyState = SpyState.Idel;
     _timer.Stop();
     KeyboardHook.OnKeyPress -= ListenKeyPress;
     _highlight.Visible       = false;
     _livePropertyDisplay.Hide();
     _systemTrayControl.Text = Resources.Start_Spying;
     _keyboardHook.UnHook();
 }
Esempio n. 3
0
        private void ListenKeyPress(int keyChar)
        {
            if (keyChar != 27)
            {
                return;
            }
            switch (_spyState)
            {
            case SpyState.Spying:
                _timer.Stop();
                _spyState = SpyState.ShowProperties;
                break;

            case SpyState.ShowProperties:
                StopListening();
                break;
            }
        }