public static void AddSettingsCommand(this IWpfCommandService wpfCommandService, IDocumentTabService documentTabService, EditMenuHandler treeViewCmd, CodeContextMenuHandler textEditorCmd) { if (treeViewCmd != null) { var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_DOCUMENT_TREEVIEW); cmds.Add(SettingsRoutedCommand, new EditMenuHandlerCommandProxy(treeViewCmd)); } if (textEditorCmd != null) { var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_DOCUMENTVIEWER_UICONTEXT); cmds.Add(SettingsRoutedCommand, new CodeContextMenuHandlerCommandProxy(textEditorCmd, documentTabService), ModifierKeys.Alt, Key.Enter); } }
public static void AddSettingsCommand(this IWpfCommandManager wpfCommandManager, IFileTabManager fileTabManager, EditMenuHandler treeViewCmd, CodeContextMenuHandler textEditorCmd) { if (treeViewCmd != null) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_FILE_TREEVIEW); cmds.Add(SettingsRoutedCommand, new EditMenuHandlerCommandProxy(treeViewCmd)); } if (textEditorCmd != null) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_TEXTEDITOR_UICONTEXT); cmds.Add(SettingsRoutedCommand, new CodeContextMenuHandlerCommandProxy(textEditorCmd, fileTabManager), ModifierKeys.Alt, Key.Enter); } }
public EditMenuHandlerCommandProxy(EditMenuHandler command) { this.command = command; }
public static void AddRemoveCommand(this IWpfCommandService wpfCommandService, EditMenuHandler settingsCmd) { var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_DOCUMENT_TREEVIEW); cmds.Add(ApplicationCommands.Delete, new EditMenuHandlerCommandProxy(settingsCmd)); }
public static void AddRemoveCommand(this IWpfCommandManager wpfCommandManager, EditMenuHandler settingsCmd) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_FILE_TREEVIEW); cmds.Add(ApplicationCommands.Delete, new EditMenuHandlerCommandProxy(settingsCmd)); }