LocalsContentCommandLoader(IWpfCommandManager wpfCommandManager, Lazy <ITheDebugger> theDebugger, Lazy <ILocalsContent> localsContent, IMemoryWindowManager memoryWindowManager, CopyLocalsCtxMenuCommand copyCmd, EditValueLocalsCtxMenuCommand editValueCmd, CopyValueLocalsCtxMenuCommand copyValueCmd, ToggleCollapsedLocalsCtxMenuCommand toggleCollapsedCmd, ShowInMemoryLocalsCtxMenuCommand showInMemCmd) { var cmds = wpfCommandManager.GetCommands(ControlConstants.GUID_DEBUGGER_LOCALS_LISTVIEW); cmds.Add(ApplicationCommands.Copy, new LocalsCtxMenuCommandProxy(copyCmd)); cmds.Add(new LocalsCtxMenuCommandProxy(editValueCmd), ModifierKeys.None, Key.F2); cmds.Add(new LocalsCtxMenuCommandProxy(copyValueCmd), ModifierKeys.Control | ModifierKeys.Shift, Key.C); cmds.Add(new LocalsCtxMenuCommandProxy(toggleCollapsedCmd), ModifierKeys.None, Key.Enter); cmds.Add(new LocalsCtxMenuCommandProxy(showInMemCmd), ModifierKeys.Control, Key.X); for (int i = 0; i < Memory.MemoryWindowsHelper.NUMBER_OF_MEMORY_WINDOWS && i < 10; i++) { cmds.Add(new LocalsCtxMenuCommandProxy(new ShowInMemoryWindowLocalsCtxMenuCommand(theDebugger, localsContent, memoryWindowManager, i)), ModifierKeys.Control, Key.D0 + (i + 1) % 10); } }
ShowInMemoryLocalsCtxMenuCommand(Lazy <ITheDebugger> theDebugger, Lazy <ILocalsContent> localsContent, IMemoryWindowManager memoryWindowManager) : base(theDebugger, localsContent) { this.memoryWindowManager = memoryWindowManager; }
public ShowInMemoryWindowLocalsCtxMenuCommand(Lazy <ITheDebugger> theDebugger, Lazy <ILocalsContent> localsContent, IMemoryWindowManager memoryWindowManager, int windowIndex) : base(theDebugger, localsContent) { this.memoryWindowManager = memoryWindowManager; this.windowIndex = windowIndex; }
ShowInMemoryXLocalsSubCtxMenuCommand(Lazy <ITheDebugger> theDebugger, Lazy <ILocalsContent> localsContent, IMemoryWindowManager memoryWindowManager) : base(theDebugger, localsContent) { subCmds = new Tuple <IMenuItem, string, string> [MemoryWindowsHelper.NUMBER_OF_MEMORY_WINDOWS]; for (int i = 0; i < subCmds.Length; i++) { subCmds[i] = Tuple.Create((IMenuItem) new ShowInMemoryWindowLocalsCtxMenuCommand(theDebugger, localsContent, memoryWindowManager, i), MemoryWindowsHelper.GetHeaderText(i), MemoryWindowsHelper.GetCtrlInputGestureText(i)); } }