Files
minecraft-modpack-updater/ModpackUpdater.Apps.Client.Gui/AppConfig.cs
2025-11-20 06:49:21 +01:00

29 lines
736 B
C#

using Newtonsoft.Json;
using Pilz.Configuration;
namespace ModpackUpdater.Apps.Client.Gui;
public class AppConfig : ISettingsNode, ISettingsIdentifier
{
public static string Identifier => "pilz.appconfig";
public List<string> RecentMinecraftProfilePaths { get; } = [];
[JsonProperty, Obsolete]
private string? LastMinecraftProfilePath
{
get => RecentMinecraftProfilePaths.FirstOrDefault();
set
{
if (!string.IsNullOrWhiteSpace(value))
RecentMinecraftProfilePaths.Insert(0, value);
}
}
public void Reset()
{
RecentMinecraftProfilePaths.Clear();
}
public static AppConfig Instance => Program.Settings.Get<AppConfig>();
}