diff --git a/ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.Designer.cs b/ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.Designer.cs
index 3ad2d8e..29e4b2d 100644
--- a/ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.Designer.cs
+++ b/ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.Designer.cs
@@ -1,10 +1,9 @@
//------------------------------------------------------------------------------
//
-// Dieser Code wurde von einem Tool generiert.
-// Laufzeitversion:4.0.30319.42000
+// This code was generated by a tool.
//
-// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
-// der Code erneut generiert wird.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
//
//------------------------------------------------------------------------------
@@ -12,46 +11,32 @@ namespace ModpackUpdater.Apps.Client.Gui.LangRes {
using System;
- ///
- /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
- ///
- // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
- // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
- // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
- // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class MsgBoxLangRes {
- private static global::System.Resources.ResourceManager resourceMan;
+ private static System.Resources.ResourceManager resourceMan;
- private static global::System.Globalization.CultureInfo resourceCulture;
+ private static System.Globalization.CultureInfo resourceCulture;
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal MsgBoxLangRes() {
}
- ///
- /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- public static global::System.Resources.ResourceManager ResourceManager {
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static System.Resources.ResourceManager ResourceManager {
get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ModpackUpdater.Apps.Client.Gui.LangRes.MsgBoxLangRes", typeof(MsgBoxLangRes).Assembly);
+ if (object.Equals(null, resourceMan)) {
+ System.Resources.ResourceManager temp = new System.Resources.ResourceManager("ModpackUpdater.Apps.Client.Gui.LangRes.MsgBoxLangRes", typeof(MsgBoxLangRes).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
- ///
- /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
- /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- public static global::System.Globalization.CultureInfo Culture {
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
@@ -60,18 +45,12 @@ namespace ModpackUpdater.Apps.Client.Gui.LangRes {
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die A new version of this program is available. If you confirm, the update will be installed automatically. It takes just a few seconds. Continue? ähnelt.
- ///
public static string UpdateAvailable {
get {
return ResourceManager.GetString("UpdateAvailable", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die New program version available ähnelt.
- ///
public static string UpdateAvailable_Title {
get {
return ResourceManager.GetString("UpdateAvailable_Title", resourceCulture);
diff --git a/ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.resx b/ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.resx
index 2b0fc36..c3aaeeb 100644
--- a/ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.resx
+++ b/ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.resx
@@ -118,7 +118,8 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- A new version of this program is available. If you confirm, the update will be installed automatically. It takes just a few seconds. Continue?
+ A new version of this program is available! Install now?
+If you confirm, the update will be installed automatically within a few seconds.
New program version available
diff --git a/ModpackUpdater.Apps.Client.Gui/MainForm.axaml.cs b/ModpackUpdater.Apps.Client.Gui/MainForm.axaml.cs
index 6b69c3e..a33d57e 100644
--- a/ModpackUpdater.Apps.Client.Gui/MainForm.axaml.cs
+++ b/ModpackUpdater.Apps.Client.Gui/MainForm.axaml.cs
@@ -7,15 +7,10 @@ using Avalonia.Platform.Storage;
using Avalonia.Threading;
using ModpackUpdater.Apps.Client.Gui.LangRes;
using ModpackUpdater.Manager;
-using MsBox.Avalonia;
-using MsBox.Avalonia.Enums;
-using Pilz;
using Pilz.Extensions;
-using Pilz.Runtime;
using Pilz.SymbolPacks.Sets;
using Pilz.UI.AvaloniaUI.Symbols;
using Pilz.UI.Symbols;
-using Pilz.Updating.Client;
namespace ModpackUpdater.Apps.Client.Gui;
@@ -266,11 +261,9 @@ public partial class MainForm : Window
private async void MainForm_Loaded(object? sender, RoutedEventArgs e)
{
-#if !DISABLE_UPDATE
-#if !DEBUG
+#if !DISABLE_UPDATE && !DEBUG
try
{
-#endif
var myAppPath = EnvironmentEx.ProcessPath!;
var updater = new UpdateClient(Program.UpdateUrl, Assembly.GetEntryAssembly()!.GetAppVersion(), AppChannel.Stable)
{
@@ -292,13 +285,12 @@ public partial class MainForm : Window
}
IsEnabled = true;
}
-#if !DEBUG
}
- catch
+ catch (Exception ex)
{
+ await MessageBoxManager.GetMessageBoxStandard("error", ex.ToString(), ButtonEnum.Ok, MsBox.Avalonia.Enums.Icon.Error).ShowWindowDialogAsync(this);
IsEnabled = true;
}
-#endif
#endif
CheckStatusAndUpdate(true);
diff --git a/ModpackUpdater.Apps.Client.Gui/ModpackUpdater.Apps.Client.Gui.csproj b/ModpackUpdater.Apps.Client.Gui/ModpackUpdater.Apps.Client.Gui.csproj
index 022fb50..bbe54ac 100644
--- a/ModpackUpdater.Apps.Client.Gui/ModpackUpdater.Apps.Client.Gui.csproj
+++ b/ModpackUpdater.Apps.Client.Gui/ModpackUpdater.Apps.Client.Gui.csproj
@@ -63,7 +63,7 @@
-
+
diff --git a/ModpackUpdater.Apps.Client.Gui/Program.cs b/ModpackUpdater.Apps.Client.Gui/Program.cs
index 34fa069..ec99e14 100644
--- a/ModpackUpdater.Apps.Client.Gui/Program.cs
+++ b/ModpackUpdater.Apps.Client.Gui/Program.cs
@@ -1,6 +1,7 @@
using Avalonia;
using Castle.Core.Logging;
using Newtonsoft.Json;
+using Pilz;
using Pilz.Configuration;
namespace ModpackUpdater.Apps.Client.Gui;
@@ -11,6 +12,7 @@ public static class Program
private static readonly SettingsManager settingsManager;
+ public static string ProcessPath = EnvironmentEx.ProcessPath!;
public static ISettings Settings => settingsManager.Instance;
public static ILogger Log { get; } = new ConsoleLogger();