EDBGS/EliteBGS/Util/AppConfig.cs

62 lines
1.7 KiB
C#
Raw Normal View History

2023-02-23 20:57:28 +01:00
using Newtonsoft.Json;
2022-11-24 19:38:19 +01:00
namespace EliteBGS.Util {
public class AppConfig {
2022-11-24 19:38:19 +01:00
private static readonly string default_journal_location = "%UserProfile%\\Saved Games\\Frontier Developments\\Elite Dangerous";
private string journal_location = default_journal_location;
public string DefaultJournalLocation => default_journal_location;
2023-02-23 20:57:28 +01:00
private string colour = "Amber";
private string theme = "Dark";
2022-11-24 19:38:19 +01:00
public string LastUsedDiscordTemplate { get; set; }
2022-11-24 19:38:19 +01:00
public string JournalLocation {
get {
if (journal_location == null) {
return DefaultJournalLocation;
}
return journal_location;
}
set {
journal_location = value;
}
}
public string Theme {
get {
return theme;
}
set {
if (string.IsNullOrEmpty(value)) {
theme = "Dark";
} else {
theme = value;
}
}
}
public string Colour {
get {
return colour;
}
set {
if (string.IsNullOrEmpty(value)) {
colour = "Blue";
} else {
colour = value;
}
}
2022-11-24 19:38:19 +01:00
}
/// <summary>
/// Whether we ignore influence support scenarios form parsing.
/// </summary>
public bool IgnoreInfluenceSupport { get; set; } = false;
2023-02-23 20:57:28 +01:00
[JsonIgnore]
public string FullTheme {
get { return Theme + "." + Colour; }
}
2022-11-24 19:38:19 +01:00
}
}