2023-02-23 20:57:28 +01:00
|
|
|
|
using Newtonsoft.Json;
|
2022-11-24 19:38:19 +01:00
|
|
|
|
|
|
|
|
|
namespace EliteBGS.Util {
|
2023-02-22 20:39:40 +01:00
|
|
|
|
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";
|
2023-02-22 20:39:40 +01:00
|
|
|
|
private string theme = "Dark";
|
2022-11-24 19:38:19 +01:00
|
|
|
|
|
2023-02-22 20:39:40 +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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-22 20:39:40 +01:00
|
|
|
|
public string Theme {
|
|
|
|
|
get {
|
|
|
|
|
return theme;
|
|
|
|
|
}
|
|
|
|
|
set {
|
|
|
|
|
if (string.IsNullOrEmpty(value)) {
|
|
|
|
|
theme = "Dark";
|
|
|
|
|
} else {
|
|
|
|
|
theme = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-03-29 18:40:36 +02:00
|
|
|
|
|
2023-02-22 20:39:40 +01:00
|
|
|
|
public string Colour {
|
|
|
|
|
get {
|
|
|
|
|
return colour;
|
|
|
|
|
}
|
|
|
|
|
set {
|
|
|
|
|
if (string.IsNullOrEmpty(value)) {
|
|
|
|
|
colour = "Blue";
|
|
|
|
|
} else {
|
|
|
|
|
colour = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-11-24 19:38:19 +01:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-29 18:40:36 +02: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]
|
2023-02-22 20:39:40 +01:00
|
|
|
|
public string FullTheme {
|
|
|
|
|
get { return Theme + "." + Colour; }
|
|
|
|
|
}
|
2022-11-24 19:38:19 +01:00
|
|
|
|
}
|
|
|
|
|
}
|