This commit is contained in:
Frank Skare
2019-04-23 16:23:06 +02:00
parent 2415e2ed43
commit efd2ddf367
14 changed files with 218 additions and 114 deletions

View File

@@ -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); }

View File

@@ -12,7 +12,7 @@ using System.Windows;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("mpv(.net) conf edit")]
[assembly: AssemblyCopyright("Copyright © 2017-2019 stax76")]
[assembly: AssemblyCopyright("Copyright © 2017-2019 Frank Skare (stax76)")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -51,5 +51,5 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.8.0.0")]
[assembly: AssemblyFileVersion("1.8.0.0")]
[assembly: AssemblyVersion("1.9.0.0")]
[assembly: AssemblyFileVersion("1.9.0.0")]