Beispiel #1
0
 private static void InputManager_OnMouseEvent(VirtualKeyCode key, KeyState state, int x, int y)
 {
     if (state == KeyState.Up)
     {
         if (IsUp)
         {
             if (DateTime.Now.Subtract(UpDate).TotalSeconds < DoubleClickInterval)
             {
                 SendKeys.SendWait("^{c}");
                 SendKeys.SendWait("{TAB}");
                 SendKeys.SendWait("{TAB}");
                 SendKeys.SendWait("^{v}");
                 if (IsAutoEnter)
                 {
                     SendKeys.SendWait("{ENTER}");
                 }
             }
         }
         else
         {
             UpDate = DateTime.Now;
         }
         IsUp = !IsUp;
     }
     if (state == KeyState.Down || state == KeyState.Up)
     {
         Console.WriteLine("鼠标: " + KeyCodeConverter.ToString(key) + " - " + KeyStateConverter.ToString(state) + " - X: " + x + ", Y: " + y);
     }
 }
Beispiel #2
0
 private static void InputManager_OnKeyboardEvent(VirtualKeyCode key, KeyState state)
 {
     Console.WriteLine("键盘: " + KeyCodeConverter.ToString(key) + " - " + KeyStateConverter.ToString(state));
 }
Beispiel #3
0
 private static void InputManager_OnMouseEvent(VirtualKeyCode key, KeyState state, int x, int y)
 {
     // x and y may be 0 if there is no data
     Console.WriteLine("OnMouseEvent: " + KeyCodeConverter.ToString(key) + " - " + KeyStateConverter.ToString(state) + " - X: " + x + ", Y: " + y);
 }
Beispiel #4
0
 private static void InputManager_KeyStateChanged(VirtualKeyCode key, KeyState state)
 {
     // you may use the same callback for every key or define a new one for each
     Console.WriteLine("The key state of " + KeyCodeConverter.ToString(key) + " changed to " + KeyStateConverter.ToString(state));
 }
Beispiel #5
0
        private void InputManager_OnKeyboardEvent(VirtualKeyCode key, KeyState state)
        {
            string msg = "OnKeyboardEvent: " + KeyCodeConverter.ToString(key) + " - " + KeyStateConverter.ToString(state);

            this.AddMsg(msg);
            this.ShowMsg();
        }