private ShortcutDictionary GetShortcutDictionaryForCurrentState() { var dictionary = ShortcutDictionary.Create(); foreach (var globalCommand in CommandManager.GlobalCommands) { dictionary.GlobalCommandShortcutInfo.Add(GlobalCommandShortcutInformation.CreateFromGlobalCommand(globalCommand)); } foreach (var staticPanelDefinition in PanelManager.StaticPanelDefinitions) { dictionary.StaticPanelShortcutInfo.Add(StaticPanelShortcutInformation.CreateFromDefinition(staticPanelDefinition)); } return(dictionary); }
public void CheckAndResolveShortcutChangedContext(GlobalCommandShortcutInformation defaultInformation) { IsDefault = HasShortcut == defaultInformation.HasShortcut && ModifierKeys == defaultInformation.ModifierKeys && Key == defaultInformation.Key; }