29 lines
736 B
C#
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>();
|
|
} |