using Newtonsoft.Json;
using System.Collections.Generic;
using System.ComponentModel;
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;
private string colour = "Amber";
private string theme = "Dark";
public static string DefaultJournalLocation => default_journal_location;
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;
}
}
}
///
/// Whether we ignore influence support scenarios form parsing.
///
public bool IgnoreInfluenceSupport { get; set; } = false;
///
/// Whether we ignore market buy entries during parsing.
///
public bool IgnoreMarketBuy { get; set; } = false;
///
/// Whether to ignore fleet carrier stuff when parsing.
///
public bool IgnoreFleetCarrier { get; set; } = true;
///
/// List of Webhooks configured
///
public List Webhooks { get; set; } = new List();
[JsonIgnore]
public string FullTheme {
get { return Theme + "." + Colour; }
}
}