From deeaf6aaceb22d39de38be219abff7504cc80734 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Wed, 9 Oct 2019 19:48:52 -0700 Subject: [PATCH] New colors supported by PS7 --- .../Session/Host/EditorServicesPSHost.cs | 22 +++++++++++++++++++ .../Host/EditorServicesPSHostUserInterface.cs | 3 +++ 2 files changed, 25 insertions(+) diff --git a/src/PowerShellEditorServices/Services/PowerShellContext/Session/Host/EditorServicesPSHost.cs b/src/PowerShellEditorServices/Services/PowerShellContext/Session/Host/EditorServicesPSHost.cs index 39604452b..7eab3458d 100644 --- a/src/PowerShellEditorServices/Services/PowerShellContext/Session/Host/EditorServicesPSHost.cs +++ b/src/PowerShellEditorServices/Services/PowerShellContext/Session/Host/EditorServicesPSHost.cs @@ -89,6 +89,28 @@ internal ConsoleColorProxy(EditorServicesPSHostUserInterface hostUserInterface) _hostUserInterface = hostUserInterface; } + /// + /// The Accent Color for Formatting + /// + public ConsoleColor FormatAccentColor + { + get + { return _hostUserInterface.FormatAccentColor; } + set + { _hostUserInterface.FormatAccentColor = value; } + } + + /// + /// The Accent Color for Error + /// + public ConsoleColor ErrorAccentColor + { + get + { return _hostUserInterface.ErrorAccentColor; } + set + { _hostUserInterface.ErrorAccentColor = value; } + } + /// /// The ForegroundColor for Error /// diff --git a/src/PowerShellEditorServices/Services/PowerShellContext/Session/Host/EditorServicesPSHostUserInterface.cs b/src/PowerShellEditorServices/Services/PowerShellContext/Session/Host/EditorServicesPSHostUserInterface.cs index 685f812a8..edd9f3879 100644 --- a/src/PowerShellEditorServices/Services/PowerShellContext/Session/Host/EditorServicesPSHostUserInterface.cs +++ b/src/PowerShellEditorServices/Services/PowerShellContext/Session/Host/EditorServicesPSHostUserInterface.cs @@ -789,6 +789,9 @@ private void WriteDebuggerBanner(DebuggerStopEventArgs eventArgs) internal static ConsoleColor BackgroundColor { get; set; } + internal ConsoleColor FormatAccentColor { get; set; } = ConsoleColor.Green; + internal ConsoleColor ErrorAccentColor { get; set; } = ConsoleColor.Cyan; + internal ConsoleColor ErrorForegroundColor { get; set; } = ConsoleColor.Red; internal ConsoleColor ErrorBackgroundColor { get; set; } = BackgroundColor;