Files
minecraft-modpack-updater/ModpackUpdater.Apps.Client.Gui/AppConfig.cs

28 lines
675 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
{
set
{
if (!string.IsNullOrWhiteSpace(value))
RecentMinecraftProfilePaths.Insert(0, value);
}
}
public void Reset()
{
RecentMinecraftProfilePaths.Clear();
}
public static AppConfig Instance => Program.Settings.Get<AppConfig>();
}