Ejemplo n.º 1
0
 private void distory()
 {
     if (list == null)
     {
         return;
     }
     foreach (var item in list)
     {
         SystemHotKeyUtil.UnregisterHotKey(this.Handle
                                           , item.HotKeyId);
         loginfo.Info(string.Format("UnregisterHotKey,id={0},note={1}", item.HotKeyId, item.Note));
     }
 }
Ejemplo n.º 2
0
        private void creatHotkey()
        {
            if (list == null)
            {
                return;
            }
            foreach (var item in list)
            {
                SystemHotKeyUtil.RegHotKey(this.Handle
                                           , item.HotKeyId
                                           , item.RegKeys.Modifiers
                                           , item.RegKeys.Keys);

                loginfo.Info
                    (string.Format("RegHotKey,id={0},hotKey={1},note={2}"
                                   , item.HotKeyId
                                   , item.RegKeys.Display
                                   , item.Note));
            }
        }