-
This commit is contained in:
@@ -17,13 +17,14 @@ namespace mpvConfEdit
|
||||
{
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public string MpvConfPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\mpv\\mpv.conf";
|
||||
public string MpvNetConfPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\mpv\\mpvnet.conf";
|
||||
private List<SettingBase> MpvSettingsDefinitions = Settings.LoadSettings(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\mpvConf.toml");
|
||||
private List<SettingBase> MpvNetSettingsDefinitions = Settings.LoadSettings(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\mpvNetConf.toml");
|
||||
public ObservableCollection<string> FilterStrings { get; } = new ObservableCollection<string>();
|
||||
private Dictionary<string, Dictionary<string, string>> Comments = new Dictionary<string, Dictionary<string, string>>();
|
||||
|
||||
public ObservableCollection<string> FilterStrings { get; } = new ObservableCollection<string>();
|
||||
public string MpvConfPath { get; } = MpvConfFolder + "mpv.conf";
|
||||
public string MpvNetConfPath { get; } = MpvConfFolder + "mpvnet.conf";
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -36,6 +37,24 @@ namespace mpvConfEdit
|
||||
SetDarkTheme();
|
||||
}
|
||||
|
||||
static string StartupFolder { get; } = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\";
|
||||
|
||||
static string _MpvConfFolder;
|
||||
|
||||
public static string MpvConfFolder {
|
||||
get {
|
||||
if (_MpvConfFolder == null)
|
||||
{
|
||||
if (Directory.Exists(StartupFolder + "portable_config"))
|
||||
_MpvConfFolder = StartupFolder + "portable_config\\";
|
||||
else
|
||||
_MpvConfFolder = Environment.GetFolderPath(
|
||||
Environment.SpecialFolder.ApplicationData) + "\\mpv\\";
|
||||
}
|
||||
return _MpvConfFolder;
|
||||
}
|
||||
}
|
||||
|
||||
public Brush Foreground2 {
|
||||
get { return (Brush)GetValue(Foreground2Property); }
|
||||
set { SetValue(Foreground2Property, value); }
|
||||
|
||||
Reference in New Issue
Block a user