update
This commit is contained in:
@@ -12,7 +12,6 @@ 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();
|
||||
|
||||
@@ -25,7 +24,6 @@ public static class Program
|
||||
[STAThread]
|
||||
internal static void Main(string[] args)
|
||||
{
|
||||
AppGlobals.Initialize();
|
||||
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,11 +7,8 @@ using ModpackUpdater.Apps.Manager.Api;
|
||||
using ModpackUpdater.Apps.Manager.Api.Model;
|
||||
using ModpackUpdater.Apps.Manager.Api.Plugins.Features;
|
||||
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
|
||||
using ModpackUpdater.Apps.Manager.LangRes;
|
||||
using ModpackUpdater.Apps.Manager.Settings;
|
||||
using ModpackUpdater.Apps.Manager.Ui.Models.MainWindow;
|
||||
using MsBox.Avalonia;
|
||||
using MsBox.Avalonia.Enums;
|
||||
using Pilz.Extensions;
|
||||
using Pilz.Features;
|
||||
using Pilz.UI.AvaloniaUI.Features;
|
||||
|
||||
@@ -23,7 +23,7 @@ public class AppUpdates(string updateUrl, Window mainWindow)
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await MessageBoxManager.GetMessageBoxStandard(MsgBoxLangRes.UpdateAvailable_Title, string.Format(MsgBoxLangRes.UpdateAvailable, ex.Message), ButtonEnum.YesNo, MsBox.Avalonia.Enums.Icon.Info).ShowWindowAsync();
|
||||
await MessageBoxManager.GetMessageBoxStandard(GeneralMsgBoxLangRes.UpdateAvailable_Title, string.Format(GeneralMsgBoxLangRes.UpdateAvailable, ex.Message), ButtonEnum.YesNo, MsBox.Avalonia.Enums.Icon.Info).ShowWindowAsync();
|
||||
mainWindow.IsEnabled = true;
|
||||
}
|
||||
#endif
|
||||
@@ -41,7 +41,7 @@ public class AppUpdates(string updateUrl, Window mainWindow)
|
||||
};
|
||||
|
||||
if (await updater.CheckForUpdate() is {} packageToInstall
|
||||
&& await MessageBoxManager.GetMessageBoxStandard(MsgBoxLangRes.UpdateAvailable_Title, MsgBoxLangRes.UpdateAvailable, ButtonEnum.YesNo, MsBox.Avalonia.Enums.Icon.Info).ShowWindowDialogAsync(mainWindow) == ButtonResult.Yes)
|
||||
&& await MessageBoxManager.GetMessageBoxStandard(GeneralMsgBoxLangRes.UpdateAvailable_Title, GeneralMsgBoxLangRes.UpdateAvailable, ButtonEnum.YesNo, MsBox.Avalonia.Enums.Icon.Info).ShowWindowDialogAsync(mainWindow) == ButtonResult.Yes)
|
||||
{
|
||||
OnDownloadProgramUpdate?.Invoke(this, EventArgs.Empty);
|
||||
mainWindow.IsEnabled = false;
|
||||
|
||||
@@ -14,21 +14,21 @@ namespace ModpackUpdater.Apps {
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class MsgBoxLangRes {
|
||||
internal class GeneralMsgBoxLangRes {
|
||||
|
||||
private static System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal MsgBoxLangRes() {
|
||||
internal GeneralMsgBoxLangRes() {
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static System.Resources.ResourceManager ResourceManager {
|
||||
internal static System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.Equals(null, resourceMan)) {
|
||||
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("ModpackUpdater.Apps.LangRes.MsgBoxLangRes", typeof(MsgBoxLangRes).Assembly);
|
||||
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("ModpackUpdater.Apps.LangRes.GeneralMsgBoxLangRes", typeof(GeneralMsgBoxLangRes).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
@@ -36,7 +36,7 @@ namespace ModpackUpdater.Apps {
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static System.Globalization.CultureInfo Culture {
|
||||
internal static System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
@@ -45,25 +45,25 @@ namespace ModpackUpdater.Apps {
|
||||
}
|
||||
}
|
||||
|
||||
public static string UpdateAvailable {
|
||||
internal static string UpdateAvailable {
|
||||
get {
|
||||
return ResourceManager.GetString("UpdateAvailable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string UpdateAvailable_Title {
|
||||
internal static string UpdateAvailable_Title {
|
||||
get {
|
||||
return ResourceManager.GetString("UpdateAvailable_Title", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ErrorWhileUpdate_Title {
|
||||
internal static string ErrorWhileUpdate_Title {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorWhileUpdate_Title", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ErrorWhileUpdate {
|
||||
internal static string ErrorWhileUpdate {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorWhileUpdate", resourceCulture);
|
||||
}
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Symbols\*.svg" />
|
||||
<EmbeddedResource Update="LangRes\MsgBoxLangRes.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<EmbeddedResource Update="LangRes\GeneralMsgBoxLangRes.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>MsgBoxLangRes.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
@@ -43,10 +43,10 @@
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>GeneralLangRes.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="LangRes\MsgBoxLangRes.Designer.cs">
|
||||
<Compile Update="LangRes\GeneralMsgBoxLangRes.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>MsgBoxLangRes.resx</DependentUpon>
|
||||
<DependentUpon>GeneralMsgBoxLangRes.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="LangRes\MsgBoxLangRes.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
|
||||
Reference in New Issue
Block a user