From e3a34fa9665415e7a9db556b5d48a62dd068e0bd Mon Sep 17 00:00:00 2001 From: WeeXnes Date: Sat, 7 Oct 2023 16:03:45 +0200 Subject: [PATCH] fixed crash on launch during debugging --- WeeXnes/App.xaml.cs | 7 ++++--- WeeXnes/Core/CustomConsole.cs | 12 ++++++------ WeeXnes/Core/Global.cs | 2 +- WeeXnes/WeeXnes.csproj | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/WeeXnes/App.xaml.cs b/WeeXnes/App.xaml.cs index 9dae338..6e625e6 100644 --- a/WeeXnes/App.xaml.cs +++ b/WeeXnes/App.xaml.cs @@ -127,12 +127,12 @@ namespace WeeXnes { Game newGame = Game.Methods.GameFromIni(new INIFile(file.FullName)); DiscordRPCView.Data.Games.Add(newGame); - WeeXnes.Core.CustomConsole.WriteLine(file.Name + " loaded"); + WeeXnes.Core.CustomConsole.WriteLine(file.Name + " loaded -> " + newGame.ProcessName); } catch (Exception ex) { WeeXnes.Core.CustomConsole.Error(file.Name + ": " + ex.Message); - MessageBox.Show(file.Name + ": " + ex.Message); + new FluentMessageBox(file.Name + ": " + ex.Message).ShowDialog(); } } Functions.CheckFolderAndCreate(Global.AppDataPathKEY.Value); @@ -153,12 +153,13 @@ namespace WeeXnes ); newItem.Filename = file.Name; KeyManagerView.Data.KeyItemsList.Add(newItem); - WeeXnes.Core.CustomConsole.WriteLine(file.Name + " loaded"); + WeeXnes.Core.CustomConsole.WriteLine(file.Name + " loaded -> " + newItem.Name); } catch (Exception ex) { WeeXnes.Core.CustomConsole.Error(file.Name + ": " + ex.Message); + new FluentMessageBox(file.Name + ": " + ex.Message).ShowDialog(); } } } diff --git a/WeeXnes/Core/CustomConsole.cs b/WeeXnes/Core/CustomConsole.cs index 2d8e6d1..e046aa4 100644 --- a/WeeXnes/Core/CustomConsole.cs +++ b/WeeXnes/Core/CustomConsole.cs @@ -21,11 +21,11 @@ namespace WeeXnes.Core public static class Formatting { - public static string success_char = ""; - public static string warning_char = ""; - public static string info_char = ""; - public static string error_char = ""; - public static string writeline_char = ""; + public static string success_char = "✓"; + public static string warning_char = "⌬"; + public static string info_char = "◈"; + public static string error_char = "☓"; + public static string writeline_char = "•"; } } @@ -37,7 +37,7 @@ namespace WeeXnes.Core if(!App.DebugMode) return; - VanillaConsole.OutputEncoding = Encoding.UTF8; + //VanillaConsole.OutputEncoding = Encoding.UTF8; ConsoleColor prevColor = VanillaConsole.BackgroundColor; ConsoleColor prevForeColor = VanillaConsole.ForegroundColor; diff --git a/WeeXnes/Core/Global.cs b/WeeXnes/Core/Global.cs index f62f9f0..b4ac403 100644 --- a/WeeXnes/Core/Global.cs +++ b/WeeXnes/Core/Global.cs @@ -8,7 +8,7 @@ namespace WeeXnes.Core { public class Information { - public const string Version = "4.4.5"; + public const string Version = "4.4.6"; public const string EncryptionHash = "8zf5#RdyQ]$4x4_"; public const string ApiUrl = "https://api.github.com/repos/weexnes/weexnessuite/releases/latest"; } diff --git a/WeeXnes/WeeXnes.csproj b/WeeXnes/WeeXnes.csproj index 73e7bbc..f3928d1 100644 --- a/WeeXnes/WeeXnes.csproj +++ b/WeeXnes/WeeXnes.csproj @@ -4,7 +4,7 @@ Debug AnyCPU - 4.4.5 + 4.4.6 {4B33CEE7-C74D-43B9-B99A-8B273D5195BC} WinExe WeeXnes