diff --git a/README.md b/README.md index 2699c78..e35d817 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,12 @@ https://github.com/stax76/mpv.net/wiki/Scripting-(CSharp,-Python,-JavaScript,-Lu ### Changelog +### 2.4 (2019-0?-??) + +* new options added to the conf GUI editor: gpu-context, gpu-api, scale, cscale, dscale, dither-depth, correct-downscaling, sigmoid-upscaling, deband +* the conf edit GUI has a 'Apply' feature added to write the conf to mpv.conf without the need to close the conf edit GUI +* the input edit GUI shows a message box when a duplicate is detected and writes help on top of input.conf + ### 2.3 (2019-04-04) - dragging a youtube URL on mpv.net would still break something, it should work now diff --git a/mpvConfEdit/MainWindow.xaml b/mpvConfEdit/MainWindow.xaml index e451bff..af2439f 100644 --- a/mpvConfEdit/MainWindow.xaml +++ b/mpvConfEdit/MainWindow.xaml @@ -4,7 +4,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" - Height="500" Width="700" Loaded="MainWindow1_Loaded"> + Height="600" Width="800" Loaded="MainWindow1_Loaded"> @@ -14,8 +14,8 @@ - - + + @@ -31,6 +31,7 @@ Open settings folder Show mpv manual Show support forum + Write config to mpv.conf \ No newline at end of file diff --git a/mpvConfEdit/MainWindow.xaml.cs b/mpvConfEdit/MainWindow.xaml.cs index 99af4d2..2e50fb3 100644 --- a/mpvConfEdit/MainWindow.xaml.cs +++ b/mpvConfEdit/MainWindow.xaml.cs @@ -79,7 +79,11 @@ namespace mpvConfEdit protected override void OnClosed(EventArgs e) { base.OnClosed(e); + WriteToDisk(); + } + void WriteToDisk() + { foreach (var mpvSetting in DynamicSettings) { switch (mpvSetting) @@ -149,12 +153,8 @@ namespace mpvConfEdit } File.WriteAllText(mpvConfPath, String.Join(Environment.NewLine, lines)); - - foreach (Process process in Process.GetProcesses()) - if (process.ProcessName == "mpvnet") - MessageBox.Show("Restart mpv.net in order to apply changed settings.", Title, MessageBoxButton.OK, MessageBoxImage.Information); - else if (process.ProcessName == "mpv") - MessageBox.Show("Restart mpv in order to apply changed settings.", Title, MessageBoxButton.OK, MessageBoxImage.Information); + MessageBox.Show("Changes will be available on next startup of mpv(.net).", + Title, MessageBoxButton.OK, MessageBoxImage.Information); } private void SearchTextBox_TextChanged(object sender, TextChangedEventArgs e) @@ -210,5 +210,10 @@ namespace mpvConfEdit { Process.Start("https://github.com/stax76/mpv.net#Support"); } + + private void ApplyTextBlock_MouseUp(object sender, MouseButtonEventArgs e) + { + WriteToDisk(); + } } } \ No newline at end of file diff --git a/mpvConfEdit/Properties/AssemblyInfo.cs b/mpvConfEdit/Properties/AssemblyInfo.cs index 8259b3f..cf39463 100644 --- a/mpvConfEdit/Properties/AssemblyInfo.cs +++ b/mpvConfEdit/Properties/AssemblyInfo.cs @@ -12,7 +12,7 @@ using System.Windows; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("mpv(.net) conf edit")] -[assembly: AssemblyCopyright("Copyright © stax76")] +[assembly: AssemblyCopyright("Copyright © 2017 stax76")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -51,5 +51,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.0.0")] -[assembly: AssemblyFileVersion("1.1.0.0")] +[assembly: AssemblyVersion("1.2.0.0")] +[assembly: AssemblyFileVersion("1.2.0.0")] diff --git a/mpvConfEdit/mpvConfEdit.toml b/mpvConfEdit/mpvConfEdit.toml index 52f77a4..17b21f8 100644 --- a/mpvConfEdit/mpvConfEdit.toml +++ b/mpvConfEdit/mpvConfEdit.toml @@ -19,6 +19,28 @@ options = [{ name = "no", help = "always use software decoding (Defaul { name = "crystalhd", help = "copies video back to system RAM (Any platform supported by hardware)" }, { name = "rkmpp", help = "requires --vo=gpu (some RockChip devices only)" }] +[[settings]] +name = "gpu-api" +default = "auto" +filter = "Video" +help = "--gpu-api= Controls which type of graphics APIs will be accepted." +options = [{ name = "auto", help = "Use any available API (Default)" }, + { name = "opengl", help = "Allow only OpenGL (requires OpenGL 2.1+ or GLES 2.0+)" }, + { name = "vulkan", help = "Allow only Vulkan (requires a valid/working --spirv-compiler)" }, + { name = "d3d11", help = "Allow only --gpu-context=d3d11" }] + +[[settings]] +name = "gpu-context" +default = "auto" +filter = "Video" +help = "--gpu-context= The value auto (the default) selects the GPU context. You can also pass help to get a complete list of compiled in backends (sorted by autoprobe order)." +options = [{ name = "auto", help = "auto-select (Default)" }, + { name = "win", help = "Win32/WGL" }, + { name = "winvk", help = "VK_KHR_win32_surface" }, + { name = "angle", help = "Direct3D11 through the OpenGL ES translation layer ANGLE. This supports almost everything the win backend does (if the ANGLE build is new enough)." }, + { name = "dxinterop", help = "(experimental) Win32, using WGL for rendering and Direct3D 9Ex for presentation. Works on Nvidia and AMD. Newer Intel chips with the latest drivers may also work." }, + { name = "d3d11", help = "Win32, with native Direct3D 11 rendering." }] + [[settings]] name = "vo" default = "gpu" @@ -28,6 +50,96 @@ help = "--gpu= Video output drivers to be used. Default = gpu.\n\nFor more options = [{ name = "gpu", help = "General purpose, customizable, GPU-accelerated video output driver. It supports extended scaling methods, dithering, color management, custom shaders, HDR, and more. (Default)" }, { name = "direct3d", help = "Video output driver that uses the Direct3D interface" }] +[[settings]] +name = "video-sync" +default = "audio" +filter = "Video" +help = "--video-sync= How the player synchronizes audio and video.\n\nFor more information visit:" +helpurl = "https://mpv.io/manual/master/#options-video-sync" +options = [{ name = "audio" }, + { name = "display-resample" }, + { name = "display-resample-vdrop" }, + { name = "display-resample-desync" }, + { name = "display-vdrop" }, + { name = "display-adrop" }, + { name = "display-desync" }, + { name = "desync" }] + +[[settings]] +name = "scale" +default = "bilinear" +filter = "Video" +help = "--scale= The GPU renderer filter function to use when upscaling video. There are some more filters, but most are not as useful. For a complete list, pass help as value, e.g.: mpv --scale=help" +options = [{ name = "bilinear", help = "Bilinear hardware texture filtering (fastest, very low quality). This is the default for compatibility reasons." }, + { name = "spline36", help = "Mid quality and speed. This is the default when using gpu-hq." }, + { name = "lanczos", help = "Lanczos scaling. Provides mid quality and speed. Generally worse than spline36, but it results in a slightly sharper image which is good for some content types. The number of taps can be controlled with scale-radius, but is best left unchanged. (This filter is an alias for sinc-windowed sinc)" }, + { name = "ewa_lanczos", help = "Elliptic weighted average Lanczos scaling. Also known as Jinc. Relatively slow, but very good quality. The radius can be controlled with scale-radius. Increasing the radius makes the filter sharper but adds more ringing. (This filter is an alias for jinc-windowed jinc)" }, + { name = "ewa_lanczossharp", help = "A slightly sharpened version of ewa_lanczos, preconfigured to use an ideal radius and parameter. If your hardware can run it, this is probably what you should use by default." }, + { name = "mitchell", help = "Mitchell-Netravali. The B and C parameters can be set with --scale-param1 and --scale-param2. This filter is very good at downscaling (see --dscale)." }, + { name = "oversample", help = "A version of nearest neighbour that (naively) oversamples pixels, so that pixels overlapping edges get linearly interpolated instead of rounded. This essentially removes the small imperfections and judder artifacts caused by nearest-neighbour interpolation, in exchange for adding some blur. This filter is good at temporal interpolation, and also known as \"smoothmotion\" (see --tscale)." }, + { name = "linear", help = "A --tscale filter." }] + +[[settings]] +name = "cscale" +default = "bilinear" +filter = "Video" +help = "--cscale= As --scale, but for interpolating chroma information. If the image is not subsampled, this option is ignored entirely." +options = [{ name = "bilinear", help = "Bilinear hardware texture filtering (fastest, very low quality). This is the default for compatibility reasons." }, + { name = "spline36", help = "Mid quality and speed. This is the default when using gpu-hq." }, + { name = "lanczos", help = "Lanczos scaling. Provides mid quality and speed. Generally worse than spline36, but it results in a slightly sharper image which is good for some content types. The number of taps can be controlled with scale-radius, but is best left unchanged. (This filter is an alias for sinc-windowed sinc)" }, + { name = "ewa_lanczos", help = "Elliptic weighted average Lanczos scaling. Also known as Jinc. Relatively slow, but very good quality. The radius can be controlled with scale-radius. Increasing the radius makes the filter sharper but adds more ringing. (This filter is an alias for jinc-windowed jinc)" }, + { name = "ewa_lanczossharp", help = "A slightly sharpened version of ewa_lanczos, preconfigured to use an ideal radius and parameter. If your hardware can run it, this is probably what you should use by default." }, + { name = "mitchell", help = "Mitchell-Netravali. The B and C parameters can be set with --scale-param1 and --scale-param2. This filter is very good at downscaling (see --dscale)." }, + { name = "oversample", help = "A version of nearest neighbour that (naively) oversamples pixels, so that pixels overlapping edges get linearly interpolated instead of rounded. This essentially removes the small imperfections and judder artifacts caused by nearest-neighbour interpolation, in exchange for adding some blur. This filter is good at temporal interpolation, and also known as \"smoothmotion\" (see --tscale)." }, + { name = "linear", help = "A --tscale filter." }] + +[[settings]] +name = "dscale" +default = "bilinear" +filter = "Video" +help = "--dscale= Like --scale, but apply these filters on downscaling instead. If this option is unset, the filter implied by --scale will be applied." +options = [{ name = "bilinear", help = "Bilinear hardware texture filtering (fastest, very low quality). This is the default for compatibility reasons." }, + { name = "spline36", help = "Mid quality and speed. This is the default when using gpu-hq." }, + { name = "lanczos", help = "Lanczos scaling. Provides mid quality and speed. Generally worse than spline36, but it results in a slightly sharper image which is good for some content types. The number of taps can be controlled with scale-radius, but is best left unchanged. (This filter is an alias for sinc-windowed sinc)" }, + { name = "ewa_lanczos", help = "Elliptic weighted average Lanczos scaling. Also known as Jinc. Relatively slow, but very good quality. The radius can be controlled with scale-radius. Increasing the radius makes the filter sharper but adds more ringing. (This filter is an alias for jinc-windowed jinc)" }, + { name = "ewa_lanczossharp", help = "A slightly sharpened version of ewa_lanczos, preconfigured to use an ideal radius and parameter. If your hardware can run it, this is probably what you should use by default." }, + { name = "mitchell", help = "Mitchell-Netravali. The B and C parameters can be set with --scale-param1 and --scale-param2. This filter is very good at downscaling (see --dscale)." }, + { name = "oversample", help = "A version of nearest neighbour that (naively) oversamples pixels, so that pixels overlapping edges get linearly interpolated instead of rounded. This essentially removes the small imperfections and judder artifacts caused by nearest-neighbour interpolation, in exchange for adding some blur. This filter is good at temporal interpolation, and also known as \"smoothmotion\" (see --tscale)." }, + { name = "linear", help = "A --tscale filter." }] + +[[settings]] +name = "dither-depth" +default = "no" +filter = "Video" +help = "--dither-depth= Set dither target depth to N. Default: no. Note that the depth of the connected video display device cannot be detected. Often, LCD panels will do dithering on their own, which conflicts with this option and leads to ugly output." +options = [{ name = "no", help = "Disable any dithering done by mpv." }, + { name = "auto", help = "Automatic selection. If output bit depth cannot be detected, 8 bits per component are assumed." }, + { name = "8", help = "Dither to 8 bit output." }] + +[[settings]] +name = "correct-downscaling" +default = "no" +filter = "Video" +help = "--correct-downscaling When using convolution based filters, extend the filter size when downscaling. Increases quality, but reduces performance while downscaling.\n\nThis will perform slightly sub-optimally for anamorphic video (but still better than without it) since it will extend the size to match only the milder of the scale factors between the axes." +options = [{ name = "yes" }, + { name = "no" }] + +[[settings]] +name = "sigmoid-upscaling" +default = "no" +filter = "Video" +help = "--sigmoid-upscaling When upscaling, use a sigmoidal color transform to avoid emphasizing ringing artifacts. This also implies --linear-scaling." +options = [{ name = "yes" }, + { name = "no" }] + +[[settings]] +name = "deband" +default = "no" +filter = "Video" +help = "--deband Enable the debanding algorithm. This greatly reduces the amount of visible banding, blocking and other quantization artifacts, at the expense of very slightly blurring some of the finest details. In practice, it's virtually always an improvement - the only reason to disable it would be for performance." +options = [{ name = "yes" }, + { name = "no" }] + [[settings]] name = "volume" default = "100" @@ -145,21 +257,6 @@ default = "" filter = "Playback" help = "--loop-playlist=, --loop-playlist Loops playback N times. A value of 1 plays it one time (default), 2 two times, etc. inf means forever. no is the same as 1 and disables looping. If several files are specified on command line, the entire playlist is looped. --loop-playlist is the same as --loop-playlist=inf.\n\nThe force mode is like inf, but does not skip playlist entries which have been marked as failing. This means the player might waste CPU time trying to loop a file that doesn't exist. But it might be useful for playing webradios under very bad network conditions." -[[settings]] -name = "video-sync" -default = "audio" -filter = "Video" -help = "--video-sync= How the player synchronizes audio and video.\n\nFor more information visit:" -helpurl = "https://mpv.io/manual/master/#options-video-sync" -options = [{ name = "audio" }, - { name = "display-resample" }, - { name = "display-resample-vdrop" }, - { name = "display-resample-desync" }, - { name = "display-vdrop" }, - { name = "display-adrop" }, - { name = "display-desync" }, - { name = "desync" }] - [[settings]] name = "audio-file-auto" default = "no" diff --git a/mpvInputEdit/App.config b/mpvInputEdit/App.config index 56efbc7..54f3e91 100644 --- a/mpvInputEdit/App.config +++ b/mpvInputEdit/App.config @@ -1,6 +1,41 @@  + + +
+ + + + + + # 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 a input + # editor and a conf editor as alternatives to editing this file via texteditor. + # 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 + + + \ No newline at end of file diff --git a/mpvInputEdit/App.xaml.cs b/mpvInputEdit/App.xaml.cs index 3fec150..d223a18 100644 --- a/mpvInputEdit/App.xaml.cs +++ b/mpvInputEdit/App.xaml.cs @@ -27,8 +27,8 @@ namespace mpvInputEdit if (l.StartsWith("#")) continue; if (!l.Contains(" ")) continue; InputItem item = new InputItem(); - item.Key = l.Substring(0, l.IndexOf(" ")); - if (item.Key == "") continue; + item.Input = l.Substring(0, l.IndexOf(" ")); + if (item.Input == "") continue; l = l.Substring(l.IndexOf(" ") + 1); if (l.Contains("#menu:")) diff --git a/mpvInputEdit/InputWindow.xaml.cs b/mpvInputEdit/InputWindow.xaml.cs index b55a24f..b4f7ca4 100644 --- a/mpvInputEdit/InputWindow.xaml.cs +++ b/mpvInputEdit/InputWindow.xaml.cs @@ -277,18 +277,18 @@ namespace mpvInputEdit { HwndSource source = HwndSource.FromHwnd(new WindowInteropHelper(this).Handle); source.AddHook(new HwndSourceHook(WndProc)); - SetKey(InputItem.Key); + SetKey(InputItem.Input); } private void ConfirmButton_Click(object sender, RoutedEventArgs e) { - InputItem.Key = NewKey; + InputItem.Input = NewKey; Close(); } private void ClearButton_Click(object sender, RoutedEventArgs e) { - InputItem.Key = "_"; + InputItem.Input = "_"; Close(); } diff --git a/mpvInputEdit/MainWindow.xaml b/mpvInputEdit/MainWindow.xaml index 0fa6d7d..00dc1c4 100644 --- a/mpvInputEdit/MainWindow.xaml +++ b/mpvInputEdit/MainWindow.xaml @@ -8,18 +8,18 @@ Loaded="Window_Loaded" Closed="Window_Closed"> - + - - + + diff --git a/mpvInputEdit/MainWindow.xaml.cs b/mpvInputEdit/MainWindow.xaml.cs index a4df647..a8852e4 100644 --- a/mpvInputEdit/MainWindow.xaml.cs +++ b/mpvInputEdit/MainWindow.xaml.cs @@ -1,6 +1,6 @@ using System; +using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.IO; using System.Reflection; using System.Windows; @@ -35,13 +35,11 @@ namespace mpvInputEdit bool Filter(InputItem item) { string searchText = SearchControl.SearchTextBox.Text.ToLowerInvariant(); - - if (searchText == "") - return true; + if (searchText == "") return true; if (item.Command.ToLower().Contains(searchText) || item.Menu.ToLower().Contains(searchText) || - item.Key.ToLower().Contains(searchText)) + item.Input.ToLower().Contains(searchText)) { return true; } @@ -56,44 +54,33 @@ namespace mpvInputEdit w.Owner = this; w.InputItem = item; w.ShowDialog(); + + var items = new Dictionary(); + + foreach (InputItem i in App.InputItems) + 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); + else + items[i.Input] = i; } - private void Window_Loaded(object sender, RoutedEventArgs e) - { - Keyboard.Focus(SearchControl.SearchTextBox); - } - - private void Grid_PreviewCanExecute(object sender, CanExecuteRoutedEventArgs e) - { - DataGrid grid = (DataGrid)sender; - - if (e.Command == DataGrid.DeleteCommand) - { - if (MessageBox.Show($"Would you like to delete the selected item?\n\n{(grid.SelectedItem as InputItem).Menu}", - "Confirm Delete", MessageBoxButton.OKCancel) != MessageBoxResult.OK) - { - e.Handled = true; - } - } - } + private void Window_Loaded(object sender, RoutedEventArgs e) => Keyboard.Focus(SearchControl.SearchTextBox); private void Window_Closed(object sender, EventArgs e) { - if (MessageBox.Show("Would you like to save changes?", "Confirm Save", MessageBoxButton.OKCancel) != MessageBoxResult.OK) - return; - var backupDir = Path.GetDirectoryName(App.InputConfPath) + "\\backup\\"; if (!Directory.Exists(backupDir)) Directory.CreateDirectory(backupDir); - File.Copy(App.InputConfPath, backupDir + "input conf " + DateTime.Now.ToString("yyyy-MM-dd HH-mm") + ".conf"); + if (File.Exists(App.InputConfPath)) + File.Copy(App.InputConfPath, backupDir + "input conf " + DateTime.Now.ToString("yyyy-MM-dd HH-mm") + ".conf"); - string text = ""; + string text = "\r\n" + Properties.Settings.Default.input_conf_help + "\r\n\r\n"; foreach (InputItem item in App.InputItems) { - string line = " " + item.Key.PadRight(14); + string line = " " + item.Input.PadRight(10); if (item.Command.Trim() == "") line += " ignore"; @@ -108,11 +95,17 @@ namespace mpvInputEdit File.WriteAllText(App.InputConfPath, text); - foreach (Process process in Process.GetProcesses()) - if (process.ProcessName == "mpvnet") - MessageBox.Show("Restart mpv.net in order to apply changed input bindings.", Title, MessageBoxButton.OK, MessageBoxImage.Information); - else if (process.ProcessName == "mpv") - MessageBox.Show("Restart mpv in order to apply changed input bindings.", Title, MessageBoxButton.OK, MessageBoxImage.Information); + MessageBox.Show("Changes will be available on next mpv(.net) startup.", + Title, MessageBoxButton.OK, MessageBoxImage.Information); + } + + private void DataGrid_PreviewCanExecute(object sender, CanExecuteRoutedEventArgs e) + { + DataGrid grid = (DataGrid)sender; + + if (e.Command == DataGrid.DeleteCommand) + if (MessageBox.Show($"Confirm to delete: {(grid.SelectedItem as InputItem).Input} ({(grid.SelectedItem as InputItem).Menu})", "Confirm Delete", MessageBoxButton.OKCancel, MessageBoxImage.Question) != MessageBoxResult.OK) + e.Handled = true; } } } \ No newline at end of file diff --git a/mpvInputEdit/Properties/AssemblyInfo.cs b/mpvInputEdit/Properties/AssemblyInfo.cs index baa18c7..a36ae33 100644 --- a/mpvInputEdit/Properties/AssemblyInfo.cs +++ b/mpvInputEdit/Properties/AssemblyInfo.cs @@ -12,7 +12,7 @@ using System.Windows; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("mpv(.net) input edit")] -[assembly: AssemblyCopyright("Copyright © stax76")] +[assembly: AssemblyCopyright("Copyright © 2017 stax76")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -51,5 +51,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.0.0")] -[assembly: AssemblyFileVersion("1.1.0.0")] +[assembly: AssemblyVersion("1.2.0.0")] +[assembly: AssemblyFileVersion("1.2.0.0")] diff --git a/mpvInputEdit/Properties/Settings.Designer.cs b/mpvInputEdit/Properties/Settings.Designer.cs index 79837a8..3ae44e1 100644 --- a/mpvInputEdit/Properties/Settings.Designer.cs +++ b/mpvInputEdit/Properties/Settings.Designer.cs @@ -8,21 +8,54 @@ // //------------------------------------------------------------------------------ -namespace mpvInputEdit.Properties -{ - - +namespace mpvInputEdit.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [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 a input + # editor and a conf editor as alternatives to editing this file via texteditor. + # 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; + } + } } } diff --git a/mpvInputEdit/Properties/Settings.settings b/mpvInputEdit/Properties/Settings.settings index 033d7a5..ce932c6 100644 --- a/mpvInputEdit/Properties/Settings.settings +++ b/mpvInputEdit/Properties/Settings.settings @@ -1,7 +1,32 @@  - - - - - + + + + + # 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 a input + # editor and a conf editor as alternatives to editing this file via texteditor. + # 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 + + \ No newline at end of file diff --git a/mpvInputEdit/misc.cs b/mpvInputEdit/misc.cs index 05706c6..87d4949 100644 --- a/mpvInputEdit/misc.cs +++ b/mpvInputEdit/misc.cs @@ -21,14 +21,12 @@ namespace mpvInputEdit PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } - private string _Key = ""; + private string _Input = ""; - public string Key { - get { - return _Key; - } + public string Input { + get => _Input; set { - _Key = value; + _Input = value; NotifyPropertyChanged(); } }