From ae9f50354e10c55daf4877bc72b89cb492f9678d Mon Sep 17 00:00:00 2001 From: Jakob Date: Mon, 3 Apr 2023 20:57:46 +0200 Subject: [PATCH] set verbose default for debug --- EnvyUpdate/Debug.cs | 6 ++++++ EnvyUpdate/MainWindow.xaml.cs | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/EnvyUpdate/Debug.cs b/EnvyUpdate/Debug.cs index c0b6a5f..01e98b9 100644 --- a/EnvyUpdate/Debug.cs +++ b/EnvyUpdate/Debug.cs @@ -9,7 +9,13 @@ namespace EnvyUpdate class Debug { public static bool isFake = false; +#if DEBUG + public static bool isVerbose = true; +#else public static bool isVerbose = false; +#endif + + public static string debugFile = Path.Combine(GlobalVars.exedirectory, "envyupdate.log"); public static int LoadFakeIDs(string idType) diff --git a/EnvyUpdate/MainWindow.xaml.cs b/EnvyUpdate/MainWindow.xaml.cs index b10aa50..d7f1ab3 100644 --- a/EnvyUpdate/MainWindow.xaml.cs +++ b/EnvyUpdate/MainWindow.xaml.cs @@ -37,9 +37,8 @@ namespace EnvyUpdate // This is necessary, since .NET throws an exception if you check for a non-existant arg. } - if (arguments.Contains("/verbose")) + if (Debug.isVerbose) { - Debug.isVerbose = true; if (!File.Exists(Debug.debugFile)) File.CreateText(Debug.debugFile); File.AppendAllText(Debug.debugFile, "INFO Starting EnvyUpdate, version " + System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).FileVersion);