-
This commit is contained in:
21
LICENSE.txt
21
LICENSE.txt
@@ -1,10 +1,21 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2017 stax76
|
Copyright (c) 2017-2019 Frank Skare (stax76)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and ssociated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
a copy of this software and ssociated documentation files (the "Software"),
|
||||||
|
to deal in the Software without restriction, including without limitation
|
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included
|
||||||
|
in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||||
|
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||||
|
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
24
README.md
24
README.md
@@ -20,8 +20,8 @@ Table of contents
|
|||||||
### Features
|
### Features
|
||||||
|
|
||||||
- Customizable context menu defined in the same file as the key bindings
|
- Customizable context menu defined in the same file as the key bindings
|
||||||
- Searchable options dialog with modern UI as mpv compatible standalone application
|
- Searchable config dialog with modern UI
|
||||||
- Searchable input (key/mouse) binding editor with modern UI as mpv compatible standalone application
|
- Searchable input (key/mouse) binding editor with modern UI
|
||||||
- Modern UI using the OS theme color and dark mode
|
- Modern UI using the OS theme color and dark mode
|
||||||
- Rich addon/extension API for .NET languages, over 700 available mpv properties
|
- Rich addon/extension API for .NET languages, over 700 available mpv properties
|
||||||
- Rich scripting API for Python, C#, Lua, JavaScript and PowerShell
|
- Rich scripting API for Python, C#, Lua, JavaScript and PowerShell
|
||||||
@@ -39,13 +39,13 @@ Table of contents
|
|||||||
|
|
||||||
### Context Menu
|
### Context Menu
|
||||||
|
|
||||||
The context menu can be customized via input.conf file located at:
|
The context menu can be customized via inputConf file located at:
|
||||||
```
|
```
|
||||||
C:\Users\username\AppData\Roaming\mpv\input.conf
|
C:\Users\username\AppData\Roaming\mpv\input.conf
|
||||||
```
|
```
|
||||||
if it's missing mpv.net generates it with the following defaults:
|
if it's missing mpv.net generates it with the following defaults:
|
||||||
|
|
||||||
<https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt>
|
<https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt>
|
||||||
|
|
||||||
### Settings
|
### Settings
|
||||||
|
|
||||||
@@ -89,6 +89,14 @@ The add-on filename must end with 'Addon.dll'
|
|||||||
|
|
||||||
### Changelog
|
### Changelog
|
||||||
|
|
||||||
|
### 3.2 (2019-0?-??)
|
||||||
|
|
||||||
|
- mpvInputEdit and mpvConfEdit were discontinued and merged into mpvnet
|
||||||
|
- portable mode: in case no config folder exists mpvnet will ask where the config folder
|
||||||
|
should be created (portable or appdata)
|
||||||
|
- there was an issue causing keys not working after a modal window was shown
|
||||||
|
- there was a crash when no script folder existed in the conf folder
|
||||||
|
|
||||||
### 3.1 (2019-04-23)
|
### 3.1 (2019-04-23)
|
||||||
|
|
||||||
- the Tracks and Chapters menu are now only added if default bindings exist and
|
- the Tracks and Chapters menu are now only added if default bindings exist and
|
||||||
@@ -101,10 +109,10 @@ The add-on filename must end with 'Addon.dll'
|
|||||||
|
|
||||||
- the history feature logs now only files that were opened longer than 90 seconds
|
- the history feature logs now only files that were opened longer than 90 seconds
|
||||||
- the default input command for cycling the audio tracks was replaced with an
|
- the default input command for cycling the audio tracks was replaced with an
|
||||||
mpv.net command that shows detailed track info and has no 'no audio' track. [Default binding](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L89).
|
mpv.net command that shows detailed track info and has no 'no audio' track. [Default binding](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt#L89).
|
||||||
- new website at <https://mpv-net.github.io/mpv.net-web-site/>
|
- new website at <https://mpv-net.github.io/mpv.net-web-site/>
|
||||||
- the Tracks menu supports now MKV edition selection. [Default binding](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L106).
|
- the Tracks menu supports now MKV edition selection. [Default binding](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt#L106).
|
||||||
- the Navigate menu supports now chapter selection. [Default binding](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L57).
|
- the Navigate menu supports now chapter selection. [Default binding](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt#L57).
|
||||||
- opening the context menu was crashing if the default binding for Tracks was missing
|
- opening the context menu was crashing if the default binding for Tracks was missing
|
||||||
|
|
||||||
### 2.9 (2019-04-16)
|
### 2.9 (2019-04-16)
|
||||||
@@ -129,5 +137,5 @@ The add-on filename must end with 'Addon.dll'
|
|||||||
wasn't necessary (it took a huge amount of time to implement)
|
wasn't necessary (it took a huge amount of time to implement)
|
||||||
- the context menu has a new track menu where the active track
|
- the context menu has a new track menu where the active track
|
||||||
can be seen and selected, it shows video, audio and subtitle
|
can be seen and selected, it shows video, audio and subtitle
|
||||||
tracks with various metadata. [Menu default definition](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L104).
|
tracks with various metadata. [Menu default definition](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt#L104).
|
||||||
The screenshots were updated showing the [new track menu](https://github.com/stax76/mpv.net#screenshots).
|
The screenshots were updated showing the [new track menu](https://github.com/stax76/mpv.net#screenshots).
|
||||||
@@ -5,7 +5,7 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using System.Windows.Interop;
|
||||||
using VBNET;
|
using VBNET;
|
||||||
|
|
||||||
namespace mpvnet
|
namespace mpvnet
|
||||||
@@ -63,12 +63,20 @@ namespace mpvnet
|
|||||||
|
|
||||||
public static void show_input_editor(string[] args)
|
public static void show_input_editor(string[] args)
|
||||||
{
|
{
|
||||||
Process.Start(Application.StartupPath + "\\mpvInputEdit.exe");
|
MainForm.Instance.Invoke(new Action(() => {
|
||||||
|
InputWindow w = new InputWindow();
|
||||||
|
new WindowInteropHelper(w).Owner = MainForm.Instance.Handle;
|
||||||
|
w.ShowDialog();
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void show_conf_editor(string[] args)
|
public static void show_conf_editor(string[] args)
|
||||||
{
|
{
|
||||||
Process.Start(Application.StartupPath + "\\mpvConfEdit.exe");
|
MainForm.Instance.Invoke(new Action(() => {
|
||||||
|
ConfWindow w = new ConfWindow();
|
||||||
|
new WindowInteropHelper(w).Owner = MainForm.Instance.Handle;
|
||||||
|
w.ShowDialog();
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void show_history(string[] args)
|
public static void show_history(string[] args)
|
||||||
@@ -170,7 +178,7 @@ namespace mpvnet
|
|||||||
|
|
||||||
public static void load_sub(string[] args)
|
public static void load_sub(string[] args)
|
||||||
{
|
{
|
||||||
MainForm.Instance.BeginInvoke(new Action(() => {
|
MainForm.Instance.Invoke(new Action(() => {
|
||||||
using (var d = new OpenFileDialog())
|
using (var d = new OpenFileDialog())
|
||||||
{
|
{
|
||||||
d.InitialDirectory = Path.GetDirectoryName(mp.get_property_string("path", false));
|
d.InitialDirectory = Path.GetDirectoryName(mp.get_property_string("path", false));
|
||||||
@@ -185,7 +193,7 @@ namespace mpvnet
|
|||||||
|
|
||||||
public static void load_audio(string[] args)
|
public static void load_audio(string[] args)
|
||||||
{
|
{
|
||||||
MainForm.Instance.BeginInvoke(new Action(() => {
|
MainForm.Instance.Invoke(new Action(() => {
|
||||||
using (var d = new OpenFileDialog())
|
using (var d = new OpenFileDialog())
|
||||||
{
|
{
|
||||||
d.InitialDirectory = Path.GetDirectoryName(mp.get_property_string("path", false));
|
d.InitialDirectory = Path.GetDirectoryName(mp.get_property_string("path", false));
|
||||||
|
|||||||
@@ -13,6 +13,16 @@ namespace Controls
|
|||||||
|
|
||||||
public string Text { get => SearchTextBox.Text; set => SearchTextBox.Text = value; }
|
public string Text { get => SearchTextBox.Text; set => SearchTextBox.Text = value; }
|
||||||
|
|
||||||
|
private string _HintText;
|
||||||
|
|
||||||
|
public string HintText {
|
||||||
|
get => _HintText;
|
||||||
|
set {
|
||||||
|
_HintText = value;
|
||||||
|
UpdateControls();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void SearchClearButton_Click(object sender, RoutedEventArgs e)
|
private void SearchClearButton_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
SearchTextBox.Text = "";
|
SearchTextBox.Text = "";
|
||||||
@@ -21,7 +31,12 @@ namespace Controls
|
|||||||
|
|
||||||
private void SearchTextBox_TextChanged(object sender, TextChangedEventArgs e)
|
private void SearchTextBox_TextChanged(object sender, TextChangedEventArgs e)
|
||||||
{
|
{
|
||||||
HintTextBlock.Text = SearchTextBox.Text == "" ? "Find a setting" : "";
|
UpdateControls();
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateControls()
|
||||||
|
{
|
||||||
|
HintTextBlock.Text = SearchTextBox.Text == "" ? HintText : "";
|
||||||
|
|
||||||
if (SearchTextBox.Text == "")
|
if (SearchTextBox.Text == "")
|
||||||
SearchClearButton.Visibility = Visibility.Hidden;
|
SearchClearButton.Visibility = Visibility.Hidden;
|
||||||
@@ -4,16 +4,17 @@ using System.Diagnostics;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows.Documents;
|
using System.Windows.Documents;
|
||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
|
|
||||||
using Tommy;
|
using Tommy;
|
||||||
|
|
||||||
namespace DynamicGUI
|
namespace DynamicGUI
|
||||||
{
|
{
|
||||||
public class Settings
|
public class Settings
|
||||||
{
|
{
|
||||||
public static List<SettingBase> LoadSettings(string filepath)
|
public static List<SettingBase> LoadSettings(string content)
|
||||||
{
|
{
|
||||||
TomlTable table;
|
TomlTable table;
|
||||||
using (StreamReader reader = new StreamReader(File.OpenRead(filepath)))
|
using (StringReader reader = new StringReader(content))
|
||||||
table = TOML.Parse(reader);
|
table = TOML.Parse(reader);
|
||||||
List<SettingBase> settingsList = new List<SettingBase>();
|
List<SettingBase> settingsList = new List<SettingBase>();
|
||||||
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2017 stax76
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and ssociated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
@@ -10,6 +10,7 @@ using System.ComponentModel;
|
|||||||
|
|
||||||
using VBNET;
|
using VBNET;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace mpvnet
|
namespace mpvnet
|
||||||
{
|
{
|
||||||
@@ -42,8 +43,9 @@ namespace mpvnet
|
|||||||
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
||||||
Application.ThreadException += Application_ThreadException;
|
Application.ThreadException += Application_ThreadException;
|
||||||
Msg.SupportURL = "https://github.com/stax76/mpv.net#support";
|
Msg.SupportURL = "https://github.com/stax76/mpv.net#support";
|
||||||
|
|
||||||
Instance = this;
|
Instance = this;
|
||||||
|
WPF.WPF.Init();
|
||||||
|
System.Windows.Application.Current.ShutdownMode = System.Windows.ShutdownMode.OnExplicitShutdown;
|
||||||
Hwnd = Handle;
|
Hwnd = Handle;
|
||||||
MinimumSize = new Size(FontHeight * 16, FontHeight * 9);
|
MinimumSize = new Size(FontHeight * 16, FontHeight * 9);
|
||||||
Text += " " + Application.ProductVersion;
|
Text += " " + Application.ProductVersion;
|
||||||
@@ -291,7 +293,7 @@ namespace mpvnet
|
|||||||
lines = content.Split("\r\n".ToCharArray()).ToList();
|
lines = content.Split("\r\n".ToCharArray()).ToList();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lines = Properties.Resources.input_conf.Split("\r\n".ToCharArray()).ToList();
|
lines = Properties.Resources.inputConf.Split("\r\n".ToCharArray()).ToList();
|
||||||
|
|
||||||
foreach (string i in content.Split("\r\n".ToCharArray()))
|
foreach (string i in content.Split("\r\n".ToCharArray()))
|
||||||
{
|
{
|
||||||
@@ -397,6 +399,8 @@ namespace mpvnet
|
|||||||
case 0x0202: // WM_LBUTTONUP
|
case 0x0202: // WM_LBUTTONUP
|
||||||
case 0x0100: // WM_KEYDOWN
|
case 0x0100: // WM_KEYDOWN
|
||||||
case 0x0101: // WM_KEYUP
|
case 0x0101: // WM_KEYUP
|
||||||
|
case 0x0104: // WM_SYSKEYDOWN
|
||||||
|
case 0x0105: // WM_SYSKEYUP
|
||||||
case 0x020A: // WM_MOUSEWHEEL
|
case 0x020A: // WM_MOUSEWHEEL
|
||||||
if (mp.MpvWindowHandle != IntPtr.Zero)
|
if (mp.MpvWindowHandle != IntPtr.Zero)
|
||||||
Native.SendMessage(mp.MpvWindowHandle, m.Msg, m.WParam, m.LParam);
|
Native.SendMessage(mp.MpvWindowHandle, m.Msg, m.WParam, m.LParam);
|
||||||
@@ -405,14 +409,6 @@ namespace mpvnet
|
|||||||
if (mp.MpvWindowHandle != IntPtr.Zero)
|
if (mp.MpvWindowHandle != IntPtr.Zero)
|
||||||
Native.PostMessage(mp.MpvWindowHandle, m.Msg, m.WParam, m.LParam);
|
Native.PostMessage(mp.MpvWindowHandle, m.Msg, m.WParam, m.LParam);
|
||||||
break;
|
break;
|
||||||
case 0x0104: // WM_SYSKEYDOWN:
|
|
||||||
if (mp.MpvWindowHandle != IntPtr.Zero)
|
|
||||||
Native.SendMessage(mp.MpvWindowHandle, m.Msg, m.WParam, m.LParam);
|
|
||||||
break;
|
|
||||||
case 0x0105: // WM_SYSKEYUP:
|
|
||||||
if (mp.MpvWindowHandle != IntPtr.Zero)
|
|
||||||
Native.SendMessage(mp.MpvWindowHandle, m.Msg, m.WParam, m.LParam);
|
|
||||||
break;
|
|
||||||
case 0x203: // Native.WM.LBUTTONDBLCLK
|
case 0x203: // Native.WM.LBUTTONDBLCLK
|
||||||
if (!IsMouseInOSC())
|
if (!IsMouseInOSC())
|
||||||
mp.command_string("cycle fullscreen");
|
mp.command_string("cycle fullscreen");
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
using Microsoft.Win32;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
using Microsoft.Win32;
|
||||||
|
|
||||||
namespace mpvnet
|
namespace mpvnet
|
||||||
{
|
{
|
||||||
public class Misc
|
public class Misc
|
||||||
@@ -138,4 +143,73 @@ namespace mpvnet
|
|||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
public int ID { get; set; }
|
public int ID { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class InputItem : INotifyPropertyChanged
|
||||||
|
{
|
||||||
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
public string Menu { get; set; } = "";
|
||||||
|
public string Command { get; set; } = "";
|
||||||
|
|
||||||
|
public InputItem() { }
|
||||||
|
|
||||||
|
public InputItem(SerializationInfo info, StreamingContext context) { }
|
||||||
|
|
||||||
|
private void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
|
||||||
|
{
|
||||||
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||||
|
}
|
||||||
|
|
||||||
|
private string _Input = "";
|
||||||
|
|
||||||
|
public string Input {
|
||||||
|
get => _Input;
|
||||||
|
set {
|
||||||
|
_Input = value;
|
||||||
|
NotifyPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ObservableCollection<InputItem> _InputItems;
|
||||||
|
|
||||||
|
public static ObservableCollection<InputItem> InputItems {
|
||||||
|
get {
|
||||||
|
if (_InputItems is null)
|
||||||
|
{
|
||||||
|
_InputItems = new ObservableCollection<InputItem>();
|
||||||
|
|
||||||
|
if (File.Exists(mp.InputConfPath))
|
||||||
|
{
|
||||||
|
foreach (string line in File.ReadAllLines(mp.InputConfPath))
|
||||||
|
{
|
||||||
|
string l = line.Trim();
|
||||||
|
if (l.StartsWith("#")) continue;
|
||||||
|
if (!l.Contains(" ")) continue;
|
||||||
|
InputItem item = new InputItem();
|
||||||
|
item.Input = l.Substring(0, l.IndexOf(" "));
|
||||||
|
if (item.Input == "") continue;
|
||||||
|
l = l.Substring(l.IndexOf(" ") + 1);
|
||||||
|
|
||||||
|
if (l.Contains("#menu:"))
|
||||||
|
{
|
||||||
|
item.Menu = l.Substring(l.IndexOf("#menu:") + 6).Trim();
|
||||||
|
l = l.Substring(0, l.IndexOf("#menu:"));
|
||||||
|
|
||||||
|
if (item.Menu.Contains(";"))
|
||||||
|
item.Menu = item.Menu.Substring(item.Menu.IndexOf(";") + 1).Trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
item.Command = l.Trim();
|
||||||
|
if (item.Command == "")
|
||||||
|
continue;
|
||||||
|
if (item.Command.ToLower() == "ignore")
|
||||||
|
item.Command = "";
|
||||||
|
_InputItems.Add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return _InputItems;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -14,11 +14,11 @@ namespace mpvnet
|
|||||||
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
|
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
|
||||||
public static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string lclassName, string windowTitle);
|
public static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string lclassName, string windowTitle);
|
||||||
|
|
||||||
[DllImport("user32.dll", CharSet = CharSet.Auto)]
|
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
|
||||||
public static extern string SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
|
public static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
|
||||||
|
|
||||||
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
|
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
|
||||||
public static extern bool PostMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);
|
public static extern IntPtr PostMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);
|
||||||
|
|
||||||
[DllImport("user32.dll")]
|
[DllImport("user32.dll")]
|
||||||
public static extern void ReleaseCapture();
|
public static extern void ReleaseCapture();
|
||||||
|
|||||||
66
mpv.net/Properties/Resources.Designer.cs
generated
66
mpv.net/Properties/Resources.Designer.cs
generated
@@ -72,13 +72,35 @@ namespace mpvnet.Properties {
|
|||||||
///
|
///
|
||||||
/// # The defaults of this file can be found at:
|
/// # The defaults of this file can be found at:
|
||||||
///
|
///
|
||||||
/// # https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt
|
/// # https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt
|
||||||
///
|
///
|
||||||
/// # the [rest of string was truncated]";.
|
/// # the [rest of string was truncated]";.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string input_conf {
|
internal static string inputConf {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("input_conf", resourceCulture);
|
return ResourceManager.GetString("inputConf", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to
|
||||||
|
/// # This file defines the input (keys and mouse) bindings of mpv and mpv.net
|
||||||
|
/// # and it also defines the context menu of mpv.net. mpv.net has an input
|
||||||
|
/// # editor and an conf editor as alternatives to editing conf text files.
|
||||||
|
/// # The input and conf editors can be found in mpv.net's context menu at:
|
||||||
|
///
|
||||||
|
/// # Settings > Show Config Editor
|
||||||
|
/// # Settings > Show Input Editor
|
||||||
|
///
|
||||||
|
/// # The defaults of this file can be found at:
|
||||||
|
///
|
||||||
|
/// # https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt
|
||||||
|
///
|
||||||
|
/// # the [rest of string was truncated]";.
|
||||||
|
/// </summary>
|
||||||
|
internal static string inputConfHeader {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("inputConfHeader", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,9 +120,41 @@ namespace mpvnet.Properties {
|
|||||||
///screenshot-directory = ~~desktop/
|
///screenshot-directory = ~~desktop/
|
||||||
///input-default-bindings = no.
|
///input-default-bindings = no.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string mpv_conf {
|
internal static string mpvConf {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("mpv_conf", resourceCulture);
|
return ResourceManager.GetString("mpvConf", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to [[settings]]
|
||||||
|
///name = "hwdec"
|
||||||
|
///default = "no"
|
||||||
|
///filter = "Video"
|
||||||
|
///helpurl = "https://mpv.io/manual/master/#options-hwdec"
|
||||||
|
///help = "--hwdec=<mode> Specify the hardware video decoding API that should be used if possible. Whether hardware decoding is actually done depends on the video codec. If hardware decoding is not possible, mpv will fall back on software decoding.\n\nFor more information visit:"
|
||||||
|
///options = [{ name = "no", help = "always use software decoding (Default)" },
|
||||||
|
/// { name = "aut [rest of string was truncated]";.
|
||||||
|
/// </summary>
|
||||||
|
internal static string mpvConfToml {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("mpvConfToml", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to [[settings]]
|
||||||
|
///name = "dark-mode"
|
||||||
|
///default = "system"
|
||||||
|
///filter = "mpv.net"
|
||||||
|
///help = "Enables a dark theme."
|
||||||
|
///options = [{ name = "always" },
|
||||||
|
/// { name = "system" , help = "Windows 10+" },
|
||||||
|
/// { name = "never" }].
|
||||||
|
/// </summary>
|
||||||
|
internal static string mpvNetConfToml {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("mpvNetConfToml", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,10 +118,19 @@
|
|||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<data name="input_conf" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="inputConf" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\input.conf.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
<value>..\Resources\inputConf.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="mpv_conf" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="inputConfHeader" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\mpv.conf.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
<value>..\Resources\inputConfHeader.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||||
|
</data>
|
||||||
|
<data name="mpvConf" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\mpvConf.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||||
|
</data>
|
||||||
|
<data name="mpvConfToml" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\mpvConfToml.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||||
|
</data>
|
||||||
|
<data name="mpvNetConfToml" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\mpvNetConfToml.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -9,11 +9,11 @@
|
|||||||
|
|
||||||
# The defaults of this file can be found at:
|
# The defaults of this file can be found at:
|
||||||
|
|
||||||
# https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt
|
# https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt
|
||||||
|
|
||||||
# the defaults of mpv can be found at:
|
# the defaults of mpv can be found at:
|
||||||
|
|
||||||
# https://github.com/mpv-player/mpv/blob/master/etc/input.conf
|
# https://github.com/mpv-player/mpv/blob/master/etc/inputConf
|
||||||
|
|
||||||
# mpv.net's defaults of mpv.conf contain: 'input-default-bindings = no'
|
# mpv.net's defaults of mpv.conf contain: 'input-default-bindings = no'
|
||||||
# which disables mpv's input defaults. Every line in this file begins with a
|
# which disables mpv's input defaults. Every line in this file begins with a
|
||||||
@@ -145,8 +145,8 @@
|
|||||||
_ script-message mpv.net execute-mpv-command #menu: Tools > Execute mpv command...
|
_ script-message mpv.net execute-mpv-command #menu: Tools > Execute mpv command...
|
||||||
|
|
||||||
_ script-message mpv.net shell-execute https://mpv.io/manual/stable/ #menu: Help > Show mpv manual
|
_ script-message mpv.net shell-execute https://mpv.io/manual/stable/ #menu: Help > Show mpv manual
|
||||||
_ script-message mpv.net shell-execute https://github.com/mpv-player/mpv/blob/master/etc/input.conf #menu: Help > Show mpv default keys
|
_ script-message mpv.net shell-execute https://github.com/mpv-player/mpv/blob/master/etc/inputConf #menu: Help > Show mpv default keys
|
||||||
_ script-message mpv.net shell-execute https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt #menu: Help > Show mpv.net default keys
|
_ script-message mpv.net shell-execute https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt #menu: Help > Show mpv.net default keys
|
||||||
_ script-message mpv.net shell-execute https://mpv-net.github.io/mpv.net-web-site/ #menu: Help > Show mpv.net web site
|
_ script-message mpv.net shell-execute https://mpv-net.github.io/mpv.net-web-site/ #menu: Help > Show mpv.net web site
|
||||||
|
|
||||||
_ ignore #menu: -
|
_ ignore #menu: -
|
||||||
@@ -1,23 +1,19 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
|
||||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="mpvInputEdit.Properties" GeneratedClassName="Settings">
|
# This file defines the input (keys and mouse) bindings of mpv and mpv.net
|
||||||
<Profiles />
|
|
||||||
<Settings>
|
|
||||||
<Setting Name="input_conf_help" Type="System.String" Scope="User">
|
|
||||||
<Value Profile="(Default)"> # This file defines the input (keys and mouse) bindings of mpv and mpv.net
|
|
||||||
# and it also defines the context menu of mpv.net. mpv.net has an input
|
# and it also defines the context menu of mpv.net. mpv.net has an input
|
||||||
# editor and an conf editor as alternatives to editing conf text files.
|
# editor and an conf editor as alternatives to editing conf text files.
|
||||||
# The input and conf editors can be found in mpv.net's context menu at:
|
# The input and conf editors can be found in mpv.net's context menu at:
|
||||||
|
|
||||||
# Settings > Show Config Editor
|
# Settings > Show Config Editor
|
||||||
# Settings > Show Input Editor
|
# Settings > Show Input Editor
|
||||||
|
|
||||||
# The defaults of this file can be found at:
|
# The defaults of this file can be found at:
|
||||||
|
|
||||||
# https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt
|
# https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt
|
||||||
|
|
||||||
# the defaults of mpv can be found at:
|
# the defaults of mpv can be found at:
|
||||||
|
|
||||||
# https://github.com/mpv-player/mpv/blob/master/etc/input.conf
|
# https://github.com/mpv-player/mpv/blob/master/etc/inputConf
|
||||||
|
|
||||||
# mpv.net's defaults of mpv.conf contain: 'input-default-bindings = no'
|
# mpv.net's defaults of mpv.conf contain: 'input-default-bindings = no'
|
||||||
# which disables mpv's input defaults. Every line in this file begins with a
|
# which disables mpv's input defaults. Every line in this file begins with a
|
||||||
@@ -26,7 +22,4 @@
|
|||||||
|
|
||||||
# mpv input commands: https://github.com/stax76/mpv.net/wiki/mpv-input-commands
|
# mpv input commands: https://github.com/stax76/mpv.net/wiki/mpv-input-commands
|
||||||
|
|
||||||
# mpv input keys: https://github.com/stax76/mpv.net/wiki/mpv-input-keys</Value>
|
# mpv input keys: https://github.com/stax76/mpv.net/wiki/mpv-input-keys
|
||||||
</Setting>
|
|
||||||
</Settings>
|
|
||||||
</SettingsFile>
|
|
||||||
@@ -1,9 +1,7 @@
|
|||||||
<Application x:Class="mpvConfEdit.App"
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:WPF="clr-namespace:WPF">
|
||||||
xmlns:Controls="clr-namespace:Controls"
|
|
||||||
StartupUri="MainWindow.xaml">
|
|
||||||
<Application.Resources>
|
|
||||||
<Style TargetType="TextBox">
|
<Style TargetType="TextBox">
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
@@ -19,12 +17,11 @@
|
|||||||
<Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
|
<Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsFocused" Value="true">
|
<Trigger Property="IsFocused" Value="true">
|
||||||
<Setter Property="BorderBrush" TargetName="border" Value="{x:Static Controls:Controls.ThemeBrush}"/>
|
<Setter Property="BorderBrush" TargetName="border" Value="{x:Static WPF:WPF.ThemeBrush}"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</ControlTemplate.Triggers>
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
</Application.Resources>
|
</ResourceDictionary>
|
||||||
</Application>
|
|
||||||
34
mpv.net/WPF/WPF.cs
Normal file
34
mpv.net/WPF/WPF.cs
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
using System;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
|
namespace WPF
|
||||||
|
{
|
||||||
|
public class WPF
|
||||||
|
{
|
||||||
|
public static void Init()
|
||||||
|
{
|
||||||
|
EnsureApplicationResources();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void EnsureApplicationResources()
|
||||||
|
{
|
||||||
|
if (Application.Current == null)
|
||||||
|
{
|
||||||
|
new Application();
|
||||||
|
Application.Current.Resources.MergedDictionaries.Add(
|
||||||
|
Application.LoadComponent(new Uri("mpvnet;component/WPF/Resources.xaml",
|
||||||
|
UriKind.Relative)) as ResourceDictionary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Brush ThemeBrush {
|
||||||
|
get {
|
||||||
|
if (Environment.OSVersion.Version.Major < 10)
|
||||||
|
return new SolidColorBrush(Colors.DarkSlateGray);
|
||||||
|
else
|
||||||
|
return SystemParameters.WindowGlassBrush;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
<Window xmlns:Controls="clr-namespace:Controls" x:Name="MainWindow1" x:Class="mpvConfEdit.MainWindow"
|
<Window xmlns:Controls="clr-namespace:Controls" x:Name="ConfWindow1" x:Class="mpvnet.ConfWindow"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:WPF="clr-namespace:WPF"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Height="500" Width="700" Loaded="MainWindow1_Loaded" WindowStartupLocation="CenterScreen">
|
Height="500" Width="700" Loaded="ConfWindow1_Loaded" ShowInTaskbar="False"
|
||||||
|
WindowStartupLocation="CenterScreen" Title="Conf Editor">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
@@ -14,12 +16,12 @@
|
|||||||
<ColumnDefinition Width="10*" />
|
<ColumnDefinition Width="10*" />
|
||||||
<ColumnDefinition Width="60*" />
|
<ColumnDefinition Width="60*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Controls:SearchTextBoxUserControl x:Name="SearchControl" Width="250" Margin="0,20,0,10" Grid.ColumnSpan="2" />
|
<Controls:SearchTextBoxUserControl HintText="Find a setting" x:Name="SearchControl" Width="250" Margin="0,20,0,10" Grid.ColumnSpan="2" />
|
||||||
<ScrollViewer x:Name="MainScrollViewer" VerticalScrollBarVisibility="Auto" Grid.Row="1" Grid.Column="1" Margin="0,0,0,10">
|
<ScrollViewer x:Name="MainScrollViewer" VerticalScrollBarVisibility="Auto" Grid.Row="1" Grid.Column="1" Margin="0,0,0,10">
|
||||||
<StackPanel x:Name="MainStackPanel"></StackPanel>
|
<StackPanel x:Name="MainStackPanel"></StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
<StackPanel Margin="20,0,0,0" Grid.Row="1">
|
<StackPanel Margin="20,0,0,0" Grid.Row="1">
|
||||||
<ListBox x:Name="FilterListBox" ItemsSource="{Binding FilterStrings}" BorderThickness="0" SelectionChanged="ListBox_SelectionChanged" Foreground="{x:Static Controls:Controls.ThemeBrush}" Background="{Binding Path=Background, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}">
|
<ListBox x:Name="FilterListBox" ItemsSource="{Binding FilterStrings}" BorderThickness="0" SelectionChanged="ListBox_SelectionChanged" Foreground="{x:Static WPF:WPF.ThemeBrush}" Background="{Binding Path=Background, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
@@ -28,10 +30,10 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
<TextBlock x:Name="OpenSettingsTextBlock" Margin="0,30,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static Controls:Controls.ThemeBrush}" MouseUp="OpenSettingsTextBlock_MouseUp">Open config folder</TextBlock>
|
<TextBlock x:Name="OpenSettingsTextBlock" Margin="0,30,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static WPF:WPF.ThemeBrush}" MouseUp="OpenSettingsTextBlock_MouseUp">Open config folder</TextBlock>
|
||||||
<TextBlock x:Name="ShowManualTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static Controls:Controls.ThemeBrush}" MouseUp="ShowManualTextBlock_MouseUp">Show mpv manual</TextBlock>
|
<TextBlock x:Name="ShowManualTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static WPF:WPF.ThemeBrush}" MouseUp="ShowManualTextBlock_MouseUp">Show mpv manual</TextBlock>
|
||||||
<TextBlock x:Name="SupportTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static Controls:Controls.ThemeBrush}" MouseUp="SupportTextBlock_MouseUp">Show support forum</TextBlock>
|
<TextBlock x:Name="SupportTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static WPF:WPF.ThemeBrush}" MouseUp="SupportTextBlock_MouseUp">Show support forum</TextBlock>
|
||||||
<TextBlock x:Name="ApplyTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static Controls:Controls.ThemeBrush}" MouseUp="ApplyTextBlock_MouseUp">Write config to disk</TextBlock>
|
<TextBlock x:Name="ApplyTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static WPF:WPF.ThemeBrush}" MouseUp="ApplyTextBlock_MouseUp">Write config to disk</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
@@ -4,7 +4,6 @@ using System.Collections.ObjectModel;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
@@ -13,23 +12,20 @@ using System.Windows.Media;
|
|||||||
using DynamicGUI;
|
using DynamicGUI;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
|
|
||||||
namespace mpvConfEdit
|
namespace mpvnet
|
||||||
{
|
{
|
||||||
public partial class MainWindow : Window
|
public partial class ConfWindow : Window
|
||||||
{
|
{
|
||||||
private List<SettingBase> MpvSettingsDefinitions = Settings.LoadSettings(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\mpvConf.toml");
|
private List<SettingBase> MpvSettingsDefinitions = Settings.LoadSettings(Properties.Resources.mpvConfToml);
|
||||||
private List<SettingBase> MpvNetSettingsDefinitions = Settings.LoadSettings(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\mpvNetConf.toml");
|
private List<SettingBase> MpvNetSettingsDefinitions = Settings.LoadSettings(Properties.Resources.mpvNetConfToml);
|
||||||
private Dictionary<string, Dictionary<string, string>> Comments = new Dictionary<string, Dictionary<string, string>>();
|
private Dictionary<string, Dictionary<string, string>> Comments = new Dictionary<string, Dictionary<string, string>>();
|
||||||
|
|
||||||
public ObservableCollection<string> FilterStrings { get; } = new ObservableCollection<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()
|
public ConfWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
DataContext = this;
|
DataContext = this;
|
||||||
Title = (Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), true)[0] as AssemblyProductAttribute).Product + " " + Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
|
||||||
SearchControl.SearchTextBox.TextChanged += SearchTextBox_TextChanged;
|
SearchControl.SearchTextBox.TextChanged += SearchTextBox_TextChanged;
|
||||||
LoadSettings(MpvSettingsDefinitions, MpvConf);
|
LoadSettings(MpvSettingsDefinitions, MpvConf);
|
||||||
LoadSettings(MpvNetSettingsDefinitions, MpvNetConf);
|
LoadSettings(MpvNetSettingsDefinitions, MpvNetConf);
|
||||||
@@ -37,31 +33,13 @@ namespace mpvConfEdit
|
|||||||
SetDarkTheme();
|
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 {
|
public Brush Foreground2 {
|
||||||
get { return (Brush)GetValue(Foreground2Property); }
|
get { return (Brush)GetValue(Foreground2Property); }
|
||||||
set { SetValue(Foreground2Property, value); }
|
set { SetValue(Foreground2Property, value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public static readonly DependencyProperty Foreground2Property =
|
public static readonly DependencyProperty Foreground2Property =
|
||||||
DependencyProperty.Register("Foreground2", typeof(Brush), typeof(MainWindow), new PropertyMetadata(Brushes.DarkSlateGray));
|
DependencyProperty.Register("Foreground2", typeof(Brush), typeof(ConfWindow), new PropertyMetadata(Brushes.DarkSlateGray));
|
||||||
|
|
||||||
void SetDarkTheme()
|
void SetDarkTheme()
|
||||||
{
|
{
|
||||||
@@ -101,12 +79,12 @@ namespace mpvConfEdit
|
|||||||
{
|
{
|
||||||
case StringSetting s:
|
case StringSetting s:
|
||||||
var sc = new StringSettingControl(s);
|
var sc = new StringSettingControl(s);
|
||||||
sc.TitleTextBox.Foreground = Controls.Controls.ThemeBrush;
|
sc.TitleTextBox.Foreground = WPF.WPF.ThemeBrush;
|
||||||
MainStackPanel.Children.Add(sc);
|
MainStackPanel.Children.Add(sc);
|
||||||
break;
|
break;
|
||||||
case OptionSetting s:
|
case OptionSetting s:
|
||||||
var oc = new OptionSettingControl(s);
|
var oc = new OptionSettingControl(s);
|
||||||
oc.TitleTextBox.Foreground = Controls.Controls.ThemeBrush;
|
oc.TitleTextBox.Foreground = WPF.WPF.ThemeBrush;
|
||||||
MainStackPanel.Children.Add(oc);
|
MainStackPanel.Children.Add(oc);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -117,7 +95,7 @@ namespace mpvConfEdit
|
|||||||
|
|
||||||
public Dictionary<string, string> MpvConf {
|
public Dictionary<string, string> MpvConf {
|
||||||
get {
|
get {
|
||||||
if (_mpvConf == null) _mpvConf = LoadConf(MpvConfPath);
|
if (_mpvConf == null) _mpvConf = LoadConf(mp.MpvConfPath);
|
||||||
return _mpvConf;
|
return _mpvConf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -126,7 +104,7 @@ namespace mpvConfEdit
|
|||||||
|
|
||||||
public Dictionary<string, string> MpvNetConf {
|
public Dictionary<string, string> MpvNetConf {
|
||||||
get {
|
get {
|
||||||
if (_mpvNetConf == null) _mpvNetConf = LoadConf(MpvNetConfPath);
|
if (_mpvNetConf == null) _mpvNetConf = LoadConf(mp.MpvNetConfPath);
|
||||||
return _mpvNetConf;
|
return _mpvNetConf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -183,10 +161,10 @@ namespace mpvConfEdit
|
|||||||
if (!isDirty)
|
if (!isDirty)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
WriteToDisk(MpvConfPath, MpvConf, MpvSettingsDefinitions);
|
WriteToDisk(mp.MpvConfPath, MpvConf, MpvSettingsDefinitions);
|
||||||
WriteToDisk(MpvNetConfPath, MpvNetConf, MpvNetSettingsDefinitions);
|
WriteToDisk(mp.MpvNetConfPath, MpvNetConf, MpvNetSettingsDefinitions);
|
||||||
|
|
||||||
MessageBox.Show("Changes will be available on next startup of mpv(.net).",
|
MessageBox.Show("Changes will be available on next startup of mpv.net.",
|
||||||
Title, MessageBoxButton.OK, MessageBoxImage.Information);
|
Title, MessageBoxButton.OK, MessageBoxImage.Information);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -246,7 +224,7 @@ namespace mpvConfEdit
|
|||||||
MainScrollViewer.ScrollToTop();
|
MainScrollViewer.ScrollToTop();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MainWindow1_Loaded(object sender, RoutedEventArgs e)
|
private void ConfWindow1_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
SearchControl.SearchTextBox.SelectAll();
|
SearchControl.SearchTextBox.SelectAll();
|
||||||
Keyboard.Focus(SearchControl.SearchTextBox);
|
Keyboard.Focus(SearchControl.SearchTextBox);
|
||||||
@@ -260,7 +238,7 @@ namespace mpvConfEdit
|
|||||||
|
|
||||||
private void OpenSettingsTextBlock_MouseUp(object sender, MouseButtonEventArgs e)
|
private void OpenSettingsTextBlock_MouseUp(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
Process.Start(Path.GetDirectoryName(MpvConfPath));
|
Process.Start(Path.GetDirectoryName(mp.MpvConfPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ShowManualTextBlock_MouseUp(object sender, MouseButtonEventArgs e)
|
private void ShowManualTextBlock_MouseUp(object sender, MouseButtonEventArgs e)
|
||||||
@@ -1,17 +1,30 @@
|
|||||||
<Window xmlns:Controls="clr-namespace:Controls" x:Class="mpvInputEdit.MainWindow"
|
<Window xmlns:Controls="clr-namespace:Controls" x:Class="mpvnet.InputWindow"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="MainWindow" Height="500" Width="750" FontSize="13"
|
Title="Input Editor" Height="500" Width="750" FontSize="13"
|
||||||
Loaded="Window_Loaded" Closed="Window_Closed">
|
Loaded="Window_Loaded" Closed="Window_Closed" ShowInTaskbar="False">
|
||||||
|
<Window.Resources>
|
||||||
|
<Style x:Key="DataGrid_Font_Centering" TargetType="{x:Type DataGridCell}">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
||||||
|
<Grid Background="{TemplateBinding Background}">
|
||||||
|
<ContentPresenter VerticalAlignment="Center" />
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</Window.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Controls:SearchTextBoxUserControl x:Name="SearchControl" Width="300" Margin="0,20,0,20" Grid.ColumnSpan="2" />
|
<Controls:SearchTextBoxUserControl HintText="Type ? to get help." x:Name="SearchControl" Width="300" Margin="0,20,0,20" Grid.ColumnSpan="2" />
|
||||||
<DataGrid Grid.Row="1" x:Name="DataGrid" CommandManager.PreviewCanExecute="DataGrid_PreviewCanExecute" AutoGenerateColumns="False" CellStyle="{StaticResource DataGrid_Font_Centering}">
|
<DataGrid Grid.Row="1" x:Name="DataGrid" CommandManager.PreviewCanExecute="DataGrid_PreviewCanExecute" AutoGenerateColumns="False" CellStyle="{StaticResource DataGrid_Font_Centering}">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Header="Menu" Binding="{Binding Menu}"/>
|
<DataGridTextColumn Header="Menu" Binding="{Binding Menu}"/>
|
||||||
@@ -2,25 +2,23 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Data;
|
using System.Windows.Data;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace mpvInputEdit
|
namespace mpvnet
|
||||||
{
|
{
|
||||||
public partial class MainWindow : Window
|
public partial class InputWindow : Window
|
||||||
{
|
{
|
||||||
ICollectionView CollectionView;
|
ICollectionView CollectionView;
|
||||||
|
|
||||||
public MainWindow()
|
public InputWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Title = (Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), true)[0] as AssemblyProductAttribute).Product + " " + Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
|
||||||
SearchControl.SearchTextBox.TextChanged += SearchTextBox_TextChanged;
|
SearchControl.SearchTextBox.TextChanged += SearchTextBox_TextChanged;
|
||||||
DataGrid.SelectionMode = DataGridSelectionMode.Single;
|
DataGrid.SelectionMode = DataGridSelectionMode.Single;
|
||||||
CollectionViewSource collectionViewSource = new CollectionViewSource() { Source = App.InputItems };
|
CollectionViewSource collectionViewSource = new CollectionViewSource() { Source = InputItem.InputItems };
|
||||||
CollectionView = collectionViewSource.View;
|
CollectionView = collectionViewSource.View;
|
||||||
var yourCostumFilter = new Predicate<object>(item => Filter((InputItem)item));
|
var yourCostumFilter = new Predicate<object>(item => Filter((InputItem)item));
|
||||||
CollectionView.Filter = yourCostumFilter;
|
CollectionView.Filter = yourCostumFilter;
|
||||||
@@ -30,6 +28,9 @@ namespace mpvInputEdit
|
|||||||
private void SearchTextBox_TextChanged(object sender, TextChangedEventArgs e)
|
private void SearchTextBox_TextChanged(object sender, TextChangedEventArgs e)
|
||||||
{
|
{
|
||||||
CollectionView.Refresh();
|
CollectionView.Refresh();
|
||||||
|
|
||||||
|
if (SearchControl.SearchTextBox.Text == "?")
|
||||||
|
MessageBox.Show("Filtering works by searching in the Input, Menu and Command but it's possible to reduce the filter scope to either of Input, Menu or Command by prefixing as follows:\n\ni <input search>\ni: <input search>\n\nm <menu search>\nm: <menu search>\n\nc <command search>\nc: <command search>\n\nIf only one character is entered the search will be performed only in the input.", "Filtering", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Filter(InputItem item)
|
bool Filter(InputItem item)
|
||||||
@@ -64,14 +65,14 @@ namespace mpvInputEdit
|
|||||||
{
|
{
|
||||||
InputItem item = ((Button)e.Source).DataContext as InputItem;
|
InputItem item = ((Button)e.Source).DataContext as InputItem;
|
||||||
if (item is null) return;
|
if (item is null) return;
|
||||||
InputWindow w = new InputWindow();
|
LearnWindow w = new LearnWindow();
|
||||||
w.Owner = this;
|
w.Owner = this;
|
||||||
w.InputItem = item;
|
w.InputItem = item;
|
||||||
w.ShowDialog();
|
w.ShowDialog();
|
||||||
|
|
||||||
var items = new Dictionary<string, InputItem>();
|
var items = new Dictionary<string, InputItem>();
|
||||||
|
|
||||||
foreach (InputItem i in App.InputItems)
|
foreach (InputItem i in InputItem.InputItems)
|
||||||
if (items.ContainsKey(i.Input) && i.Input != "_")
|
if (items.ContainsKey(i.Input) && i.Input != "_")
|
||||||
MessageBox.Show($"Duplicate found:\n\n{i.Input}: {i.Menu}\n\n{items[i.Input].Input}: {items[i.Input].Menu}\n\nPlease note that you can chain multiple commands in the same line by using a semicolon as separator.", "Duplicate Found", MessageBoxButton.OK, MessageBoxImage.Warning);
|
MessageBox.Show($"Duplicate found:\n\n{i.Input}: {i.Menu}\n\n{items[i.Input].Input}: {items[i.Input].Menu}\n\nPlease note that you can chain multiple commands in the same line by using a semicolon as separator.", "Duplicate Found", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||||
else
|
else
|
||||||
@@ -82,17 +83,17 @@ namespace mpvInputEdit
|
|||||||
|
|
||||||
private void Window_Closed(object sender, EventArgs e)
|
private void Window_Closed(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var backupDir = Path.GetDirectoryName(App.InputConfPath) + "\\backup\\";
|
string backupDir = Path.GetDirectoryName(mp.InputConfPath) + "\\backup\\";
|
||||||
|
|
||||||
if (!Directory.Exists(backupDir))
|
if (!Directory.Exists(backupDir))
|
||||||
Directory.CreateDirectory(backupDir);
|
Directory.CreateDirectory(backupDir);
|
||||||
|
|
||||||
if (File.Exists(App.InputConfPath))
|
if (File.Exists(mp.InputConfPath))
|
||||||
File.Copy(App.InputConfPath, backupDir + "input conf " + DateTime.Now.ToString("yyyy-MM-dd HH-mm") + ".conf", true);
|
File.Copy(mp.InputConfPath, backupDir + "input conf " + DateTime.Now.ToString("yyyy-MM-dd HH-mm") + ".conf", true);
|
||||||
|
|
||||||
string text = "\r\n" + Properties.Settings.Default.input_conf_help + "\r\n\r\n";
|
string text = Properties.Resources.inputConfHeader + "\r\n";
|
||||||
|
|
||||||
foreach (InputItem item in App.InputItems)
|
foreach (InputItem item in InputItem.InputItems)
|
||||||
{
|
{
|
||||||
string line = " " + item.Input.PadRight(10);
|
string line = " " + item.Input.PadRight(10);
|
||||||
|
|
||||||
@@ -107,9 +108,9 @@ namespace mpvInputEdit
|
|||||||
text += line + "\r\n";
|
text += line + "\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
File.WriteAllText(App.InputConfPath, text);
|
File.WriteAllText(mp.InputConfPath, text);
|
||||||
|
|
||||||
MessageBox.Show("Changes will be available on next mpv(.net) startup.",
|
MessageBox.Show("Changes will be available on next mpv.net startup.",
|
||||||
Title, MessageBoxButton.OK, MessageBoxImage.Information);
|
Title, MessageBoxButton.OK, MessageBoxImage.Information);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<Window x:Class="mpvInputEdit.InputWindow"
|
<Window x:Class="mpvnet.LearnWindow"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
@@ -5,14 +5,14 @@ using System.Windows.Input;
|
|||||||
using System.Windows.Interop;
|
using System.Windows.Interop;
|
||||||
using WF = System.Windows.Forms;
|
using WF = System.Windows.Forms;
|
||||||
|
|
||||||
namespace mpvInputEdit
|
namespace mpvnet
|
||||||
{
|
{
|
||||||
public partial class InputWindow : Window
|
public partial class LearnWindow : Window
|
||||||
{
|
{
|
||||||
public InputItem InputItem { get; set; }
|
public InputItem InputItem { get; set; }
|
||||||
public string NewKey { get; set; } = "";
|
public string NewKey { get; set; } = "";
|
||||||
|
|
||||||
public InputWindow()
|
public LearnWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -75,11 +75,34 @@ namespace mpvnet
|
|||||||
get {
|
get {
|
||||||
if (_MpvConfFolder == null)
|
if (_MpvConfFolder == null)
|
||||||
{
|
{
|
||||||
if (Directory.Exists(Application.StartupPath + "\\portable_config"))
|
string portableFolder = Application.StartupPath + "\\portable_config\\";
|
||||||
_MpvConfFolder = Application.StartupPath + "\\portable_config\\";
|
string appdataFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\mpv\\";
|
||||||
|
|
||||||
|
if (!Directory.Exists(portableFolder) && !Directory.Exists(appdataFolder))
|
||||||
|
{
|
||||||
|
using (TaskDialog<string> td = new TaskDialog<string>())
|
||||||
|
{
|
||||||
|
td.MainInstruction = "Choose a settings folder.";
|
||||||
|
td.Content = "[https://mpv.io/manual/master/#files-on-windows MPV documentation about files on Windows.]";
|
||||||
|
td.AddCommandLink("appdata", appdataFolder);
|
||||||
|
td.AddCommandLink("portable", portableFolder);
|
||||||
|
_MpvConfFolder = td.Show();
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
_MpvConfFolder = Environment.GetFolderPath(
|
if (Directory.Exists(portableFolder))
|
||||||
Environment.SpecialFolder.ApplicationData) + "\\mpv\\";
|
_MpvConfFolder = portableFolder;
|
||||||
|
else
|
||||||
|
_MpvConfFolder = appdataFolder;
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(_MpvConfFolder)) _MpvConfFolder = appdataFolder;
|
||||||
|
if (!Directory.Exists(_MpvConfFolder)) Directory.CreateDirectory(_MpvConfFolder);
|
||||||
|
|
||||||
|
if (!File.Exists(_MpvConfFolder + "\\input.conf"))
|
||||||
|
File.WriteAllText(_MpvConfFolder + "\\input.conf", Properties.Resources.inputConf);
|
||||||
|
|
||||||
|
if (!File.Exists(_MpvConfFolder + "\\mpv.conf"))
|
||||||
|
File.WriteAllText(_MpvConfFolder + "\\mpv.conf", Properties.Resources.mpvConf);
|
||||||
}
|
}
|
||||||
return _MpvConfFolder;
|
return _MpvConfFolder;
|
||||||
}
|
}
|
||||||
@@ -121,15 +144,7 @@ namespace mpvnet
|
|||||||
|
|
||||||
public static void Init()
|
public static void Init()
|
||||||
{
|
{
|
||||||
if (!Directory.Exists(mp.MpvConfFolder))
|
string dummy = MpvConfFolder;
|
||||||
Directory.CreateDirectory(mp.MpvConfFolder);
|
|
||||||
|
|
||||||
if (!File.Exists(mp.MpvConfPath))
|
|
||||||
File.WriteAllText(mp.MpvConfPath, Properties.Resources.mpv_conf);
|
|
||||||
|
|
||||||
if (!File.Exists(mp.InputConfPath))
|
|
||||||
File.WriteAllText(mp.InputConfPath, Properties.Resources.input_conf);
|
|
||||||
|
|
||||||
LoadLibrary("mpv-1.dll");
|
LoadLibrary("mpv-1.dll");
|
||||||
MpvHandle = mpv_create();
|
MpvHandle = mpv_create();
|
||||||
set_property_string("input-default-bindings", "yes");
|
set_property_string("input-default-bindings", "yes");
|
||||||
@@ -162,11 +177,12 @@ namespace mpvnet
|
|||||||
if (Path.GetExtension(scriptPath) == ".ps1")
|
if (Path.GetExtension(scriptPath) == ".ps1")
|
||||||
PowerShellScript.Init(scriptPath);
|
PowerShellScript.Init(scriptPath);
|
||||||
|
|
||||||
foreach (var scriptPath in Directory.GetFiles(mp.MpvConfFolder + "Scripts"))
|
if (Directory.Exists(mp.MpvConfFolder + "Scripts"))
|
||||||
if (Path.GetExtension(scriptPath) == ".py")
|
foreach (var scriptPath in Directory.GetFiles(mp.MpvConfFolder + "Scripts"))
|
||||||
PythonScripts.Add(new PythonScript(File.ReadAllText(scriptPath)));
|
if (Path.GetExtension(scriptPath) == ".py")
|
||||||
else if (Path.GetExtension(scriptPath) == ".ps1")
|
PythonScripts.Add(new PythonScript(File.ReadAllText(scriptPath)));
|
||||||
PowerShellScript.Init(scriptPath);
|
else if (Path.GetExtension(scriptPath) == ".ps1")
|
||||||
|
PowerShellScript.Init(scriptPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void EventLoop()
|
public static void EventLoop()
|
||||||
@@ -235,32 +251,34 @@ namespace mpvnet
|
|||||||
ScriptInputDispatch?.Invoke();
|
ScriptInputDispatch?.Invoke();
|
||||||
break;
|
break;
|
||||||
case mpv_event_id.MPV_EVENT_CLIENT_MESSAGE:
|
case mpv_event_id.MPV_EVENT_CLIENT_MESSAGE:
|
||||||
if (ClientMessage != null)
|
var client_messageData = (mpv_event_client_message)Marshal.PtrToStructure(evt.data, typeof(mpv_event_client_message));
|
||||||
|
string[] args = NativeUtf8StrArray2ManagedStrArray(client_messageData.args, client_messageData.num_args);
|
||||||
|
|
||||||
|
if (args != null && args.Length > 1 && args[0] == "mpv.net")
|
||||||
{
|
{
|
||||||
var client_messageData = (mpv_event_client_message)Marshal.PtrToStructure(evt.data, typeof(mpv_event_client_message));
|
bool found = false;
|
||||||
string[] args = NativeUtf8StrArray2ManagedStrArray(client_messageData.args, client_messageData.num_args);
|
|
||||||
|
|
||||||
if (args != null && args.Length > 1 && args[0] == "mpv.net")
|
foreach (var i in mpvnet.Command.Commands)
|
||||||
{
|
{
|
||||||
bool found = false;
|
if (args[1] == i.Name)
|
||||||
|
{
|
||||||
|
found = true;
|
||||||
|
i.Action.Invoke(args.Skip(2).ToArray());
|
||||||
|
MainForm.Instance.BeginInvoke(new Action(() => {
|
||||||
|
Message m = new Message() { Msg = 0x0202 }; // WM_LBUTTONUP
|
||||||
|
Native.SendMessage(MainForm.Instance.Handle, m.Msg, m.WParam, m.LParam);
|
||||||
|
}));
|
||||||
|
|
||||||
foreach (var i in mpvnet.Command.Commands)
|
|
||||||
{
|
|
||||||
if (args[1] == i.Name)
|
|
||||||
{
|
|
||||||
found = true;
|
|
||||||
i.Action.Invoke(args.Skip(2).ToArray());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!found)
|
|
||||||
{
|
|
||||||
List<string> names = mpvnet.Command.Commands.Select((item) => item.Name).ToList();
|
|
||||||
names.Sort();
|
|
||||||
Msg.ShowError($"No command '{args[1]}' found.", $"Available commands are:\n\n{string.Join("\n", names)}\n\nHow to bind these commands can be seen in the [https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt default input bindings and menu definition].");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ClientMessage?.Invoke(args);
|
if (!found)
|
||||||
|
{
|
||||||
|
List<string> names = mpvnet.Command.Commands.Select((item) => item.Name).ToList();
|
||||||
|
names.Sort();
|
||||||
|
Msg.ShowError($"No command '{args[1]}' found.", $"Available commands are:\n\n{string.Join("\n", names)}\n\nHow to bind these commands can be seen in the [https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt default input bindings and menu definition].");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
ClientMessage?.Invoke(args);
|
||||||
break;
|
break;
|
||||||
case mpv_event_id.MPV_EVENT_VIDEO_RECONFIG:
|
case mpv_event_id.MPV_EVENT_VIDEO_RECONFIG:
|
||||||
VideoReconfig?.Invoke();
|
VideoReconfig?.Invoke();
|
||||||
|
|||||||
@@ -120,6 +120,8 @@
|
|||||||
<HintPath>IronPython\Microsoft.Scripting.dll</HintPath>
|
<HintPath>IronPython\Microsoft.Scripting.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
|
<Reference Include="PresentationCore" />
|
||||||
|
<Reference Include="PresentationFramework" />
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.Composition" />
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
@@ -129,20 +131,41 @@
|
|||||||
<HintPath>..\packages\Microsoft.PowerShell.5.ReferenceAssemblies.1.1.0\lib\net4\System.Management.Automation.dll</HintPath>
|
<HintPath>..\packages\Microsoft.PowerShell.5.ReferenceAssemblies.1.1.0\lib\net4\System.Management.Automation.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xaml" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="WindowsBase" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Addon.cs" />
|
<Compile Include="Addon.cs" />
|
||||||
|
<Page Include="Controls\SearchTextBoxUserControl.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Include="WPF\Resources.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Compile Include="Controls\SearchTextBoxUserControl.xaml.cs">
|
||||||
|
<DependentUpon>SearchTextBoxUserControl.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DynamicGUI\DynamicGUI.cs" />
|
||||||
|
<Compile Include="DynamicGUI\OptionSettingControl.xaml.cs">
|
||||||
|
<DependentUpon>OptionSettingControl.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DynamicGUI\StringSettingControl.xaml.cs">
|
||||||
|
<DependentUpon>StringSettingControl.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DynamicGUI\Tommy.cs" />
|
||||||
<Compile Include="MediaInfo.cs" />
|
<Compile Include="MediaInfo.cs" />
|
||||||
<Compile Include="Menu.cs">
|
<Compile Include="Menu.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="PowerShellScript.cs" />
|
||||||
<Compile Include="Properties\Resources.Designer.cs">
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="PowerShellScript.cs" />
|
|
||||||
<Compile Include="PythonScript.cs" />
|
<Compile Include="PythonScript.cs" />
|
||||||
<Compile Include="libmpv.cs" />
|
<Compile Include="libmpv.cs" />
|
||||||
<Compile Include="MainForm.cs">
|
<Compile Include="MainForm.cs">
|
||||||
@@ -158,8 +181,18 @@
|
|||||||
<Compile Include="NativeHelp.cs" />
|
<Compile Include="NativeHelp.cs" />
|
||||||
<Compile Include="Program.cs" />
|
<Compile Include="Program.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Windows\ConfWindow.xaml.cs">
|
||||||
|
<DependentUpon>ConfWindow.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Windows\LearnWindow.xaml.cs">
|
||||||
|
<DependentUpon>LearnWindow.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Windows\InputWindow.xaml.cs">
|
||||||
|
<DependentUpon>InputWindow.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="trash.cs" />
|
<Compile Include="trash.cs" />
|
||||||
<Compile Include="UI.cs" />
|
<Compile Include="UI.cs" />
|
||||||
|
<Compile Include="WPF\WPF.cs" />
|
||||||
<EmbeddedResource Include="MainForm.resx">
|
<EmbeddedResource Include="MainForm.resx">
|
||||||
<DependentUpon>MainForm.cs</DependentUpon>
|
<DependentUpon>MainForm.cs</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -183,15 +216,18 @@
|
|||||||
<DependentUpon>Settings.settings</DependentUpon>
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Content Include="Resources\mpv.conf.txt" />
|
<Content Include="Resources\mpvConf.txt" />
|
||||||
|
<Content Include="Resources\mpvConfToml.txt" />
|
||||||
|
<Content Include="Resources\mpvNetConfToml.txt" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="mpv.ico" />
|
<Content Include="mpv.ico" />
|
||||||
|
<Content Include="Resources\inputConfHeader.txt" />
|
||||||
<Content Include="screenshot.jpg" />
|
<Content Include="screenshot.jpg" />
|
||||||
<Content Include="Resources\input.conf.txt" />
|
<Content Include="Resources\inputConf.txt" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\VBNET\VBNET.vbproj">
|
<ProjectReference Include="..\VBNET\VBNET.vbproj">
|
||||||
@@ -199,6 +235,28 @@
|
|||||||
<Name>VBNET</Name>
|
<Name>VBNET</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Page Include="DynamicGUI\OptionSettingControl.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Include="DynamicGUI\StringSettingControl.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Include="Windows\ConfWindow.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Include="Windows\LearnWindow.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Include="Windows\InputWindow.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<startup>
|
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
|
|
||||||
</startup>
|
|
||||||
</configuration>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
using System.Windows;
|
|
||||||
|
|
||||||
namespace mpvConfEdit
|
|
||||||
{
|
|
||||||
public partial class App : Application
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Media;
|
|
||||||
|
|
||||||
namespace Controls
|
|
||||||
{
|
|
||||||
class Controls
|
|
||||||
{
|
|
||||||
public static Brush ThemeBrush {
|
|
||||||
get {
|
|
||||||
if (Environment.OSVersion.Version.Major < 10)
|
|
||||||
return new SolidColorBrush(Colors.DimGray);
|
|
||||||
else
|
|
||||||
return SystemParameters.WindowGlassBrush;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2017 stax76
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and ssociated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
using System.Reflection;
|
|
||||||
using System.Resources;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Windows;
|
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
[assembly: AssemblyTitle("mpv(.net) conf edit")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("")]
|
|
||||||
[assembly: AssemblyProduct("mpv(.net) conf edit")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright © 2017-2019 Frank Skare (stax76)")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
|
||||||
// to COM components. If you need to access a type in this assembly from
|
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
//In order to begin building localizable applications, set
|
|
||||||
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
|
|
||||||
//inside a <PropertyGroup>. For example, if you are using US english
|
|
||||||
//in your source files, set the <UICulture> to en-US. Then uncomment
|
|
||||||
//the NeutralResourceLanguage attribute below. Update the "en-US" in
|
|
||||||
//the line below to match the UICulture setting in the project file.
|
|
||||||
|
|
||||||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
|
||||||
|
|
||||||
|
|
||||||
[assembly: ThemeInfo(
|
|
||||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
|
||||||
//(used if a resource is not found in the page,
|
|
||||||
// or application resource dictionaries)
|
|
||||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
|
||||||
//(used if a resource is not found in the page,
|
|
||||||
// app, or any theme specific resource dictionaries)
|
|
||||||
)]
|
|
||||||
|
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
|
||||||
//
|
|
||||||
// Major Version
|
|
||||||
// Minor Version
|
|
||||||
// Build Number
|
|
||||||
// Revision
|
|
||||||
//
|
|
||||||
// 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.9.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.9.0.0")]
|
|
||||||
63
mpvConfEdit/Properties/Resources.Designer.cs
generated
63
mpvConfEdit/Properties/Resources.Designer.cs
generated
@@ -1,63 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// This code was generated by a tool.
|
|
||||||
// Runtime Version:4.0.30319.42000
|
|
||||||
//
|
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
|
||||||
// the code is regenerated.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
namespace mpvConfEdit.Properties {
|
|
||||||
using System;
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
|
||||||
/// </summary>
|
|
||||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
|
||||||
// class via a tool like ResGen or Visual Studio.
|
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
|
||||||
// with the /str option, or rebuild your VS project.
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
|
||||||
internal class Resources {
|
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
|
||||||
internal Resources() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
|
||||||
/// </summary>
|
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
|
||||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
|
||||||
get {
|
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("mpvConfEdit.Properties.Resources", typeof(Resources).Assembly);
|
|
||||||
resourceMan = temp;
|
|
||||||
}
|
|
||||||
return resourceMan;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Overrides the current thread's CurrentUICulture property for all
|
|
||||||
/// resource lookups using this strongly typed resource class.
|
|
||||||
/// </summary>
|
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
|
||||||
internal static global::System.Globalization.CultureInfo Culture {
|
|
||||||
get {
|
|
||||||
return resourceCulture;
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
resourceCulture = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
</root>
|
|
||||||
26
mpvConfEdit/Properties/Settings.Designer.cs
generated
26
mpvConfEdit/Properties/Settings.Designer.cs
generated
@@ -1,26 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// This code was generated by a tool.
|
|
||||||
// Runtime Version:4.0.30319.42000
|
|
||||||
//
|
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
|
||||||
// the code is regenerated.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
namespace mpvConfEdit.Properties {
|
|
||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.0.0.0")]
|
|
||||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
|
||||||
|
|
||||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
|
||||||
|
|
||||||
public static Settings Default {
|
|
||||||
get {
|
|
||||||
return defaultInstance;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
|
||||||
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
|
|
||||||
<Profiles>
|
|
||||||
<Profile Name="(Default)" />
|
|
||||||
</Profiles>
|
|
||||||
<Settings />
|
|
||||||
</SettingsFile>
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
|
||||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
|
||||||
<security>
|
|
||||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
|
||||||
<!--
|
|
||||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
|
||||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
|
||||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
|
||||||
-->
|
|
||||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
|
||||||
</requestedPrivileges>
|
|
||||||
</security>
|
|
||||||
</trustInfo>
|
|
||||||
|
|
||||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
|
||||||
<application>
|
|
||||||
<!-- Windows 7 -->
|
|
||||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
|
|
||||||
|
|
||||||
<!-- Windows 8 -->
|
|
||||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
|
|
||||||
|
|
||||||
<!-- Windows 8.1 -->
|
|
||||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
|
|
||||||
|
|
||||||
<!-- Windows 10 -->
|
|
||||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
|
||||||
</application>
|
|
||||||
</compatibility>
|
|
||||||
|
|
||||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
|
||||||
<windowsSettings>
|
|
||||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
|
||||||
</windowsSettings>
|
|
||||||
</application>
|
|
||||||
</assembly>
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 264 KiB |
@@ -1,149 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{C4FEAA45-001D-4DC8-8BFA-621527326D09}</ProjectGuid>
|
|
||||||
<OutputType>WinExe</OutputType>
|
|
||||||
<RootNamespace>mpvConfEdit</RootNamespace>
|
|
||||||
<AssemblyName>mpvConfEdit</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
|
||||||
<Deterministic>true</Deterministic>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>..\mpv.net\bin\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<LangVersion>8.0</LangVersion>
|
|
||||||
<NullableReferenceTypes>true</NullableReferenceTypes>
|
|
||||||
<NullableContextOptions>enable</NullableContextOptions>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>..\mpv.net\bin\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
<LangVersion>8.0</LangVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<ApplicationIcon>mpv.ico</ApplicationIcon>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Drawing" />
|
|
||||||
<Reference Include="System.Windows.Forms" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="Microsoft.CSharp" />
|
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="System.Net.Http" />
|
|
||||||
<Reference Include="System.Xaml">
|
|
||||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="WindowsBase" />
|
|
||||||
<Reference Include="PresentationCore" />
|
|
||||||
<Reference Include="PresentationFramework" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ApplicationDefinition Include="App.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</ApplicationDefinition>
|
|
||||||
<Compile Include="Controls.cs" />
|
|
||||||
<Compile Include="DynamicGUI\DynamicGUI.cs" />
|
|
||||||
<Compile Include="DynamicGUI\OptionSettingControl.xaml.cs">
|
|
||||||
<DependentUpon>OptionSettingControl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="DynamicGUI\StringSettingControl.xaml.cs">
|
|
||||||
<DependentUpon>StringSettingControl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="DynamicGUI\Tommy.cs" />
|
|
||||||
<Compile Include="SearchTextBoxUserControl.xaml.cs">
|
|
||||||
<DependentUpon>SearchTextBoxUserControl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Page Include="DynamicGUI\OptionSettingControl.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="DynamicGUI\StringSettingControl.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="MainWindow.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
<Compile Include="App.xaml.cs">
|
|
||||||
<DependentUpon>App.xaml</DependentUpon>
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="MainWindow.xaml.cs">
|
|
||||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Page Include="SearchTextBoxUserControl.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Properties\Resources.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Properties\Settings.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DependentUpon>Settings.settings</DependentUpon>
|
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
|
||||||
</Compile>
|
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<None Include="app.manifest" />
|
|
||||||
<None Include="mpvNetConf.toml">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Properties\Settings.settings">
|
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="App.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="mpvConf.toml">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="mpv.ico" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
</Project>
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio Version 16
|
|
||||||
VisualStudioVersion = 16.0.28714.193
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mpvConfEdit", "mpvConfEdit.csproj", "{C4FEAA45-001D-4DC8-8BFA-621527326D09}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{C4FEAA45-001D-4DC8-8BFA-621527326D09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{C4FEAA45-001D-4DC8-8BFA-621527326D09}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{C4FEAA45-001D-4DC8-8BFA-621527326D09}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{C4FEAA45-001D-4DC8-8BFA-621527326D09}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {959F2890-E1FC-47A2-856C-A42F8C955D15}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<configuration>
|
|
||||||
<configSections>
|
|
||||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
|
||||||
<section name="mpvInputEdit.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
|
||||||
</sectionGroup>
|
|
||||||
</configSections>
|
|
||||||
<startup>
|
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
|
||||||
</startup>
|
|
||||||
<userSettings>
|
|
||||||
<mpvInputEdit.Properties.Settings>
|
|
||||||
<setting name="input_conf_help" serializeAs="String">
|
|
||||||
<value> # This file defines the input (keys and mouse) bindings of mpv and mpv.net
|
|
||||||
# and it also defines the context menu of mpv.net. mpv.net has an input
|
|
||||||
# editor and an conf editor as alternatives to editing conf text files.
|
|
||||||
# The input and conf editors can be found in mpv.net's context menu at:
|
|
||||||
|
|
||||||
# Settings > Show Config Editor
|
|
||||||
# Settings > Show Input Editor
|
|
||||||
|
|
||||||
# The defaults of this file can be found at:
|
|
||||||
|
|
||||||
# https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt
|
|
||||||
|
|
||||||
# the defaults of mpv can be found at:
|
|
||||||
|
|
||||||
# https://github.com/mpv-player/mpv/blob/master/etc/input.conf
|
|
||||||
|
|
||||||
# mpv.net's defaults of mpv.conf contain: 'input-default-bindings = no'
|
|
||||||
# which disables mpv's input defaults. Every line in this file begins with a
|
|
||||||
# space character to make it easier to do a text search, so if you want to know
|
|
||||||
# if 'o' has already a binding you can make a text search on ' o '.
|
|
||||||
|
|
||||||
# mpv input commands: https://github.com/stax76/mpv.net/wiki/mpv-input-commands
|
|
||||||
|
|
||||||
# mpv input keys: https://github.com/stax76/mpv.net/wiki/mpv-input-keys</value>
|
|
||||||
</setting>
|
|
||||||
</mpvInputEdit.Properties.Settings>
|
|
||||||
</userSettings>
|
|
||||||
</configuration>
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
<Application x:Class="mpvInputEdit.App"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:Controls="clr-namespace:Controls"
|
|
||||||
StartupUri="MainWindow.xaml">
|
|
||||||
<Application.Resources>
|
|
||||||
<Style TargetType="TextBox">
|
|
||||||
<Setter Property="Template">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate TargetType="{x:Type TextBox}">
|
|
||||||
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
|
||||||
<ScrollViewer x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
|
||||||
</Border>
|
|
||||||
<ControlTemplate.Triggers>
|
|
||||||
<Trigger Property="IsEnabled" Value="false">
|
|
||||||
<Setter Property="Opacity" TargetName="border" Value="0.56"/>
|
|
||||||
</Trigger>
|
|
||||||
<Trigger Property="IsMouseOver" Value="true">
|
|
||||||
<Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
|
|
||||||
</Trigger>
|
|
||||||
<Trigger Property="IsFocused" Value="true">
|
|
||||||
<Setter Property="BorderBrush" TargetName="border" Value="{x:Static Controls:Controls.ThemeBrush}"/>
|
|
||||||
</Trigger>
|
|
||||||
</ControlTemplate.Triggers>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
<Style x:Key="DataGrid_Font_Centering"
|
|
||||||
TargetType="{x:Type DataGridCell}">
|
|
||||||
<Setter Property="Template">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
|
||||||
<Grid Background="{TemplateBinding Background}">
|
|
||||||
<ContentPresenter VerticalAlignment="Center" />
|
|
||||||
</Grid>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
</Application.Resources>
|
|
||||||
</Application>
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using System.IO;
|
|
||||||
using System.Windows;
|
|
||||||
|
|
||||||
namespace mpvInputEdit
|
|
||||||
{
|
|
||||||
public partial class App : Application
|
|
||||||
{
|
|
||||||
public static string InputConfPath { get; } = MpvConfFolder + "input.conf";
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static ObservableCollection<InputItem> _InputItems;
|
|
||||||
|
|
||||||
public static ObservableCollection<InputItem> InputItems
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (_InputItems is null)
|
|
||||||
{
|
|
||||||
_InputItems = new ObservableCollection<InputItem>();
|
|
||||||
|
|
||||||
if (File.Exists(InputConfPath))
|
|
||||||
{
|
|
||||||
foreach (string line in File.ReadAllLines(InputConfPath))
|
|
||||||
{
|
|
||||||
string l = line.Trim();
|
|
||||||
if (l.StartsWith("#")) continue;
|
|
||||||
if (!l.Contains(" ")) continue;
|
|
||||||
InputItem item = new InputItem();
|
|
||||||
item.Input = l.Substring(0, l.IndexOf(" "));
|
|
||||||
if (item.Input == "") continue;
|
|
||||||
l = l.Substring(l.IndexOf(" ") + 1);
|
|
||||||
|
|
||||||
if (l.Contains("#menu:"))
|
|
||||||
{
|
|
||||||
item.Menu = l.Substring(l.IndexOf("#menu:") + 6).Trim();
|
|
||||||
l = l.Substring(0, l.IndexOf("#menu:"));
|
|
||||||
|
|
||||||
if (item.Menu.Contains(";"))
|
|
||||||
item.Menu = item.Menu.Substring(item.Menu.IndexOf(";") + 1).Trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
item.Command = l.Trim();
|
|
||||||
if (item.Command == "")
|
|
||||||
continue;
|
|
||||||
if (item.Command.ToLower() == "ignore")
|
|
||||||
item.Command = "";
|
|
||||||
_InputItems.Add(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return _InputItems;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Media;
|
|
||||||
|
|
||||||
namespace Controls
|
|
||||||
{
|
|
||||||
class Controls
|
|
||||||
{
|
|
||||||
public static Brush ThemeBrush {
|
|
||||||
get {
|
|
||||||
if (Environment.OSVersion.Version.Major < 10)
|
|
||||||
return new SolidColorBrush(Colors.DarkSlateGray);
|
|
||||||
else
|
|
||||||
return SystemParameters.WindowGlassBrush;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2017 stax76
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and ssociated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
using System.Reflection;
|
|
||||||
using System.Resources;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Windows;
|
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
[assembly: AssemblyTitle("mpv(.net) input edit")]
|
|
||||||
[assembly: AssemblyDescription("mpv(.net) key and mouse bindings editor")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("")]
|
|
||||||
[assembly: AssemblyProduct("mpv(.net) input edit")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright © 2017-2019 Frank Skare (stax76)")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
|
||||||
// to COM components. If you need to access a type in this assembly from
|
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
//In order to begin building localizable applications, set
|
|
||||||
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
|
|
||||||
//inside a <PropertyGroup>. For example, if you are using US english
|
|
||||||
//in your source files, set the <UICulture> to en-US. Then uncomment
|
|
||||||
//the NeutralResourceLanguage attribute below. Update the "en-US" in
|
|
||||||
//the line below to match the UICulture setting in the project file.
|
|
||||||
|
|
||||||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
|
||||||
|
|
||||||
|
|
||||||
[assembly: ThemeInfo(
|
|
||||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
|
||||||
//(used if a resource is not found in the page,
|
|
||||||
// or application resource dictionaries)
|
|
||||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
|
||||||
//(used if a resource is not found in the page,
|
|
||||||
// app, or any theme specific resource dictionaries)
|
|
||||||
)]
|
|
||||||
|
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
|
||||||
//
|
|
||||||
// Major Version
|
|
||||||
// Minor Version
|
|
||||||
// Build Number
|
|
||||||
// Revision
|
|
||||||
//
|
|
||||||
// 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.7.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.7.0.0")]
|
|
||||||
66
mpvInputEdit/Properties/Resources.Designer.cs
generated
66
mpvInputEdit/Properties/Resources.Designer.cs
generated
@@ -1,66 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// This code was generated by a tool.
|
|
||||||
// Runtime Version:4.0.30319.42000
|
|
||||||
//
|
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
|
||||||
// the code is regenerated.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
namespace mpvInputEdit.Properties
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
|
||||||
/// </summary>
|
|
||||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
|
||||||
// class via a tool like ResGen or Visual Studio.
|
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
|
||||||
// with the /str option, or rebuild your VS project.
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
|
||||||
internal class Resources
|
|
||||||
{
|
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
|
||||||
internal Resources()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
|
||||||
/// </summary>
|
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
|
||||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
|
||||||
get {
|
|
||||||
if ((resourceMan == null))
|
|
||||||
{
|
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("mpvInputEdit.Properties.Resources", typeof(Resources).Assembly);
|
|
||||||
resourceMan = temp;
|
|
||||||
}
|
|
||||||
return resourceMan;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Overrides the current thread's CurrentUICulture property for all
|
|
||||||
/// resource lookups using this strongly typed resource class.
|
|
||||||
/// </summary>
|
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
|
||||||
internal static global::System.Globalization.CultureInfo Culture {
|
|
||||||
get {
|
|
||||||
return resourceCulture;
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
resourceCulture = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
</root>
|
|
||||||
61
mpvInputEdit/Properties/Settings.Designer.cs
generated
61
mpvInputEdit/Properties/Settings.Designer.cs
generated
@@ -1,61 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// This code was generated by a tool.
|
|
||||||
// Runtime Version:4.0.30319.42000
|
|
||||||
//
|
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
|
||||||
// the code is regenerated.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
namespace mpvInputEdit.Properties {
|
|
||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.0.0.0")]
|
|
||||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
|
||||||
|
|
||||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
|
||||||
|
|
||||||
public static Settings Default {
|
|
||||||
get {
|
|
||||||
return defaultInstance;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute(@" # This file defines the input (keys and mouse) bindings of mpv and mpv.net
|
|
||||||
# and it also defines the context menu of mpv.net. mpv.net has an input
|
|
||||||
# editor and an conf editor as alternatives to editing conf text files.
|
|
||||||
# The input and conf editors can be found in mpv.net's context menu at:
|
|
||||||
|
|
||||||
# Settings > Show Config Editor
|
|
||||||
# Settings > Show Input Editor
|
|
||||||
|
|
||||||
# The defaults of this file can be found at:
|
|
||||||
|
|
||||||
# https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt
|
|
||||||
|
|
||||||
# the defaults of mpv can be found at:
|
|
||||||
|
|
||||||
# https://github.com/mpv-player/mpv/blob/master/etc/input.conf
|
|
||||||
|
|
||||||
# mpv.net's defaults of mpv.conf contain: 'input-default-bindings = no'
|
|
||||||
# which disables mpv's input defaults. Every line in this file begins with a
|
|
||||||
# space character to make it easier to do a text search, so if you want to know
|
|
||||||
# if 'o' has already a binding you can make a text search on ' o '.
|
|
||||||
|
|
||||||
# mpv input commands: https://github.com/stax76/mpv.net/wiki/mpv-input-commands
|
|
||||||
|
|
||||||
# mpv input keys: https://github.com/stax76/mpv.net/wiki/mpv-input-keys")]
|
|
||||||
public string input_conf_help {
|
|
||||||
get {
|
|
||||||
return ((string)(this["input_conf_help"]));
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
this["input_conf_help"] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<UserControl x:Class="Controls.SearchTextBoxUserControl"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
|
||||||
<Grid x:Name="SearchTextBoxUserControl1" Background="White">
|
|
||||||
<TextBlock x:Name="SearchHintTextBlock" Margin="5,2" Text="Type ? to get help." Foreground="LightSteelBlue" VerticalAlignment="Center" />
|
|
||||||
<TextBox Name="SearchTextBox" Height="25" Padding="1,2,0,0" BorderThickness="2" Background="Transparent" TextChanged="SearchTextBox_TextChanged" />
|
|
||||||
<Button x:Name="SearchClearButton" Background="Transparent" HorizontalAlignment="Right" Margin="2,0,4,0" FontSize="5" Width="17" Height="17" Visibility="Hidden" Click="SearchClearButton_Click">╳</Button>
|
|
||||||
</Grid>
|
|
||||||
</UserControl>
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
using System.Windows;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Input;
|
|
||||||
|
|
||||||
namespace Controls
|
|
||||||
{
|
|
||||||
public partial class SearchTextBoxUserControl : UserControl
|
|
||||||
{
|
|
||||||
public SearchTextBoxUserControl()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Text { get => SearchTextBox.Text; set => SearchTextBox.Text = value; }
|
|
||||||
|
|
||||||
private void SearchClearButton_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
SearchTextBox.Text = "";
|
|
||||||
Keyboard.Focus(SearchTextBox);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SearchTextBox_TextChanged(object sender, TextChangedEventArgs e)
|
|
||||||
{
|
|
||||||
SearchHintTextBlock.Text = SearchTextBox.Text == "" ? "Type ? to get help." : "";
|
|
||||||
|
|
||||||
if (SearchTextBox.Text == "")
|
|
||||||
SearchClearButton.Visibility = Visibility.Hidden;
|
|
||||||
else
|
|
||||||
SearchClearButton.Visibility = Visibility.Visible;
|
|
||||||
|
|
||||||
if (SearchTextBox.Text == "?")
|
|
||||||
MessageBox.Show("Filtering works by searching in the Input, Menu and Command but it's possible to reduce the filter scope to either of Input, Menu or Command by prefixing as follows:\n\ni <input search>\ni: <input search>\n\nm <menu search>\nm: <menu search>\n\nc <command search>\nc: <command search>\n\nIf only one character is entered the search will be performed only in the input.", "Filtering", MessageBoxButton.OK, MessageBoxImage.Information);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
|
||||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
|
||||||
<security>
|
|
||||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
|
||||||
<!--
|
|
||||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
|
||||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
|
||||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
|
||||||
-->
|
|
||||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
|
||||||
</requestedPrivileges>
|
|
||||||
</security>
|
|
||||||
</trustInfo>
|
|
||||||
|
|
||||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
|
||||||
<application>
|
|
||||||
<!-- Windows 7 -->
|
|
||||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
|
|
||||||
|
|
||||||
<!-- Windows 8 -->
|
|
||||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
|
|
||||||
|
|
||||||
<!-- Windows 8.1 -->
|
|
||||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
|
|
||||||
|
|
||||||
<!-- Windows 10 -->
|
|
||||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
|
||||||
</application>
|
|
||||||
</compatibility>
|
|
||||||
|
|
||||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
|
||||||
<windowsSettings>
|
|
||||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
|
||||||
</windowsSettings>
|
|
||||||
</application>
|
|
||||||
</assembly>
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.Serialization;
|
|
||||||
|
|
||||||
namespace mpvInputEdit
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public class InputItem : INotifyPropertyChanged
|
|
||||||
{
|
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
|
||||||
public string Menu { get; set; } = "";
|
|
||||||
public string Command { get; set; } = "";
|
|
||||||
|
|
||||||
public InputItem() { }
|
|
||||||
|
|
||||||
public InputItem(SerializationInfo info, StreamingContext context) {}
|
|
||||||
|
|
||||||
private void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
|
|
||||||
{
|
|
||||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|
||||||
}
|
|
||||||
|
|
||||||
private string _Input = "";
|
|
||||||
|
|
||||||
public string Input {
|
|
||||||
get => _Input;
|
|
||||||
set {
|
|
||||||
_Input = value;
|
|
||||||
NotifyPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 264 KiB |
@@ -1,129 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{635F8308-9F79-4BCC-B839-75FCEF8588AE}</ProjectGuid>
|
|
||||||
<OutputType>WinExe</OutputType>
|
|
||||||
<RootNamespace>mpvInputEdit</RootNamespace>
|
|
||||||
<AssemblyName>mpvInputEdit</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
|
||||||
<Deterministic>true</Deterministic>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>..\mpv.net\bin\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>..\mpv.net\bin\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<ApplicationIcon>mpv.ico</ApplicationIcon>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Windows.Forms" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="Microsoft.CSharp" />
|
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="System.Net.Http" />
|
|
||||||
<Reference Include="System.Xaml">
|
|
||||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="WindowsBase" />
|
|
||||||
<Reference Include="PresentationCore" />
|
|
||||||
<Reference Include="PresentationFramework" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ApplicationDefinition Include="App.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</ApplicationDefinition>
|
|
||||||
<Compile Include="Controls.cs" />
|
|
||||||
<Compile Include="SearchTextBoxUserControl.xaml.cs">
|
|
||||||
<DependentUpon>SearchTextBoxUserControl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Page Include="InputWindow.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="MainWindow.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
<Compile Include="App.xaml.cs">
|
|
||||||
<DependentUpon>App.xaml</DependentUpon>
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="InputWindow.xaml.cs">
|
|
||||||
<DependentUpon>InputWindow.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="MainWindow.xaml.cs">
|
|
||||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Page Include="SearchTextBoxUserControl.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="misc.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Properties\Resources.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Properties\Settings.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DependentUpon>Settings.settings</DependentUpon>
|
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
|
||||||
</Compile>
|
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<None Include="..\README.md">
|
|
||||||
<Link>README.md</Link>
|
|
||||||
</None>
|
|
||||||
<None Include="app.manifest" />
|
|
||||||
<None Include="Properties\Settings.settings">
|
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="App.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="mpv.ico" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
</Project>
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio Version 16
|
|
||||||
VisualStudioVersion = 16.0.28721.148
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mpvInputEdit", "mpvInputEdit.csproj", "{635F8308-9F79-4BCC-B839-75FCEF8588AE}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{635F8308-9F79-4BCC-B839-75FCEF8588AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{635F8308-9F79-4BCC-B839-75FCEF8588AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{635F8308-9F79-4BCC-B839-75FCEF8588AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{635F8308-9F79-4BCC-B839-75FCEF8588AE}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {492E8273-D465-496D-BA18-DC8CEC9EAD70}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
Reference in New Issue
Block a user