Beispiel #1
0
 /// <summary>
 /// Applies all shortcuts to the items
 /// </summary>
 public static void ApplyAllShortcuts()
 {
     ShortcutManager.UpdateAllShortcuts();
     foreach (ShortcutItem item in RegisteredItems)
     {
         if (item.Item != null)
         {
             item.Item.ShortcutKeys = Keys.None;
             item.Item.ShortcutKeys = item.Custom;
         }
         else if (item.Default != item.Custom)
         {
             DataEvent de = new DataEvent(EventType.Shortcut, item.Id, item.Custom);
             EventManager.DispatchEvent(Globals.MainForm, de);
         }
     }
 }
Beispiel #2
0
 /// <summary>
 /// Applies all shortcuts to the items
 /// </summary>
 public static void ApplyAllShortcuts()
 {
     ShortcutManager.UpdateAllShortcuts();
     foreach (ShortcutItem item in RegisteredItems)
     {
         if (item.Item != null)
         {
             item.Item.ShortcutKeys = Keys.None;
             item.Item.ShortcutKeys = item.Custom;
         }
         else if (item.Default != item.Custom)
         {
             ScintillaControl.UpdateShortcut(item.Id, item.Custom);
             DataEvent de = new DataEvent(EventType.Shortcut, item.Id, item.Custom);
             EventManager.DispatchEvent(Globals.MainForm, de);
         }
     }
     foreach (ToolStripItem button in SecondaryItems)
     {
         ApplySecondaryShortcut(button);
     }
 }