2021-10-07 20:38:38 +02:00
|
|
|
|
using System.ComponentModel;
|
2021-07-09 11:03:30 +02:00
|
|
|
|
|
2021-11-10 21:24:39 +01:00
|
|
|
|
namespace EliteBGS.Util {
|
2021-07-09 11:03:30 +02:00
|
|
|
|
public class AppConfig : INotifyPropertyChanged {
|
|
|
|
|
private static readonly string default_journal_location = "%UserProfile%\\Saved Games\\Frontier Developments\\Elite Dangerous";
|
|
|
|
|
private string journal_location = default_journal_location;
|
|
|
|
|
private bool useeddb = false;
|
2022-01-22 09:19:16 +01:00
|
|
|
|
private string lastdiscordlog;
|
2021-07-09 11:03:30 +02:00
|
|
|
|
|
|
|
|
|
public string DefaultJournalLocation => default_journal_location;
|
|
|
|
|
|
|
|
|
|
public bool UseEDDB {
|
|
|
|
|
get => useeddb;
|
|
|
|
|
set {
|
|
|
|
|
useeddb = value;
|
|
|
|
|
FirePropertyChanged("UseEDDB");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-22 09:19:16 +01:00
|
|
|
|
public string LastUsedDiscordTemplate {
|
|
|
|
|
get => lastdiscordlog;
|
|
|
|
|
set {
|
|
|
|
|
lastdiscordlog = value;
|
|
|
|
|
FirePropertyChanged("LastUsedDiscordTemplate");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-09 11:03:30 +02:00
|
|
|
|
public string JournalLocation {
|
2021-11-10 21:24:39 +01:00
|
|
|
|
get {
|
2021-07-09 11:03:30 +02:00
|
|
|
|
if (journal_location == null) {
|
|
|
|
|
return DefaultJournalLocation;
|
|
|
|
|
}
|
|
|
|
|
return journal_location;
|
|
|
|
|
}
|
|
|
|
|
set {
|
|
|
|
|
journal_location = value;
|
|
|
|
|
FirePropertyChanged("JournalLocation");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void FirePropertyChanged(string property) {
|
|
|
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(property));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
|
}
|
|
|
|
|
}
|