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);
            }
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }
示例#5
0
 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);
        }
示例#8
0
        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);
            }
        }
示例#9
0
		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);
			}
		}
示例#10
0
        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);
         }
     }
 }
示例#12
0
        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);
            }
        }
示例#13
0
 void Search(object sender, ExecutedRoutedEventArgs e) => toolWindowService.Show(SearchToolWindowContent.THE_GUID);
示例#14
0
 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);
示例#16
0
		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);
		}
示例#17
0
 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);
		}
示例#20
0
 void ShowInMemoryWindow(MemoryToolWindowContent mc, ulong addr, ulong size)
 {
     MakeSureAddressCanBeShown(mc, addr, size);
     toolWindowService.Show(mc);
     mc.DnHexBox.SelectAndMoveCaret(addr, size);
 }
示例#21
0
 void ShowAnalyzerExecuted(object sender, ExecutedRoutedEventArgs e) =>
 toolWindowService.Show(AnalyzerToolWindowContent.THE_GUID);
示例#22
0
		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);
			}
		}