Esempio 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();
        }
Esempio n. 2
0
 public override void Load()
 {
     Instance  = this;
     IsRunning = false;
     if (!Main.dedServ)
     {
         NormalStringHeight = Main.fontMouseText.MeasureString("hi").Y;
         HotKeyControl.RegisterKey();
     }
 }
Esempio n. 3
0
 public async Task WithKeys()
 {
     using var target = new HotKeyControl
           {
               HotKey = new HotKey
               {
                   Shift = true,
                   Key   = "A"
               }
           };
     await Verifier.Verify(target);
 }
 public async Task Default()
 {
     using var target = new HotKeyControl();
     await Verify(target);
 }
Esempio n. 5
0
 public override void ProcessTriggers(TriggersSet triggersSet)
 {
     HotKeyControl.PressKey(triggersSet);
 }
Esempio 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();
        }