diff --git a/ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.Designer.cs b/ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.Designer.cs index 29e4b2d..e3b441e 100644 --- a/ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.Designer.cs +++ b/ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.Designer.cs @@ -56,5 +56,17 @@ namespace ModpackUpdater.Apps.Client.Gui.LangRes { return ResourceManager.GetString("UpdateAvailable_Title", resourceCulture); } } + + public static string ErrorWhileUpdate_Title { + get { + return ResourceManager.GetString("ErrorWhileUpdate_Title", resourceCulture); + } + } + + public static string ErrorWhileUpdate { + get { + return ResourceManager.GetString("ErrorWhileUpdate", resourceCulture); + } + } } } diff --git a/ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.resx b/ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.resx index c3aaeeb..f8b87e9 100644 --- a/ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.resx +++ b/ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.resx @@ -124,4 +124,10 @@ If you confirm, the update will be installed automatically within a few seconds. New program version available + + Error while updating + + + An error happened while updating the program. Error message:\n{0} + \ No newline at end of file diff --git a/ModpackUpdater.Apps.Client.Gui/MainForm.axaml.cs b/ModpackUpdater.Apps.Client.Gui/MainForm.axaml.cs index 90d5ceb..55aa8f3 100644 --- a/ModpackUpdater.Apps.Client.Gui/MainForm.axaml.cs +++ b/ModpackUpdater.Apps.Client.Gui/MainForm.axaml.cs @@ -312,8 +312,9 @@ public partial class MainForm : Window { await UpdateApp(); } - catch + catch (Exception ex) { + await MessageBoxManager.GetMessageBoxStandard(MsgBoxLangRes.UpdateAvailable_Title, string.Format(MsgBoxLangRes.UpdateAvailable, ex.Message), ButtonEnum.YesNo, MsBox.Avalonia.Enums.Icon.Info).ShowAsync(); IsEnabled = true; } #endif diff --git a/ModpackUpdater.Apps.Client.Gui/ModpackUpdater.Apps.Client.Gui.csproj b/ModpackUpdater.Apps.Client.Gui/ModpackUpdater.Apps.Client.Gui.csproj index 77a23ff..62363c2 100644 --- a/ModpackUpdater.Apps.Client.Gui/ModpackUpdater.Apps.Client.Gui.csproj +++ b/ModpackUpdater.Apps.Client.Gui/ModpackUpdater.Apps.Client.Gui.csproj @@ -88,7 +88,7 @@ All - +