Exemplo n.º 1
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);
			}
		}
Exemplo n.º 2
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);
			}
		}
		public EditMenuHandlerCommandProxy(EditMenuHandler command) {
			this.command = command;
		}
Exemplo n.º 4
0
		public static void AddRemoveCommand(this IWpfCommandService wpfCommandService, EditMenuHandler settingsCmd) {
			var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_DOCUMENT_TREEVIEW);
			cmds.Add(ApplicationCommands.Delete, new EditMenuHandlerCommandProxy(settingsCmd));
		}
Exemplo n.º 5
0
		public static void AddRemoveCommand(this IWpfCommandManager wpfCommandManager, EditMenuHandler settingsCmd) {
			var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_FILE_TREEVIEW);
			cmds.Add(ApplicationCommands.Delete, new EditMenuHandlerCommandProxy(settingsCmd));
		}