diff --git a/src/Shared/Sucrose.Shared.Watchdog/DarkErrorMessageBox.xaml.cs b/src/Shared/Sucrose.Shared.Watchdog/DarkErrorMessageBox.xaml.cs index c100f68a2..1ff814d3d 100644 --- a/src/Shared/Sucrose.Shared.Watchdog/DarkErrorMessageBox.xaml.cs +++ b/src/Shared/Sucrose.Shared.Watchdog/DarkErrorMessageBox.xaml.cs @@ -16,19 +16,22 @@ public partial class DarkErrorMessageBox : Window { private static string Path = string.Empty; private static string Text = string.Empty; - private static string Address = string.Empty; + private static string Source = string.Empty; - public DarkErrorMessageBox(string ErrorMessage, string LogPath, string HelpAddress = null, string HelpText = null) + public DarkErrorMessageBox(string ErrorMessage, string LogPath, string HelpSource = null, string HelpText = null) { InitializeComponent(); Path = LogPath; Text = HelpText; - Address = HelpAddress; + Source = HelpSource; SystemSounds.Hand.Play(); - Help_Button.Content = Text ?? Help_Button.Content; + if (!string.IsNullOrEmpty(Source)) + { + Help_Button.Content = Text; + } Error_Message.Text += Environment.NewLine + ErrorMessage; @@ -42,13 +45,13 @@ private void ShowButton_Click(object sender, RoutedEventArgs e) private void HelpButton_Click(object sender, RoutedEventArgs e) { - if (string.IsNullOrEmpty(Address)) + if (string.IsNullOrEmpty(Source)) { SSSHP.Run(SSSMI.Commandog, $"{SMR.StartCommand}{SSDECT.Wiki}{SMR.ValueSeparator}{SMR.WikiWebsite}"); } else { - SSSHP.Run(SSSMI.Commandog, $"{SMR.StartCommand}{SSDECT.Wiki}{SMR.ValueSeparator}{Address}"); + SSSHP.Run(SSSMI.Commandog, $"{SMR.StartCommand}{SSDECT.Wiki}{SMR.ValueSeparator}{Source}"); } } diff --git a/src/Shared/Sucrose.Shared.Watchdog/LightErrorMessageBox.xaml.cs b/src/Shared/Sucrose.Shared.Watchdog/LightErrorMessageBox.xaml.cs index 62b1d5a4e..7e5e4baa1 100644 --- a/src/Shared/Sucrose.Shared.Watchdog/LightErrorMessageBox.xaml.cs +++ b/src/Shared/Sucrose.Shared.Watchdog/LightErrorMessageBox.xaml.cs @@ -14,19 +14,22 @@ public partial class LightErrorMessageBox : Window { private static string Path = string.Empty; private static string Text = string.Empty; - private static string Address = string.Empty; + private static string Source = string.Empty; - public LightErrorMessageBox(string ErrorMessage, string LogPath, string HelpAddress = null, string HelpText = null) + public LightErrorMessageBox(string ErrorMessage, string LogPath, string HelpSource = null, string HelpText = null) { InitializeComponent(); Path = LogPath; Text = HelpText; - Address = HelpAddress; + Source = HelpSource; SystemSounds.Hand.Play(); - Help_Button.Content = Text ?? Help_Button.Content; + if (!string.IsNullOrEmpty(Source)) + { + Help_Button.Content = Text; + } Error_Message.Text += Environment.NewLine + ErrorMessage; } @@ -38,13 +41,13 @@ private void ShowButton_Click(object sender, RoutedEventArgs e) private void HelpButton_Click(object sender, RoutedEventArgs e) { - if (string.IsNullOrEmpty(Address)) + if (string.IsNullOrEmpty(Source)) { SSSHP.Run(SSSMI.Commandog, $"{SMR.StartCommand}{SSDECT.Wiki}{SMR.ValueSeparator}{SMR.WikiWebsite}"); } else { - SSSHP.Run(SSSMI.Commandog, $"{SMR.StartCommand}{SSDECT.Wiki}{SMR.ValueSeparator}{Address}"); + SSSHP.Run(SSSMI.Commandog, $"{SMR.StartCommand}{SSDECT.Wiki}{SMR.ValueSeparator}{Source}"); } } diff --git a/src/Update/Sucrose.Update/App.xaml.cs b/src/Update/Sucrose.Update/App.xaml.cs index f346955f7..1251018f5 100644 --- a/src/Update/Sucrose.Update/App.xaml.cs +++ b/src/Update/Sucrose.Update/App.xaml.cs @@ -125,18 +125,24 @@ protected void Message(string Message) { HasError = false; + string Source = SUMI.Source; string Path = SMMI.UpdateLogManager.LogFile(); + string Text = SSRER.GetValue("Update", "HelpText"); switch (SUMM.Theme) { case SEWTT.Dark: - SSWDEMB DarkMessageBox = new(Message, Path, SUMI.Source, SSRER.GetValue("Update", "HelpText")); - DarkMessageBox.Topmost = true; + SSWDEMB DarkMessageBox = new(Message, Path, Source, Text) + { + Topmost = true + }; DarkMessageBox.ShowDialog(); break; default: - SSWLEMB LightMessageBox = new(Message, Path, SUMI.Source, SSRER.GetValue("Update", "HelpText")); - LightMessageBox.Topmost = true; + SSWLEMB LightMessageBox = new(Message, Path, Source, Text) + { + Topmost = true + }; LightMessageBox.ShowDialog(); break; }