57 lines
1.5 KiB
C#
57 lines
1.5 KiB
C#
using Newtonsoft.Json;
|
|
|
|
namespace EliteBGS.Util {
|
|
public class AppConfig {
|
|
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;
|
|
private string colour = "Amber";
|
|
private string theme = "Dark";
|
|
|
|
public string LastUsedDiscordTemplate { get; set; }
|
|
|
|
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;
|
|
}
|
|
}
|
|
}
|
|
|
|
[JsonIgnore]
|
|
public string FullTheme {
|
|
get { return Theme + "." + Colour; }
|
|
}
|
|
}
|
|
}
|