Exemplo n.º 1
0
        private static void smethod_4()
        {
            Class229 class2 = new Class229();

            while (PeekMessage(out class2.msg_0, IntPtr.Zero, 0x312, 0x312, 1))
            {
                Hotkey hotkey = RegisteredHotkeys.FirstOrDefault <Hotkey>(class2.func_0 ?? (class2.func_0 = new Func <Hotkey, bool>(class2.method_0)));
                if (hotkey != null)
                {
                    ilog_0.DebugFormat(hotkey.Name + " pressed.", Array.Empty <object>());
                    hotkey.Callback(hotkey);
                }
            }
        }
Exemplo n.º 2
0
 public static void Unregister(string name)
 {
     try
     {
         if (IsRegistered(name))
         {
             RegisteredHotkeys.Remove(name);
             HotkeyManager.Current.Remove(name);
         }
     }
     catch (Exception)
     {
         Program.ApplicationContext.Alert("TokenManager", "Unable to unregister hotkey", TokenManagerApplicationContext.AlertType.Error);
     }
 }
Exemplo n.º 3
0
 public static void Register(string name, Keys hotkeys, EventHandler <TokenManagerHotkeysEventArgs> handler)
 {
     try
     {
         Unregister(name);
         if (hotkeys != Keys.None)
         {
             HotkeyManager.Current.AddOrReplace(name, hotkeys, true, HotkeyHandler);
             RegisteredHotkeys.Add(name, new HotkeysData(name, hotkeys, handler));
         }
     }
     catch (Exception)
     {
         Program.ApplicationContext.Alert("TokenManager", "Unable to register hotkey", TokenManagerApplicationContext.AlertType.Error);
     }
 }