diff --git a/URLNotesGrabberCORE/DataAccess.cs b/URLNotesGrabberCORE/DataAccess.cs index 2900f4d..dbaf486 100644 --- a/URLNotesGrabberCORE/DataAccess.cs +++ b/URLNotesGrabberCORE/DataAccess.cs @@ -1836,7 +1836,6 @@ namespace URLNotesGrabberCORE { SaveState(); _activeKey = key; - Console.ForegroundColor = key.ParsedColor; return key; } @@ -1856,7 +1855,6 @@ namespace URLNotesGrabberCORE } _activeKey = key; - Console.ForegroundColor = key.ParsedColor; return key; } diff --git a/URLNotesGrabberCORE/Program.cs b/URLNotesGrabberCORE/Program.cs index 6d45c80..67feb29 100644 --- a/URLNotesGrabberCORE/Program.cs +++ b/URLNotesGrabberCORE/Program.cs @@ -15,6 +15,10 @@ namespace URLNotesGrabberCORE static void Main(string[] args) { + // Reset console color on exit (including Ctrl+C) + Console.CancelKeyPress += (s, e) => Console.ResetColor(); + AppDomain.CurrentDomain.ProcessExit += (s, e) => Console.ResetColor(); + IConfiguration config = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: false)