CallStackCommandLoader(IWpfCommandManager wpfCommandManager, IMainToolWindowManager mainToolWindowManager) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); cmds.Add(DebugRoutedCommands.ShowExceptions, new RelayCommand(a => mainToolWindowManager.Show(ExceptionsToolWindowContent.THE_GUID))); cmds.Add(DebugRoutedCommands.ShowExceptions, ModifierKeys.Control | ModifierKeys.Alt, Key.E); }
ToolWindowLoader(IWpfCommandManager wpfCommandManager, IMainToolWindowManager mainToolWindowManager) { var cmds = wpfCommandManager.GetCommands(ControlConstants.GUID_MAINWINDOW); cmds.Add(OpenToolWindow, new RelayCommand(a => mainToolWindowManager.Show(ToolWindowContent.THE_GUID))); cmds.Add(OpenToolWindow, ModifierKeys.Control | ModifierKeys.Alt, Key.Z); }
SaveModuleCommandLoader(IWpfCommandManager wpfCommandManager, Lazy<IUndoCommandManager> undoCommandManager, Lazy<IDocumentSaver> documentSaver) { this.undoCommandManager = undoCommandManager; this.documentSaver = documentSaver; var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); cmds.Add(SaveAllCommand, (s, e) => SaveAll_Execute(), (s, e) => e.CanExecute = SaveAll_CanExecute, ModifierKeys.Control | ModifierKeys.Shift, Key.S); }
CommandLoader(IWpfCommandManager wpfCommandManager, IFileTabManager fileTabManager, DeleteResourceCommand.EditMenuCommand removeCmd1, DeleteResourceElementCommand.EditMenuCommand removeCmd2, DeleteResourceCommand.CodeCommand removeCmd3, DeleteResourceElementCommand.CodeCommand removeCmd4, ResourceSettingsCommand.EditMenuCommand settingsCmd10, ResourceSettingsCommand.CodeCommand settingsCmd11, ResourceElementSettingsCommand.EditMenuCommand settingsCmd20, ResourceElementSettingsCommand.CodeCommand settingsCmd21, ImageResourceElementSettingsCommand.EditMenuCommand settingsCmd30, ImageResourceElementSettingsCommand.CodeCommand settingsCmd31, SerializedImageResourceElementSettingsCommand.EditMenuCommand settingsCmd40, SerializedImageResourceElementSettingsCommand.CodeCommand settingsCmd41, SerializedImageListStreamerResourceElementSettingsCommand.EditMenuCommand settingsCmd50, SerializedImageListStreamerResourceElementSettingsCommand.CodeCommand settingsCmd51) { wpfCommandManager.AddRemoveCommand(removeCmd1); wpfCommandManager.AddRemoveCommand(removeCmd2); wpfCommandManager.AddRemoveCommand(removeCmd3, fileTabManager); wpfCommandManager.AddRemoveCommand(removeCmd4, fileTabManager); wpfCommandManager.AddSettingsCommand(fileTabManager, settingsCmd10, settingsCmd11); wpfCommandManager.AddSettingsCommand(fileTabManager, settingsCmd20, settingsCmd21); wpfCommandManager.AddSettingsCommand(fileTabManager, settingsCmd30, settingsCmd31); wpfCommandManager.AddSettingsCommand(fileTabManager, settingsCmd40, settingsCmd41); wpfCommandManager.AddSettingsCommand(fileTabManager, settingsCmd50, settingsCmd51); }
public ReplEditorUI(ReplEditorOptions options, IThemeManager themeManager, IWpfCommandManager wpfCommandManager, IMenuManager menuManager, ITextEditorSettings textEditorSettings) { this.dispatcher = Dispatcher.CurrentDispatcher; this.options = (options ?? new ReplEditorOptions()).Clone(); this.textEditor = new NewTextEditor(themeManager, textEditorSettings); this.textEditor.TextArea.Document = new TextDocument(); this.textEditor.TextArea.Document.UndoStack.SizeLimit = 100; this.textEditor.TextArea.LeftMargins.Insert(0, new FrameworkElement { Margin = new Thickness(LEFT_MARGIN, 0, 0, 0) }); this.textEditor.TextArea.TextEntering += TextArea_TextEntering; this.textEditor.TextArea.PreviewKeyDown += TextArea_PreviewKeyDown; AddBinding(ApplicationCommands.Paste, (s, e) => Paste(), (s, e) => e.CanExecute = CanPaste && IsAtEditingPosition); AddBinding(ApplicationCommands.Cut, (s, e) => CutSelection(), (s, e) => e.CanExecute = CanCutSelection && IsAtEditingPosition); if (this.options.TextEditorCommandGuid != null) { wpfCommandManager.Add(this.options.TextEditorCommandGuid.Value, textEditor); } if (this.options.TextAreaCommandGuid != null) { wpfCommandManager.Add(this.options.TextAreaCommandGuid.Value, textEditor.TextArea); } if (this.options.MenuGuid != null) { menuManager.InitializeContextMenu(this.textEditor, this.options.MenuGuid.Value, new GuidObjectsCreator(this), new ContextMenuInitializer(textEditor, textEditor)); } }
BreakpointsContentCommandLoader(IWpfCommandManager wpfCommandManager, Lazy<IAnalyzerManager> analyzerManager) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_ANALYZER_TREEVIEW); cmds.Add(ApplicationCommands.Copy, (s, e) => CopyCtxMenuCommand.ExecuteInternal(analyzerManager), (s, e) => e.CanExecute = CopyCtxMenuCommand.CanExecuteInternal(analyzerManager)); }
RemoveAnalyzeCommand(IWpfCommandManager wpfCommandManager, Lazy <IAnalyzerManager> analyzerManager) { this.analyzerManager = analyzerManager; var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_ANALYZER_TREEVIEW); cmds.Add(ApplicationCommands.Delete, (s, e) => DeleteNodes(), (s, e) => e.CanExecute = CanDeleteNodes, ModifierKeys.None, Key.Delete); }
ShowVisualBasicInteractiveCommandLoader(IWpfCommandManager wpfCommandManager, IMainToolWindowManager mainToolWindowManager) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); cmds.Add(ShowVisualBasicInteractiveRoutedCommand, (s, e) => mainToolWindowManager.Show(VisualBasicToolWindowContent.THE_GUID), (s, e) => e.CanExecute = true); cmds.Add(ShowVisualBasicInteractiveRoutedCommand, ModifierKeys.Control | ModifierKeys.Alt, Key.I); }
SearchCommandLoader(IMainToolWindowManager mainToolWindowManager, Lazy<ISearchManager> searchManager, IWpfCommandManager wpfCommandManager) { this.mainToolWindowManager = mainToolWindowManager; this.searchManager = searchManager; var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); cmds.Add(SearchRoutedCommand, Search, CanSearch); }
public DocumentViewer(IWpfCommandManager wpfCommandManager, IDocumentViewerServiceImpl documentViewerServiceImpl, IMenuManager menuManager, DocumentViewerControl documentViewerControl) { if (wpfCommandManager == null) { throw new ArgumentNullException(nameof(wpfCommandManager)); } if (documentViewerServiceImpl == null) { throw new ArgumentNullException(nameof(documentViewerServiceImpl)); } if (menuManager == null) { throw new ArgumentNullException(nameof(menuManager)); } if (documentViewerControl == null) { throw new ArgumentNullException(nameof(documentViewerControl)); } this.wpfCommandManager = wpfCommandManager; this.documentViewerServiceImpl = documentViewerServiceImpl; this.documentViewerControl = documentViewerControl; menuManager.InitializeContextMenu(documentViewerControl.TextView.VisualElement, MenuConstants.GUIDOBJ_DOCUMENTVIEWERCONTROL_GUID, new GuidObjectsProvider(this), new ContextMenuInitializer(documentViewerControl.TextView)); // Prevent the tab control's context menu from popping up when right-clicking in the textview host margin menuManager.InitializeContextMenu(documentViewerControl, Guid.NewGuid()); wpfCommandManager.Add(ControlConstants.GUID_DOCUMENTVIEWER_UICONTEXT, documentViewerControl); documentViewerControl.TextView.Properties.AddProperty(typeof(DocumentViewer), this); documentViewerControl.TextView.TextBuffer.Properties.AddProperty(DocumentViewerExtensions.DocumentViewerTextBufferKey, this); }
ReplEditorCreator(IThemeManager themeManager, IWpfCommandManager wpfCommandManager, IMenuManager menuManager, ITextEditorSettings textEditorSettings) { this.themeManager = themeManager; this.wpfCommandManager = wpfCommandManager; this.menuManager = menuManager; this.textEditorSettings = textEditorSettings; }
DocumentViewerProvider(IWpfCommandManager wpfCommandManager, IMenuManager menuManager, IDocumentViewerServiceImpl documentViewerServiceImpl, ITextBufferFactoryService textBufferFactoryService, IDnSpyTextEditorFactoryService dnSpyTextEditorFactoryService) { this.wpfCommandManager = wpfCommandManager; this.menuManager = menuManager; this.documentViewerServiceImpl = documentViewerServiceImpl; this.textBufferFactoryService = textBufferFactoryService; this.dnSpyTextEditorFactoryService = dnSpyTextEditorFactoryService; }
BreakpointsContentCommandLoader(IWpfCommandManager wpfCommandManager, Lazy <IAnalyzerManager> analyzerManager) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_ANALYZER_TREEVIEW); cmds.Add(ApplicationCommands.Copy, (s, e) => CopyCtxMenuCommand.ExecuteInternal(analyzerManager), (s, e) => e.CanExecute = CopyCtxMenuCommand.CanExecuteInternal(analyzerManager)); }
CommandLoader(IWpfCommandManager wpfCommandManager, MySettings mySettings) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_TEXTEDITOR_UICONTEXT); // This command will be added to all text editors cmds.Add(Option1Command, (s, e) => mySettings.BoolOption1 = !mySettings.BoolOption1, (s, e) => e.CanExecute = true, ModifierKeys.Control | ModifierKeys.Alt, Key.Q); }
ShowFileTreeViewCommandLoader(IWpfCommandManager wpfCommandManager, IMainToolWindowManager mainToolWindowManager) { wpfCommandManager.GetCommands(ControlConstants.GUID_MAINWINDOW).Add( ShowFileTreeViewRoutedCommand, (s, e) => mainToolWindowManager.Show(FileTreeViewWindowContent.THE_GUID), (s, e) => e.CanExecute = true, ModifierKeys.Control | ModifierKeys.Alt, Key.L); }
GoToCommand(IWpfCommandManager wpfCommandManager, IFileTabManager fileTabManager, IMessageBoxManager messageBoxManager) { this.fileTabManager = fileTabManager; this.messageBoxManager = messageBoxManager; var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_TEXTEDITOR_UICONTEXT); cmds.Add(GoToRoutedCommand, Execute, CanExecute, ModifierKeys.Control, Key.G); }
OpenFromGacCommandLoader(IOpenFromGAC openFromGAC, IWpfCommandManager wpfCommandManager) { this.openFromGAC = openFromGAC; var cmds = wpfCommandManager.GetCommands(ControlConstants.GUID_MAINWINDOW); cmds.Add(OpenFromGac, (s, e) => Execute(), (s, e) => e.CanExecute = true, ModifierKeys.Control | ModifierKeys.Shift, Key.O); }
ExceptionsContent(IWpfCommandManager wpfCommandManager, IThemeManager themeManager, Lazy<IExceptionsVM> exceptionsVM) { this.exceptionsControl = new ExceptionsControl(); this.vmExceptions = exceptionsVM; themeManager.ThemeChanged += ThemeManager_ThemeChanged; wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_EXCEPTIONS_CONTROL, exceptionsControl); wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_EXCEPTIONS_LISTVIEW, exceptionsControl.ListBox); }
CopyILBytesLoader(IWpfCommandManager wpfCommandManager, IFileTabManager fileTabManager, Lazy <IMethodAnnotations> methodAnnotations) { this.fileTabManager = fileTabManager; this.methodAnnotations = methodAnnotations; var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_TEXTEDITOR_UICONTEXT); cmds.Add(CopyILBytesCommand, CopyILBytesExecuted, CopyILBytesCanExecute, ModifierKeys.Control, Key.B); }
CommandLoader(IWpfCommandManager wpfCommandManager, EditILInstructionsCommand editILCmd) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_TEXTEDITOR_UICONTEXT); ICommand editILCmd2 = editILCmd; cmds.Add(EditILInstructionsCommand, (s, e) => editILCmd2.Execute(null), (s, e) => e.CanExecute = editILCmd2.CanExecute(null), ModifierKeys.Control, Key.E); }
ShowCSharpInteractiveCommandLoader(IWpfCommandManager wpfCommandManager, IMainToolWindowManager mainToolWindowManager) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); cmds.Add(ShowCSharpInteractiveRoutedCommand, (s, e) => mainToolWindowManager.Show(CSharpToolWindowContent.THE_GUID), (s, e) => e.CanExecute = true); cmds.Add(ShowCSharpInteractiveRoutedCommand, ModifierKeys.Control | ModifierKeys.Alt, Key.N); }
LocalsContent(IWpfCommandManager wpfCommandManager, IThemeManager themeManager, ILocalsVM localsVM) { this.localsControl = new LocalsControl(); this.vmLocals = localsVM; this.localsControl.DataContext = this.vmLocals; themeManager.ThemeChanged += ThemeManager_ThemeChanged; wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_LOCALS_CONTROL, localsControl); wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_LOCALS_LISTVIEW, localsControl.ListView); }
BreakpointsContentCommandLoader(IWpfCommandManager wpfCommandManager, CopyBreakpointCtxMenuCommand copyCmd, DeleteBreakpointCtxMenuCommand deleteCmd, GoToSourceBreakpointCtxMenuCommand gotoSrcCmd, GoToSourceNewTabBreakpointCtxMenuCommand gotoSrcNewTabCmd, ToggleEnableBreakpointCtxMenuCommand toggleBpCmd) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_DEBUGGER_BREAKPOINTS_LISTVIEW); cmds.Add(ApplicationCommands.Copy, new BreakpointCtxMenuCommandProxy(copyCmd)); cmds.Add(ApplicationCommands.Delete, new BreakpointCtxMenuCommandProxy(deleteCmd)); cmds.Add(new BreakpointCtxMenuCommandProxy(gotoSrcCmd), ModifierKeys.None, Key.Enter); cmds.Add(new BreakpointCtxMenuCommandProxy(gotoSrcNewTabCmd), ModifierKeys.Control, Key.Enter); cmds.Add(new BreakpointCtxMenuCommandProxy(gotoSrcNewTabCmd), ModifierKeys.Shift, Key.Enter); cmds.Add(new BreakpointCtxMenuCommandProxy(toggleBpCmd), ModifierKeys.None, Key.Space); }
ShowOutputWindowCommandLoader(IWpfCommandManager wpfCommandManager, IMainToolWindowManager mainToolWindowManager) { var cmds = wpfCommandManager.GetCommands(ControlConstants.GUID_MAINWINDOW); cmds.Add(ShowOutputWindowRoutedCommand, (s, e) => mainToolWindowManager.Show(OutputToolWindowContent.THE_GUID), (s, e) => e.CanExecute = true); cmds.Add(ShowOutputWindowRoutedCommand, ModifierKeys.Alt, Key.D2); }
SaveModuleCommandLoader(IWpfCommandManager wpfCommandManager, Lazy <IUndoCommandManager> undoCommandManager, Lazy <IDocumentSaver> documentSaver) { this.undoCommandManager = undoCommandManager; this.documentSaver = documentSaver; var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); cmds.Add(SaveAllCommand, (s, e) => SaveAll_Execute(), (s, e) => e.CanExecute = SaveAll_CanExecute, ModifierKeys.Control | ModifierKeys.Shift, Key.S); }
OpenFromGacCommandLoader(IFileTreeView fileTreeView, IAppWindow appWindow, IWpfCommandManager wpfCommandManager) { this.fileTreeView = fileTreeView; this.appWindow = appWindow; var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); cmds.Add(OpenFromGac, (s, e) => Execute(), (s, e) => e.CanExecute = true, ModifierKeys.Control | ModifierKeys.Shift, Key.O); }
ExceptionsContent(IWpfCommandManager wpfCommandManager, IThemeManager themeManager, Lazy <IExceptionsVM> exceptionsVM) { this.exceptionsControl = new ExceptionsControl(); this.vmExceptions = exceptionsVM; themeManager.ThemeChanged += ThemeManager_ThemeChanged; wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_EXCEPTIONS_CONTROL, exceptionsControl); wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_EXCEPTIONS_LISTVIEW, exceptionsControl.ListBox); }
ThreadsContentCommandLoader(IWpfCommandManager wpfCommandManager, CopyCallThreadsCtxMenuCommand copyCmd, SwitchToThreadThreadsCtxMenuCommand switchCmd, SwitchToThreadNewTabThreadsCtxMenuCommand switchNewTabCmd) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_DEBUGGER_THREADS_LISTVIEW); cmds.Add(ApplicationCommands.Copy, new ThreadsCtxMenuCommandProxy(copyCmd)); cmds.Add(new ThreadsCtxMenuCommandProxy(switchCmd), ModifierKeys.None, Key.Enter); cmds.Add(new ThreadsCtxMenuCommandProxy(switchNewTabCmd), ModifierKeys.Control, Key.Enter); cmds.Add(new ThreadsCtxMenuCommandProxy(switchNewTabCmd), ModifierKeys.Shift, Key.Enter); }
BreakpointsContent(IWpfCommandManager wpfCommandManager, Lazy <IBreakpointsVM> breakpointsVM, Lazy <IModuleLoader> moduleLoader, IFileTabManager fileTabManager) { this.breakpointsControl = new BreakpointsControl(); this.moduleLoader = moduleLoader; this.fileTabManager = fileTabManager; this.vmBreakpoints = breakpointsVM; wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_BREAKPOINTS_CONTROL, breakpointsControl); wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_BREAKPOINTS_LISTVIEW, breakpointsControl.ListView); }
UndoRedoCommmandLoader(IWpfCommandManager wpfCommandManager, Lazy<IUndoCommandManager> undoCommandManager, IAppWindow appWindow, IMessageBoxManager messageBoxManager) { this.undoCommandManager = undoCommandManager; this.messageBoxManager = messageBoxManager; var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); cmds.Add(UndoRoutedCommands.Undo, (s, e) => undoCommandManager.Value.Undo(), (s, e) => e.CanExecute = undoCommandManager.Value.CanUndo); cmds.Add(UndoRoutedCommands.Redo, (s, e) => undoCommandManager.Value.Redo(), (s, e) => e.CanExecute = undoCommandManager.Value.CanRedo); appWindow.MainWindowClosing += AppWindow_MainWindowClosing; }
CommandLoader(IWpfCommandManager wpfCommandManager, EditILInstructionsCommand editILCmd) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_TEXTEDITOR_UICONTEXT); ICommand editILCmd2 = editILCmd; cmds.Add(EditILInstructionsCommand, (s, e) => editILCmd2.Execute(null), (s, e) => e.CanExecute = editILCmd2.CanExecute(null), ModifierKeys.Control, Key.E); }
CommandLoader(IWpfCommandManager wpfCommandManager, EditBodyCommand editBodyCmd) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_DOCUMENTVIEWER_UICONTEXT); ICommand editBodyCmd2 = editBodyCmd; cmds.Add(EditBodyCommand, (s, e) => editBodyCmd2.Execute(null), (s, e) => e.CanExecute = editBodyCmd2.CanExecute(null), ModifierKeys.Control, Key.E); }
LocalsContent(IWpfCommandManager wpfCommandManager, IThemeManager themeManager, ILocalsVM localsVM) { this.localsControl = new LocalsControl(); this.vmLocals = localsVM; this.localsControl.DataContext = this.vmLocals; themeManager.ThemeChanged += ThemeManager_ThemeChanged; wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_LOCALS_CONTROL, localsControl); wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_LOCALS_LISTVIEW, localsControl.ListView); }
CommandLoader(IWpfCommandManager wpfCommandManager, MySettings mySettings) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_TEXTEDITOR_UICONTEXT); // This command will be added to all text editors cmds.Add(Option1Command, (s, e) => mySettings.BoolOption1 = !mySettings.BoolOption1, (s, e) => e.CanExecute = true, ModifierKeys.Control | ModifierKeys.Alt, Key.Q); }
CallStackContentCommandLoader(IWpfCommandManager wpfCommandManager, CopyCallStackCtxMenuCommand copyCmd, RunToCursorCallStackCtxMenuCommand runToCursorCmd, SwitchToFrameCallStackCtxMenuCommand switchToFrameCmd, SwitchToFrameNewTabCallStackCtxMenuCommand switchToFrameNewTabCmd) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_DEBUGGER_CALLSTACK_LISTVIEW); cmds.Add(ApplicationCommands.Copy, new CallStackCtxMenuCommandProxy(copyCmd)); cmds.Add(new CallStackCtxMenuCommandProxy(runToCursorCmd), ModifierKeys.Control, Key.F10); cmds.Add(new CallStackCtxMenuCommandProxy(switchToFrameCmd), ModifierKeys.None, Key.Enter); cmds.Add(new CallStackCtxMenuCommandProxy(switchToFrameNewTabCmd), ModifierKeys.Control, Key.Enter); cmds.Add(new CallStackCtxMenuCommandProxy(switchToFrameNewTabCmd), ModifierKeys.Shift, Key.Enter); }
BreakpointsContentCommandLoader(IWpfCommandManager wpfCommandManager, CopyBreakpointCtxMenuCommand copyCmd, DeleteBreakpointCtxMenuCommand deleteCmd, GoToSourceBreakpointCtxMenuCommand gotoSrcCmd, GoToSourceNewTabBreakpointCtxMenuCommand gotoSrcNewTabCmd, ToggleEnableBreakpointCtxMenuCommand toggleBpCmd) { var cmds = wpfCommandManager.GetCommands(ControlConstants.GUID_DEBUGGER_BREAKPOINTS_LISTVIEW); cmds.Add(ApplicationCommands.Copy, new BreakpointCtxMenuCommandProxy(copyCmd)); cmds.Add(ApplicationCommands.Delete, new BreakpointCtxMenuCommandProxy(deleteCmd)); cmds.Add(new BreakpointCtxMenuCommandProxy(gotoSrcCmd), ModifierKeys.None, Key.Enter); cmds.Add(new BreakpointCtxMenuCommandProxy(gotoSrcNewTabCmd), ModifierKeys.Control, Key.Enter); cmds.Add(new BreakpointCtxMenuCommandProxy(gotoSrcNewTabCmd), ModifierKeys.Shift, Key.Enter); cmds.Add(new BreakpointCtxMenuCommandProxy(toggleBpCmd), ModifierKeys.None, Key.Space); }
TextEditorUIContextCreator(IThemeManager themeManager, IImageManager imageManager, IWpfCommandManager wpfCommandManager, IMenuManager menuManager, ICodeToolTipManager codeToolTipManager, ITextEditorSettings textEditorSettings, ITextLineObjectManager textLineObjectManager, ITextEditorUIContextManagerImpl textEditorUIContextManagerImpl, IIconBarCommandManager iconBarCommandManager) { this.themeManager = themeManager; this.imageManager = imageManager; this.wpfCommandManager = wpfCommandManager; this.menuManager = menuManager; this.codeToolTipManager = codeToolTipManager; this.textEditorSettings = textEditorSettings; this.textLineObjectManager = textLineObjectManager; this.textEditorUIContextManagerImpl = textEditorUIContextManagerImpl; this.iconBarCommandManager = iconBarCommandManager; }
ExceptionsContentCommandLoader(IWpfCommandManager wpfCommandManager, Lazy <IExceptionsContent> exceptionsContent, CopyCallExceptionsCtxMenuCommand copyCmd, AddExceptionsCtxMenuCommand addExCmd, RemoveExceptionsCtxMenuCommand removeExCmd, ToggleEnableExceptionsCtxMenuCommand toggleExCmd) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_DEBUGGER_EXCEPTIONS_LISTVIEW); cmds.Add(ApplicationCommands.Copy, new ExceptionsCtxMenuCommandProxy(copyCmd)); cmds.Add(new ExceptionsCtxMenuCommandProxy(addExCmd), ModifierKeys.None, Key.Insert); cmds.Add(new ExceptionsCtxMenuCommandProxy(removeExCmd), ModifierKeys.None, Key.Delete); cmds.Add(new ExceptionsCtxMenuCommandProxy(toggleExCmd), ModifierKeys.None, Key.Space); cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_DEBUGGER_EXCEPTIONS_CONTROL); cmds.Add(new RelayCommand(a => exceptionsContent.Value.FocusSearchTextBox()), ModifierKeys.Control, Key.F); }
UndoRedoCommmandLoader(IWpfCommandManager wpfCommandManager, Lazy <IUndoCommandManager> undoCommandManager, IAppWindow appWindow, IMessageBoxManager messageBoxManager) { this.undoCommandManager = undoCommandManager; this.messageBoxManager = messageBoxManager; var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); cmds.Add(UndoRoutedCommands.Undo, (s, e) => undoCommandManager.Value.Undo(), (s, e) => e.CanExecute = undoCommandManager.Value.CanUndo); cmds.Add(UndoRoutedCommands.Redo, (s, e) => undoCommandManager.Value.Redo(), (s, e) => e.CanExecute = undoCommandManager.Value.CanRedo); appWindow.MainWindowClosing += AppWindow_MainWindowClosing; }
ShowCodeEditorCommandLoader(IWpfCommandManager wpfCommandManager, IFileTabManager fileTabManager) { var cmds = wpfCommandManager.GetCommands(ControlConstants.GUID_MAINWINDOW); cmds.Add(ShowCodeEditorRoutedCommand, (s, e) => fileTabManager.ActiveTab?.TrySetFocus(), (s, e) => e.CanExecute = fileTabManager.ActiveTab != null, ModifierKeys.Control | ModifierKeys.Alt, Key.D0, ModifierKeys.Control | ModifierKeys.Alt, Key.NumPad0, ModifierKeys.None, Key.F7); cmds.Add(ShowCodeEditorRoutedCommand, ModifierKeys.None, Key.Escape); }
CallStackContent(IWpfCommandManager wpfCommandManager, IThemeManager themeManager, ICallStackVM callStackVM, Lazy<IStackFrameManager> stackFrameManager, IFileTabManager fileTabManager, Lazy<IModuleLoader> moduleLoader) { this.callStackControl = new CallStackControl(); this.vmCallStack = callStackVM; this.stackFrameManager = stackFrameManager; this.fileTabManager = fileTabManager; this.moduleLoader = moduleLoader; this.callStackControl.DataContext = this.vmCallStack; this.callStackControl.CallStackListViewDoubleClick += CallStackControl_CallStackListViewDoubleClick; themeManager.ThemeChanged += ThemeManager_ThemeChanged; wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_CALLSTACK_CONTROL, callStackControl); wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_CALLSTACK_LISTVIEW, callStackControl.ListView); }
ThreadsContent(IWpfCommandManager wpfCommandManager, IThreadsVM threadsVM, IThemeManager themeManager, Lazy<IStackFrameManager> stackFrameManager, IFileTabManager fileTabManager, Lazy<IModuleLoader> moduleLoader) { this.stackFrameManager = stackFrameManager; this.fileTabManager = fileTabManager; this.moduleLoader = moduleLoader; this.threadsControl = new ThreadsControl(); this.vmThreads = threadsVM; this.threadsControl.DataContext = this.vmThreads; this.threadsControl.ThreadsListViewDoubleClick += ThreadsControl_ThreadsListViewDoubleClick; themeManager.ThemeChanged += ThemeManager_ThemeChanged; wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_THREADS_CONTROL, threadsControl); wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_THREADS_LISTVIEW, threadsControl.ListView); }
ModulesContent(IWpfCommandManager wpfCommandManager, IThemeManager themeManager, IModulesVM modulesVM, IFileTabManager fileTabManager, Lazy<ModuleLoader> moduleLoader, Lazy<IInMemoryModuleManager> inMemoryModuleManager) { this.modulesControl = new ModulesControl(); this.vmModules = modulesVM; this.fileTabManager = fileTabManager; this.moduleLoader = moduleLoader; this.inMemoryModuleManager = inMemoryModuleManager; this.modulesControl.DataContext = this.vmModules; this.modulesControl.ModulesListViewDoubleClick += ModulesControl_ModulesListViewDoubleClick; themeManager.ThemeChanged += ThemeManager_ThemeChanged; wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_MODULES_CONTROL, modulesControl); wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_MODULES_LISTVIEW, modulesControl.ListView); }
MemoryToolWindowContentCreator(IWpfCommandManager wpfCommandManager, IThemeManager themeManager, IMenuManager menuManager, IHexEditorSettings hexEditorSettings, Lazy<ITheDebugger> theDebugger, IAppSettings appSettings) { this.wpfCommandManager = wpfCommandManager; this.themeManager = themeManager; this.menuManager = menuManager; this.hexEditorSettings = hexEditorSettings; this.theDebugger = theDebugger; this.appSettings = appSettings; this.contents = new TWContent[MemoryWindowsHelper.NUMBER_OF_MEMORY_WINDOWS]; for (int i = 0; i < this.contents.Length; i++) { var tmpIndex = i; this.contents[i] = new TWContent(i, () => CreateContent(tmpIndex)); } }
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); } }
MemoryContentCommandLoader(IWpfCommandManager wpfCommandManager, MemoryToolWindowContentCreator memoryToolWindowContentCreator, IMainToolWindowManager mainToolWindowManager) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); for (int i = 0; i < DebugRoutedCommands.ShowMemoryCommands.Length; i++) { var info = memoryToolWindowContentCreator.Contents[i]; cmds.Add(DebugRoutedCommands.ShowMemoryCommands[i], new RelayCommand(a => mainToolWindowManager.Show(info.Guid))); } for (int i = 0; i < DebugRoutedCommands.ShowMemoryCommands.Length && i < 10; i++) { var cmd = DebugRoutedCommands.ShowMemoryCommands[i]; if (i == 0) cmds.Add(cmd, ModifierKeys.Alt, Key.D6); cmds.Add(cmd, ModifierKeys.Control | ModifierKeys.Alt, Key.D0 + (i + 1) % 10); } }
GoToTokenLoader(IWpfCommandManager wpfCommandManager, IFileTabManager fileTabManager) { this.fileTabManager = fileTabManager; var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_TEXTEDITOR_UICONTEXT); cmds.Add(GoToToken, (s, e) => GoToTokenCommand.ExecuteInternal(fileTabManager), (s, e) => e.CanExecute = GoToTokenCommand.CanExecuteInternal(fileTabManager), ModifierKeys.Control, Key.D); cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_FILE_TREEVIEW); cmds.Add(GoToToken, (s, e) => GoToTokenCommand.ExecuteInternal(fileTabManager), (s, e) => e.CanExecute = GoToTokenCommand.CanExecuteInternal(fileTabManager), ModifierKeys.Control, Key.D); }
FileTreeViewCreator(IThemeManager themeManager, ITreeViewManager treeViewManager, ILanguageManager languageManager, IFileManagerCreator fileManagerCreator, IFileTreeViewSettings fileTreeViewSettings, IMenuManager menuManager, IDotNetImageManager dotNetImageManager, IWpfCommandManager wpfCommandManager, IResourceNodeFactory resourceNodeFactory, IAppSettings appSettings, [ImportMany] IEnumerable<Lazy<IDnSpyFileNodeCreator, IDnSpyFileNodeCreatorMetadata>> dnSpyFileNodeCreators, [ImportMany] IEnumerable<Lazy<IFileTreeNodeDataFinder, IFileTreeNodeDataFinderMetadata>> mefFinders) { this.themeManager = themeManager; this.treeViewManager = treeViewManager; this.languageManager = languageManager; this.fileManagerCreator = fileManagerCreator; this.fileTreeViewSettings = fileTreeViewSettings; this.menuManager = menuManager; this.dotNetImageManager = dotNetImageManager; this.wpfCommandManager = wpfCommandManager; this.resourceNodeFactory = resourceNodeFactory; this.appSettings = appSettings; this.dnSpyFileNodeCreators = dnSpyFileNodeCreators.ToArray(); this.mefFinders = mefFinders.ToArray(); }
public MemoryContent(IWpfCommandManager wpfCommandManager, IThemeManager themeManager, IMenuManager menuManager, IHexEditorSettings hexEditorSettings, IMemoryVM memoryVM, IAppSettings appSettings) { this.memoryControl = new MemoryControl(); this.vmMemory = memoryVM; this.vmMemory.SetRefreshLines(() => this.memoryControl.DnHexBox.RedrawModifiedLines()); this.memoryControl.DataContext = this.vmMemory; var dnHexBox = new DnHexBox(menuManager, hexEditorSettings) { CacheLineBytes = true, IsMemory = true, }; dnHexBox.SetBinding(HexBox.DocumentProperty, "HexDocument"); this.memoryControl.DnHexBox = dnHexBox; dnHexBox.StartOffset = 0; dnHexBox.EndOffset = IntPtr.Size == 4 ? uint.MaxValue : ulong.MaxValue; appSettings.PropertyChanged += AppSettings_PropertyChanged; UpdateHexBoxRenderer(appSettings.UseNewRenderer_HexEditor); wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_MEMORY_CONTROL, memoryControl); wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_MEMORY_HEXBOX, memoryControl.DnHexBox); }
public ReplEditorUI(ReplEditorOptions options, IThemeManager themeManager, IWpfCommandManager wpfCommandManager, IMenuManager menuManager, ITextEditorSettings textEditorSettings) { this.dispatcher = Dispatcher.CurrentDispatcher; this.options = (options ?? new ReplEditorOptions()).Clone(); this.textEditor = new NewTextEditor(themeManager, textEditorSettings); this.textEditor.TextArea.AllowDrop = false; this.textEditor.TextArea.Document = new TextDocument(); this.textEditor.TextArea.Document.UndoStack.SizeLimit = 100; this.textEditor.TextArea.LeftMargins.Insert(0, new FrameworkElement { Margin = new Thickness(LEFT_MARGIN, 0, 0, 0) }); this.textEditor.TextArea.TextEntering += TextArea_TextEntering; this.textEditor.TextArea.PreviewKeyDown += TextArea_PreviewKeyDown; AddBinding(ApplicationCommands.Paste, (s, e) => Paste(), (s, e) => e.CanExecute = CanPaste && IsAtEditingPosition); AddBinding(ApplicationCommands.Cut, (s, e) => CutSelection(), (s, e) => e.CanExecute = CanCutSelection && IsAtEditingPosition); if (this.options.TextEditorCommandGuid != null) wpfCommandManager.Add(this.options.TextEditorCommandGuid.Value, textEditor); if (this.options.TextAreaCommandGuid != null) wpfCommandManager.Add(this.options.TextAreaCommandGuid.Value, textEditor.TextArea); if (this.options.MenuGuid != null) menuManager.InitializeContextMenu(this.textEditor, this.options.MenuGuid.Value, new GuidObjectsCreator(this), new ContextMenuInitializer(textEditor, textEditor)); }
DebugManagerCommandLoader(Lazy<DebugManager> debugManager, IWpfCommandManager wpfCommandManager) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); cmds.Add(DebugRoutedCommands.DebugCurrentAssembly, (s, e) => debugManager.Value.DebugCurrentAssembly(e.Parameter), (s, e) => e.CanExecute = debugManager.Value.CanDebugCurrentAssembly(e.Parameter)); cmds.Add(DebugRoutedCommands.DebugAssembly, (s, e) => debugManager.Value.DebugAssembly(), (s, e) => e.CanExecute = debugManager.Value.CanDebugAssembly); cmds.Add(DebugRoutedCommands.DebugCoreCLRAssembly, (s, e) => debugManager.Value.DebugCoreCLRAssembly(), (s, e) => e.CanExecute = debugManager.Value.CanDebugCoreCLRAssembly); cmds.Add(DebugRoutedCommands.StartWithoutDebugging, (s, e) => debugManager.Value.StartWithoutDebugging(), (s, e) => e.CanExecute = debugManager.Value.CanStartWithoutDebugging, ModifierKeys.Control, Key.F5); cmds.Add(DebugRoutedCommands.Attach, (s, e) => debugManager.Value.Attach(), (s, e) => e.CanExecute = debugManager.Value.CanAttach, ModifierKeys.Control | ModifierKeys.Alt, Key.P); cmds.Add(DebugRoutedCommands.Break, (s, e) => debugManager.Value.Break(), (s, e) => e.CanExecute = debugManager.Value.CanBreak, ModifierKeys.Control, Key.Cancel); cmds.Add(DebugRoutedCommands.Restart, (s, e) => debugManager.Value.Restart(), (s, e) => e.CanExecute = debugManager.Value.CanRestart, ModifierKeys.Control | ModifierKeys.Shift, Key.F5); cmds.Add(DebugRoutedCommands.Stop, (s, e) => debugManager.Value.Stop(), (s, e) => e.CanExecute = debugManager.Value.CanStop, ModifierKeys.Shift, Key.F5); cmds.Add(DebugRoutedCommands.Detach, (s, e) => debugManager.Value.Detach(), (s, e) => e.CanExecute = debugManager.Value.CanDetach); cmds.Add(DebugRoutedCommands.Continue, (s, e) => debugManager.Value.Continue(), (s, e) => e.CanExecute = debugManager.Value.CanContinue, ModifierKeys.None, Key.F5); cmds.Add(DebugRoutedCommands.StepInto, (s, e) => debugManager.Value.StepInto(), (s, e) => e.CanExecute = debugManager.Value.CanStepInto(), ModifierKeys.None, Key.F11); cmds.Add(DebugRoutedCommands.StepOver, (s, e) => debugManager.Value.StepOver(), (s, e) => e.CanExecute = debugManager.Value.CanStepOver(), ModifierKeys.None, Key.F10); cmds.Add(DebugRoutedCommands.StepOut, (s, e) => debugManager.Value.StepOut(), (s, e) => e.CanExecute = debugManager.Value.CanStepOut(), ModifierKeys.Shift, Key.F11); cmds.Add(DebugRoutedCommands.ShowNextStatement, (s, e) => debugManager.Value.ShowNextStatement(), (s, e) => e.CanExecute = debugManager.Value.CanShowNextStatement, ModifierKeys.Alt, Key.Multiply); cmds.Add(DebugRoutedCommands.SetNextStatement, (s, e) => debugManager.Value.SetNextStatement(e.Parameter), (s, e) => e.CanExecute = debugManager.Value.CanSetNextStatement(e.Parameter), ModifierKeys.Control | ModifierKeys.Shift, Key.F10); cmds.Add(DebugRoutedCommands.Continue, (s, e) => debugManager.Value.DebugAssembly(), (s, e) => e.CanExecute = debugManager.Value.CanDebugAssembly, ModifierKeys.None, Key.F5); cmds.Add(DebugRoutedCommands.StepInto, (s, e) => debugManager.Value.DebugAssembly(), (s, e) => e.CanExecute = debugManager.Value.CanDebugAssembly, ModifierKeys.None, Key.F11); cmds.Add(DebugRoutedCommands.StepOver, (s, e) => debugManager.Value.DebugAssembly(), (s, e) => e.CanExecute = debugManager.Value.CanDebugAssembly, ModifierKeys.None, Key.F10); }
AppWindow(IThemeManager themeManager, IImageManager imageManager, IAppSettings appSettings, ISettingsManager settingsManager, IFileTabManager fileTabManager, AppToolBar appToolBar, MainWindowControl mainWindowControl, IWpfCommandManager wpfCommandManager, ILanguageManager languageManager) { this.assemblyInformationalVersion = CalculateAssemblyInformationalVersion(GetType().Assembly); this.uiSettings = new UISettings(settingsManager); this.uiSettings.Read(); this.appSettings = appSettings; this.stackedContent = new StackedContent<IStackedContentChild>(margin: new Thickness(6)); this.themeManager = themeManager; themeManager.ThemeChanged += ThemeManager_ThemeChanged; this.imageManager = imageManager; this.fileTabManager = fileTabManager; this.statusBar = new AppStatusBar(); this.appToolBar = appToolBar; this.mainWindowControl = mainWindowControl; this.wpfCommandManager = wpfCommandManager; this.languageManager = languageManager; this.mainWindowCommands = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); this.mainWindowClosing = new WeakEventList<CancelEventArgs>(); this.mainWindowClosed = new WeakEventList<EventArgs>(); this.appSettings.PropertyChanged += AppSettings_PropertyChanged; InitializeTextFormatterProvider(); }
AnalyzeCommandLoader(IMainToolWindowManager mainToolWindowManager, IWpfCommandManager wpfCommandManager, IFileTabManager fileTabManager, Lazy<IAnalyzerManager> analyzerManager, ILanguageManager languageManager) { this.mainToolWindowManager = mainToolWindowManager; this.fileTabManager = fileTabManager; this.analyzerManager = analyzerManager; this.languageManager = languageManager; var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_TEXTEDITOR_UICONTEXT); cmds.Add(AnalyzeRoutedCommand, TextEditor_Executed, TextEditor_CanExecute, ModifierKeys.Control, Key.R); cmds.Add(AnalyzeRoutedCommand, ShowAnalyzerExecuted, ShowAnalyzerCanExecute, ModifierKeys.Control, Key.R); cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_FILE_TREEVIEW); cmds.Add(AnalyzeRoutedCommand, FileTreeView_Executed, FileTreeView_CanExecute, ModifierKeys.Control, Key.R); cmds.Add(AnalyzeRoutedCommand, ShowAnalyzerExecuted, ShowAnalyzerCanExecute, ModifierKeys.Control, Key.R); cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_ANALYZER_TREEVIEW); cmds.Add(AnalyzeRoutedCommand, AnalyzerTreeView_Executed, AnalyzerTreeView_CanExecute, ModifierKeys.Control, Key.R); cmds.Add(AnalyzeRoutedCommand, ShowAnalyzerExecuted, ShowAnalyzerCanExecute, ModifierKeys.Control, Key.R); cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_SEARCH_LISTBOX); cmds.Add(AnalyzeRoutedCommand, SearchListBox_Executed, SearchListBox_CanExecute, ModifierKeys.Control, Key.R); cmds.Add(AnalyzeRoutedCommand, ShowAnalyzerExecuted, ShowAnalyzerCanExecute, ModifierKeys.Control, Key.R); }
ShowCodeEditorCommandLoader(IWpfCommandManager wpfCommandManager, IFileTabManager fileTabManager) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); cmds.Add(ShowCodeEditorRoutedCommand, (s, e) => { var tab = fileTabManager.ActiveTab; if (tab != null) tab.TrySetFocus(); }, (s, e) => e.CanExecute = fileTabManager.ActiveTab != null, ModifierKeys.Control | ModifierKeys.Alt, Key.D0, ModifierKeys.Control | ModifierKeys.Alt, Key.NumPad0, ModifierKeys.None, Key.F7); cmds.Add(ShowCodeEditorRoutedCommand, ModifierKeys.None, Key.Escape); }
OpenFromGacCommandLoader(IFileTreeView fileTreeView, IAppWindow appWindow, IWpfCommandManager wpfCommandManager) { this.fileTreeView = fileTreeView; this.appWindow = appWindow; var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); cmds.Add(OpenFromGac, (s, e) => Execute(), (s, e) => e.CanExecute = true, ModifierKeys.Control | ModifierKeys.Shift, Key.O); }
CommandLoader(IWpfCommandManager wpfCommandManager, IFileTabManager fileTabManager, DeleteFieldDefCommand.EditMenuCommand removeCmd, DeleteFieldDefCommand.CodeCommand removeCmd2, FieldDefSettingsCommand.EditMenuCommand settingsCmd, FieldDefSettingsCommand.CodeCommand settingsCmd2) { wpfCommandManager.AddRemoveCommand(removeCmd); wpfCommandManager.AddRemoveCommand(removeCmd2, fileTabManager); wpfCommandManager.AddSettingsCommand(fileTabManager, settingsCmd, settingsCmd2); }
ToolWindowLoader(IWpfCommandManager wpfCommandManager, IMainToolWindowManager mainToolWindowManager) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); cmds.Add(OpenToolWindow, new RelayCommand(a => mainToolWindowManager.Show(ToolWindowContent.THE_GUID))); cmds.Add(OpenToolWindow, ModifierKeys.Control | ModifierKeys.Alt, Key.Z); }
GoToCommand(IWpfCommandManager wpfCommandManager, IFileTabManager fileTabManager, IMessageBoxManager messageBoxManager) { this.fileTabManager = fileTabManager; this.messageBoxManager = messageBoxManager; var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_TEXTEDITOR_UICONTEXT); cmds.Add(GoToRoutedCommand, Execute, CanExecute, ModifierKeys.Control, Key.G); }
CopyILBytesLoader(IWpfCommandManager wpfCommandManager, IFileTabManager fileTabManager, Lazy<IMethodAnnotations> methodAnnotations) { this.fileTabManager = fileTabManager; this.methodAnnotations = methodAnnotations; var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_TEXTEDITOR_UICONTEXT); cmds.Add(CopyILBytesCommand, CopyILBytesExecuted, CopyILBytesCanExecute, ModifierKeys.Control, Key.B); }
SearchToolCommandLoader(IMainToolWindowManager mainToolWindowManager, Lazy<SearchToolWindowContentCreator> searchToolWindowContentCreator, IWpfCommandManager wpfCommandManager) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_SEARCH_CONTROL); cmds.Add(new RelayCommand(a => mainToolWindowManager.Close(searchToolWindowContentCreator.Value.SearchToolWindowContent)), ModifierKeys.None, Key.Escape); }