Exemple #1
0
 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);
     }
 }
Exemple #2
0
        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, IDocumentTabService documentTabService)
 {
     this.command            = command;
     this.documentTabService = documentTabService;
 }
Exemple #4
0
 public CodeContextMenuHandlerCommandProxy(CodeContextMenuHandler command, IFileTabManager fileTabManager)
 {
     this.command        = command;
     this.fileTabManager = fileTabManager;
 }
Exemple #5
0
 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);
     }
 }
Exemple #6
0
        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);
        }