ShowCSharpInteractiveCommandLoader(IWpfCommandService wpfCommandService, IDsToolWindowService toolWindowService) { var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_MAINWINDOW); cmds.Add(ShowCSharpInteractiveRoutedCommand, (s, e) => toolWindowService.Show(CSharpToolWindowContent.THE_GUID), (s, e) => e.CanExecute = true); cmds.Add(ShowCSharpInteractiveRoutedCommand, ModifierKeys.Control | ModifierKeys.Alt, Key.N); }
public void OnNewArgs(IAppCommandLineArgs args) { bool show = false; var loc = GetSearchLocation(args.SearchIn); var typ = GetSearchType(args.SearchFor); if (!(loc is null)) { show = true; searchService.Value.SearchLocation = loc.Value; } if (!(typ is null)) { show = true; searchService.Value.SearchType = typ.Value; } if (!(args.SearchText is null)) { show = true; searchService.Value.SearchText = args.SearchText; } if (show) { toolWindowService.Show(SearchToolWindowContent.THE_GUID); } }
CallStackCommandLoader(IWpfCommandService wpfCommandService, IDsToolWindowService toolWindowService) { var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_MAINWINDOW); cmds.Add(DebugRoutedCommands.ShowExceptions, new RelayCommand(a => toolWindowService.Show(ExceptionsToolWindowContent.THE_GUID))); cmds.Add(DebugRoutedCommands.ShowExceptions, ModifierKeys.Control | ModifierKeys.Alt, Key.E); }
ToolWindowLoader(IWpfCommandService wpfCommandService, IDsToolWindowService toolWindowService) { var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_MAINWINDOW); cmds.Add(OpenToolWindow, new RelayCommand(a => toolWindowService.Show(ToolWindowContentImpl.THE_GUID))); cmds.Add(OpenToolWindow, ModifierKeys.Control | ModifierKeys.Alt, Key.Z); }
ShowDocumentTreeViewCommandLoader(IWpfCommandService wpfCommandService, IDsToolWindowService toolWindowService) { wpfCommandService.GetCommands(ControlConstants.GUID_MAINWINDOW).Add( ShowDocumentTreeViewRoutedCommand, (s, e) => toolWindowService.Show(DocumentTreeViewWindowContent.THE_GUID), (s, e) => e.CanExecute = true, ModifierKeys.Control | ModifierKeys.Alt, Key.L); }
ShowOutputWindowCommandLoader(IWpfCommandService wpfCommandService, IDsToolWindowService toolWindowService) { var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_MAINWINDOW); cmds.Add(ShowOutputWindowRoutedCommand, (s, e) => toolWindowService.Show(OutputToolWindowContent.THE_GUID), (s, e) => e.CanExecute = true); cmds.Add(ShowOutputWindowRoutedCommand, ModifierKeys.Alt, Key.D2); }
ShowVisualBasicInteractiveCommandLoader(IWpfCommandService wpfCommandService, IDsToolWindowService toolWindowService) { var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_MAINWINDOW); cmds.Add(ShowVisualBasicInteractiveRoutedCommand, (s, e) => toolWindowService.Show(VisualBasicToolWindowContent.THE_GUID), (s, e) => e.CanExecute = true); cmds.Add(ShowVisualBasicInteractiveRoutedCommand, ModifierKeys.Control | ModifierKeys.Alt, Key.I); }
public static void Analyze(IDsToolWindowService toolWindowService, Lazy <IAnalyzerService> analyzerService, IDecompiler decompiler, IMemberRef member) { var memberDef = ResolveReference(member); var type = memberDef as TypeDef; if (type != null) { toolWindowService.Show(AnalyzerToolWindowContent.THE_GUID); analyzerService.Value.Add(new TypeNode(type)); } var field = memberDef as FieldDef; if (field != null) { toolWindowService.Show(AnalyzerToolWindowContent.THE_GUID); analyzerService.Value.Add(new FieldNode(field)); } var method = memberDef as MethodDef; if (method != null) { toolWindowService.Show(AnalyzerToolWindowContent.THE_GUID); analyzerService.Value.Add(new MethodNode(method)); } var propertyAnalyzer = PropertyNode.TryCreateAnalyzer(member, decompiler); if (propertyAnalyzer != null) { toolWindowService.Show(AnalyzerToolWindowContent.THE_GUID); analyzerService.Value.Add(propertyAnalyzer); } var eventAnalyzer = EventNode.TryCreateAnalyzer(member, decompiler); if (eventAnalyzer != null) { toolWindowService.Show(AnalyzerToolWindowContent.THE_GUID); analyzerService.Value.Add(eventAnalyzer); } }
MemoryContentCommandLoader(IWpfCommandService wpfCommandService, MemoryToolWindowContentProvider memoryToolWindowContentProvider, IDsToolWindowService toolWindowService) { var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_MAINWINDOW); for (int i = 0; i < DebugRoutedCommands.ShowMemoryCommands.Length; i++) { var info = memoryToolWindowContentProvider.Contents[i]; cmds.Add(DebugRoutedCommands.ShowMemoryCommands[i], new RelayCommand(a => toolWindowService.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.Shift, Key.D0 + (i + 1) % 10); } }
BreakpointsCommandLoader(IWpfCommandService wpfCommandService, Lazy <BreakpointService> breakpointService, IDsToolWindowService toolWindowService) { var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_MAINWINDOW); cmds.Add(DebugRoutedCommands.DeleteAllBreakpoints, (s, e) => breakpointService.Value.ClearAskUser(), (s, e) => e.CanExecute = breakpointService.Value.CanClear, ModifierKeys.Control | ModifierKeys.Shift, Key.F9); cmds.Add(DebugRoutedCommands.ToggleBreakpoint, (s, e) => breakpointService.Value.ToggleBreakpoint(), (s, e) => e.CanExecute = breakpointService.Value.CanToggleBreakpoint, ModifierKeys.None, Key.F9); cmds.Add(DebugRoutedCommands.DisableBreakpoint, (s, e) => breakpointService.Value.DisableBreakpoint(), (s, e) => e.CanExecute = breakpointService.Value.CanDisableBreakpoint, ModifierKeys.Control, Key.F9); cmds.Add(DebugRoutedCommands.DisableAllBreakpoints, (s, e) => breakpointService.Value.DisableAllBreakpoints(), (s, e) => e.CanExecute = breakpointService.Value.CanDisableAllBreakpoints); cmds.Add(DebugRoutedCommands.EnableAllBreakpoints, (s, e) => breakpointService.Value.EnableAllBreakpoints(), (s, e) => e.CanExecute = breakpointService.Value.CanEnableAllBreakpoints); cmds.Add(DebugRoutedCommands.ShowBreakpoints, new RelayCommand(a => toolWindowService.Show(BreakpointsToolWindowContent.THE_GUID))); cmds.Add(DebugRoutedCommands.ShowBreakpoints, ModifierKeys.Control | ModifierKeys.Alt, Key.B); cmds.Add(DebugRoutedCommands.ShowBreakpoints, ModifierKeys.Alt, Key.F9); }
public void OnNewArgs(IAppCommandLineArgs args) { foreach (var info in GetToolWindowInfos(args.HideToolWindow)) { toolWindowService.Close(info.Guid); } foreach (var info in GetToolWindowInfos(args.ShowToolWindow)) { var content = toolWindowService.Show(info.Guid, info.Location); Debug.Assert(content != null); if (content == null) { continue; } if (info.Location == null) { continue; } if (toolWindowService.CanMove(content, info.Location.Value)) { toolWindowService.Move(content, info.Location.Value); } } }
MemoryContentCommandLoader(IWpfCommandService wpfCommandService, MemoryToolWindowContentProvider memoryToolWindowContentProvider, IDsToolWindowService toolWindowService) { var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_MAINWINDOW); for (int i = 0; i < DebugRoutedCommands.ShowMemoryCommands.Length; i++) { var info = memoryToolWindowContentProvider.Contents[i]; cmds.Add(DebugRoutedCommands.ShowMemoryCommands[i], new RelayCommand(a => toolWindowService.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.Shift, Key.D0 + (i + 1) % 10); } }
void Search(object sender, ExecutedRoutedEventArgs e) => toolWindowService.Show(SearchToolWindowContent.THE_GUID);
public override void ShowOutput() { toolWindowService.Show(new Guid("90A45E97-727E-4F31-8692-06E19218D99A")); uiDispatcher.UIBackground(() => outputService.Value.Select(Logger.OutputLogger.GUID_OUTPUT_LOGGER_DEBUG)); }
public override void ShowBookmarkWindow() => toolWindowService.Show(ToolWindows.Bookmarks.BookmarksToolWindowContent.THE_GUID);
ToolWindowLoader(IWpfCommandService wpfCommandService, IDsToolWindowService toolWindowService) { var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_MAINWINDOW); cmds.Add(OpenToolWindow, new RelayCommand(a => toolWindowService.Show(ToolWindowContentImpl.THE_GUID))); cmds.Add(OpenToolWindow, ModifierKeys.Control | ModifierKeys.Alt, Key.Z); }
void ShowInMemoryWindow(MemoryToolWindowContent mc, HexSpan span) { MakeSureAddressCanBeShown(mc, span); toolWindowService.Show(mc); SelectAndMoveCaret(mc.HexView, span); }
ShowDocumentTreeViewCommandLoader(IWpfCommandService wpfCommandService, IDsToolWindowService toolWindowService) { wpfCommandService.GetCommands(ControlConstants.GUID_MAINWINDOW).Add( ShowDocumentTreeViewRoutedCommand, (s, e) => toolWindowService.Show(DocumentTreeViewWindowContent.THE_GUID), (s, e) => e.CanExecute = true, ModifierKeys.Control | ModifierKeys.Alt, Key.L); }
ShowOutputWindowCommandLoader(IWpfCommandService wpfCommandService, IDsToolWindowService toolWindowService) { var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_MAINWINDOW); cmds.Add(ShowOutputWindowRoutedCommand, (s, e) => toolWindowService.Show(OutputToolWindowContent.THE_GUID), (s, e) => e.CanExecute = true); cmds.Add(ShowOutputWindowRoutedCommand, ModifierKeys.Alt, Key.D2); }
void ShowInMemoryWindow(MemoryToolWindowContent mc, ulong addr, ulong size) { MakeSureAddressCanBeShown(mc, addr, size); toolWindowService.Show(mc); mc.DnHexBox.SelectAndMoveCaret(addr, size); }
void ShowAnalyzerExecuted(object sender, ExecutedRoutedEventArgs e) => toolWindowService.Show(AnalyzerToolWindowContent.THE_GUID);
public static void Analyze(IDsToolWindowService toolWindowService, Lazy<IAnalyzerService> analyzerService, IDecompiler decompiler, IMemberRef member) { var memberDef = ResolveReference(member); var type = memberDef as TypeDef; if (type != null) { toolWindowService.Show(AnalyzerToolWindowContent.THE_GUID); analyzerService.Value.Add(new TypeNode(type)); } var field = memberDef as FieldDef; if (field != null) { toolWindowService.Show(AnalyzerToolWindowContent.THE_GUID); analyzerService.Value.Add(new FieldNode(field)); } var method = memberDef as MethodDef; if (method != null) { toolWindowService.Show(AnalyzerToolWindowContent.THE_GUID); analyzerService.Value.Add(new MethodNode(method)); } var propertyAnalyzer = PropertyNode.TryCreateAnalyzer(member, decompiler); if (propertyAnalyzer != null) { toolWindowService.Show(AnalyzerToolWindowContent.THE_GUID); analyzerService.Value.Add(propertyAnalyzer); } var eventAnalyzer = EventNode.TryCreateAnalyzer(member, decompiler); if (eventAnalyzer != null) { toolWindowService.Show(AnalyzerToolWindowContent.THE_GUID); analyzerService.Value.Add(eventAnalyzer); } }