This commit is contained in:
2025-11-08 17:31:17 +01:00
parent 3e6b70bc4c
commit 3de764b833
5 changed files with 23 additions and 49 deletions

View File

@@ -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);