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 static void AddRemoveCommand(this IWpfCommandService wpfCommandService, CodeContextMenuHandler settingsCmd, IDocumentTabService documentTabService) { var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_DOCUMENTVIEWER_UICONTEXT); cmds.Add(EditingCommands.Delete, new CodeContextMenuHandlerCommandProxy(settingsCmd, documentTabService), ModifierKeys.None, Key.Delete); }
public static void AddRemoveCommand(this IWpfCommandManager wpfCommandManager, CodeContextMenuHandler settingsCmd, IFileTabManager fileTabManager) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_TEXTEDITOR_UICONTEXT); cmds.Add(EditingCommands.Delete, new CodeContextMenuHandlerCommandProxy(settingsCmd, fileTabManager), ModifierKeys.None, Key.Delete); }
public CodeContextMenuHandlerCommandProxy(CodeContextMenuHandler command, IFileTabManager fileTabManager) { this.command = command; this.fileTabManager = fileTabManager; }
public CodeContextMenuHandlerCommandProxy(CodeContextMenuHandler command, IDocumentTabService documentTabService) { this.command = command; this.documentTabService = documentTabService; }