public void CreateConsole(IWpfConsoleService consoleService) { _consoleService = consoleService; _console = _consoleService.CreateConsole(ServiceLocator.PackageServiceProvider, DebugConsoleToolWindow.ContentType, "nugetdebug"); _console.StartWritingOutput(); IVsTextView view = _console.VsTextView as IVsTextView; var adapterFactory = ServiceLocator.GetInstance <IVsEditorAdaptersFactoryService>(); IWpfTextView wpfView = adapterFactory.GetWpfTextView(view); // adjust the view options if (wpfView != null) { wpfView.Options.SetOptionValue(DefaultTextViewOptions.WordWrapStyleId, WordWrapStyles.None); Brush blackBg = Brushes.Black; blackBg.Freeze(); wpfView.Background = blackBg; } UIElement element = _console.Content as UIElement; _debugWindow.DebugGrid.Children.Add(element); // Add message sources AttachEvents(); }
public ApexTestConsole(IWpfConsole WpfConsole) { _wpfConsole = WpfConsole; }
public ApexTestConsole(IWpfConsole WpfConsole, PowerConsoleToolWindow consoleWindow) { _wpfConsole = WpfConsole ?? throw new ArgumentNullException(nameof(WpfConsole)); _consoleWindow = consoleWindow ?? throw new ArgumentNullException(nameof(consoleWindow)); }
public void CreateConsole(IWpfConsoleService consoleService) { _consoleService = consoleService; _console = _consoleService.CreateConsole(ServiceLocator.PackageServiceProvider, DebugConsoleToolWindow.ContentType, "nugetdebug"); _console.StartWritingOutput(); IVsTextView view = _console.VsTextView as IVsTextView; var adapterFactory = ServiceLocator.GetInstance<IVsEditorAdaptersFactoryService>(); IWpfTextView wpfView = adapterFactory.GetWpfTextView(view); // adjust the view options if (wpfView != null) { wpfView.Options.SetOptionValue(DefaultTextViewOptions.WordWrapStyleId, WordWrapStyles.None); Brush blackBg = Brushes.Black; blackBg.Freeze(); wpfView.Background = blackBg; } UIElement element = _console.Content as UIElement; _debugWindow.DebugGrid.Children.Add(element); // Add message sources AttachEvents(); }