예제 #1
0
 protected static void OnHotKeyPressed(HotKeyEventArgs e)
 {
     if (HotKeyManager.HotKeyPressed != null)
     {
         HotKeyManager.HotKeyPressed(null, e);
     }
 }
        static void HotKey_OnKeyEvent(object sender, HotKeyEventArgs e)
        {
            Logger.WriteLine(string.Format("KeyDown {0}", e.KeyCode));
            switch(e.KeyCode)

            {
                case Key.F1:
                case Key.F2:
                case Key.F3:
                case Key.F4:
                case Key.F5:
                case Key.F11:
                    bStop = true;
                    break;
            }
        }
예제 #3
0
		private void handleHotkeyPress(object sender, HotKeyEventArgs e)
		{
			Console.WriteLine("Hotkey pressed: " + Name + e.HotKey.Key.ToString());
			if (e.HotKey.Key == Key.O)
			{
				if (overlay.Visibility == Visibility.Hidden)
					overlay.Visibility = Visibility.Visible;
				else
					overlay.Visibility = Visibility.Hidden;
			}
		}
예제 #4
0
        protected override void WndProc(ref Message m)
        {
            if (m.Msg == WM_HOTKEY)
            {
                HotKeyEventArgs e = new HotKeyEventArgs(m.LParam);
                HotKeyManager.OnHotKeyPressed(e);
            }

            base.WndProc(ref m);
        }
예제 #5
0
		private void HandleHotkeyPress(object sender, HotKeyEventArgs e)
		{
			Logger.Debug("Hotkey pressed: " + Name + e.HotKey.Key);
			if (e.HotKey.Key == Key.O)
			{
				_overlay.Visibility = _overlay.Visibility == Visibility.Hidden ? Visibility.Visible : Visibility.Hidden;
			}

			if (e.HotKey.Key == Key.C)
			{
				if (_myClient.ClientSystem != null)
				{
					Clipboard.SetText(_myClient.ClientSystem);
					AppendStatus("Client system copied to clipboard.");
				}
				else
				{
					AppendStatus("No active rescue, copy to clipboard aborted.");
				}
			}
		}
예제 #6
0
 void HotKeyManager_HotKeyPressed(object sender, HotKeyEventArgs e)
 {
     MessageBox.Show("Hello");
 }
예제 #7
0
        private void HotKeyHooked(object sender, HotKeyEventArgs e)
        {
            var handle = NativeMethods.GetForegroundWindow();

            NativeMethods.PostMessage(handle, NativeConstants.WM_SYSCOMMAND, (uint)e.MenuItemId, 0);
        }
예제 #8
0
 private static void HotKeyManagerOnHotKeyPressed(object sender, HotKeyEventArgs hotKeyEventArgs)
 {
     HotKeys[hotKeyEventArgs.Id].RaisePressed();
 }
 // ************************************************************************
 void _hotKeyHandler_HotKeyPressed(object sender, HotKeyEventArgs e)
 {
     ActivateScreenSaver();
 }