Exemplo n.º 1
0
        /// <summary>
        /// Creates a new HotKeyManager object.
        /// </summary>
        public HotKeyManager()
        {
            // setup the control that recieves the hotkey msg.
            m_ctrl            = new HotKeyControl();
            m_ctrl.HotKeyHit += new HotKeyEventHandler(HotKeyHitHandler);

            // init the collection.
            m_keys = new HotKeyCollection();
        }
Exemplo n.º 2
0
 public override void Load()
 {
     Instance  = this;
     IsRunning = false;
     if (!Main.dedServ)
     {
         NormalStringHeight = Main.fontMouseText.MeasureString("hi").Y;
         HotKeyControl.RegisterKey();
     }
 }
Exemplo n.º 3
0
 public async Task WithKeys()
 {
     using var target = new HotKeyControl
           {
               HotKey = new HotKey
               {
                   Shift = true,
                   Key   = "A"
               }
           };
     await Verifier.Verify(target);
 }
Exemplo n.º 4
0
 public async Task Default()
 {
     using var target = new HotKeyControl();
     await Verify(target);
 }
Exemplo n.º 5
0
 public override void ProcessTriggers(TriggersSet triggersSet)
 {
     HotKeyControl.PressKey(triggersSet);
 }
Exemplo n.º 6
0
        /// <summary>
        /// Creates a new HotKeyManager object.
        /// </summary>
        public HotKeyManager()
        {
            // setup the control that recieves the hotkey msg.
            m_ctrl = new HotKeyControl();
            m_ctrl.HotKeyHit += new HotKeyEventHandler(HotKeyHitHandler);

            // init the collection.
            m_keys = new HotKeyCollection();
        }