This commit is contained in:
Frank Skare
2019-03-27 01:52:51 +01:00
parent 77ba7f105c
commit 1080d0afd7
19 changed files with 322 additions and 207 deletions

View File

@@ -4,9 +4,27 @@
xmlns:local="clr-namespace:DynamicGUI"
StartupUri="MainWindow.xaml">
<Application.Resources>
<!--<Style x:Key="UrlTextBoxStyle" TargetType="TextBox">
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Foreground" Value="Blue"/>
</Style>-->
<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 SystemParameters.WindowGlassBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Application.Resources>
</Application>

View File

@@ -1,30 +1,7 @@
[[settings]]
name = "volume"
default = ""
help = "volume=<integer> Set the startup volume. 0 means silence, 100 means no volume reduction or amplification. Negative values can be passed for compatibility, but are treated as 0. Since mpv 0.18.1, this always controls the internal mixer (aka \"softvol\")."
[[settings]]
name = "screen"
default = ""
help = "screen=<default|0-32> In multi-monitor configurations (i.e. a single desktop that spans across multiple displays), this option tells mpv which screen to display the video on. Default: default."
[[settings]]
name = "osd-playing-msg"
default = ""
width = 300
helpurl = "https://mpv.io/manual/master/#property-expansion"
help = "osd-playing-msg=<value> Show a message on OSD when playback starts. The string is expanded for properties, e.g. --osd-playing-msg='file: ${filename}' will show the message file: followed by a space and the currently played filename."
[[settings]]
name = "fullscreen"
alias = "fs"
default = "no"
help = "fullscreen=<yes|no>, fs=<yes|no> Start the player in fullscreen mode. Default: no."
options = [{ name = "yes" }, { name = "no", text = "no (Default)" }]
[[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."
options = [{ name = "no", text = "no (Default)", help = "always use software decoding (Default)" },
@@ -45,20 +22,57 @@ options = [{ name = "no", text = "no (Default)", help = "always use software dec
[[settings]]
name = "vo"
default = "gpu"
filter = "Video"
helpurl = "https://mpv.io/manual/master/#video-output-drivers-vo"
help = "gpu=<mode> Video output drivers to be used. Default = gpu."
options = [{ name = "gpu", text = "gpu (Default)", 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 = "volume"
default = ""
filter = "Audio"
help = "volume=<integer> Set the startup volume. 0 means silence, 100 means no volume reduction or amplification. Negative values can be passed for compatibility, but are treated as 0. Since mpv 0.18.1, this always controls the internal mixer (aka \"softvol\")."
[[settings]]
name = "slang"
default = ""
filter = "Subtitles"
help = "--slang=<languagecode[,languagecode,...]> Specify a priority list of subtitle languages to use. Different container formats employ different language codes. DVDs use ISO 639-1 two letter language codes, Matroska uses ISO 639-2 three letter language codes while OGM uses a free-form identifier. See also --sid."
[[settings]]
name = "screen"
default = ""
filter = "Screen"
help = "screen=<default|0-32> In multi-monitor configurations (i.e. a single desktop that spans across multiple displays), this option tells mpv which screen to display the video on. Default: default."
[[settings]]
name = "osd-playing-msg"
default = ""
width = 300
filter = "Screen"
helpurl = "https://mpv.io/manual/master/#property-expansion"
help = "osd-playing-msg=<value> Show a message on OSD when playback starts. The string is expanded for properties, e.g. --osd-playing-msg='file: ${filename}' will show the message file: followed by a space and the currently played filename."
[[settings]]
name = "fullscreen"
alias = "fs"
default = "no"
filter = "Screen"
help = "fullscreen=<yes|no>, fs=<yes|no> Start the player in fullscreen mode. Default: no."
options = [{ name = "yes" }, { name = "no", text = "no (Default)" }]
[[settings]]
name = "keep-open-pause"
default = "yes"
filter = "Playback"
help = "keep-open-pause=<yes|no> If set to no, instead of pausing when --keep-open is active, just stop at end of file and continue playing forward when you seek backwards until end where it stops again. Default: yes."
options = [{ name = "yes", text = "yes (Default)" }, { name = "no" }]
[[settings]]
name = "keep-open"
default = "no"
filter = "Playback"
help = "keep-open=<yes|no|always> Do not terminate when playing or seeking beyond the end of the file, and there is not next file to be played (and --loop is not used). Instead, pause the player. When trying to seek beyond end of the file, the player will attempt to seek to the last frame.\n\nNormally, this will act like set pause yes on EOF, unless the --keep-open-pause=no option is set."
options = [{ name = "yes", help = "Don't terminate if the current file is the last playlist entry. Equivalent to --keep-open without arguments."},
{ name = "no", text = "no (Default)", help = "If the current file ends, go to the next file or terminate. (Default.)" },
@@ -68,11 +82,13 @@ options = [{ name = "yes", help = "Don't terminate if the current file is the la
name = "loop-file"
alias = "loop"
default = ""
filter = "Playback"
help = "loop-file=<N|inf|no>, loop=<N|inf|no> Loop a single file N times. inf means forever, no means normal playback. For compatibility, --loop-file and --loop-file=yes are also accepted, and are the same as --loop-file=inf.\n\nThe difference to --loop-playlist is that this doesn't loop the playlist, just the file itself. If the playlist contains only a single file, the difference between the two option is that this option performs a seek on loop, instead of reloading the file.\n\n--loop is an alias for this option."
[[settings]]
name = "save-position-on-quit"
default = "no"
filter = "Playback"
help = "Always save the current playback position on quit. When this file is played again later, the player will seek to the old playback position on start. This does not happen if playback of a file is stopped in any other way than quitting. For example, going to the next file in the playlist will not save the position, and start playback at beginning the next time the file is played.\n\nThis behavior is disabled by default, but is always available when quitting the player with Shift+Q."
options = [{ name = "yes" }, { name = "no", text = "no (Default)" }]
@@ -81,33 +97,33 @@ name = "screenshot-directory"
default = ""
width = 500
folder = true
filter = "Screen"
help = "screenshot-directory=<value> Store screenshots in this directory. This path is joined with the filename generated by --screenshot-template. If the template filename is already absolute, the directory is ignored.\n\nIf the directory does not exist, it is created on the first screenshot. If it is not a directory, an error is generated when trying to write a screenshot.\n\nThis option is not set by default, and thus will write screenshots to the directory from which mpv was started. In pseudo-gui mode (see PSEUDO GUI MODE), this is set to the desktop."
[[settings]]
name = "input-ar-delay"
default = ""
filter = "Input"
help = "input-ar-delay=<integer> Delay in milliseconds before we start to autorepeat a key (0 to disable)."
[[settings]]
name = "input-ar-rate"
default = ""
filter = "Input"
help = "input-ar-rate=<integer> Number of key presses to generate per second on autorepeat."
[[settings]]
name = "alang"
default = ""
filter = "Audio"
help = "alang=<languagecode[,languagecode,...]> Specify a priority list of audio languages to use. Different container formats employ different language codes. DVDs use ISO 639-1 two-letter language codes, Matroska, MPEG-TS and NUT use ISO 639-2 three-letter language codes, while OGM uses a free-form identifier. See also --aid.\n\nExamples\n\nmpv dvd://1 --alang=hu,en chooses the Hungarian language track on a DVD and falls back on English if Hungarian is not available.\n\nmpv --alang=jpn example.mkv plays a Matroska file with Japanese audio."
[[settings]]
name = "slang"
default = ""
help = "--slang=<languagecode[,languagecode,...]> Specify a priority list of subtitle languages to use. Different container formats employ different language codes. DVDs use ISO 639-1 two letter language codes, Matroska uses ISO 639-2 three letter language codes while OGM uses a free-form identifier. See also --sid."
[[settings]]
name = "hr-seek"
default = "absolute"
filter = "Playback"
help = "hr-seek=<no|absolute|yes> Select when to use precise seeks that are not limited to keyframes. Such seeks require decoding video from the previous keyframe up to the target position and so can take some time depending on decoding performance. For some video formats, precise seeks are disabled. This option selects the default choice to use for seeks; it is possible to explicitly override that default in the definition of key bindings and in input commands."
options = [{ name = "yes", help = "Use precise seeks whenever possible." },
{ name = "no", help = "Never use precise seeks." },
{ name = "absolute", text = "absolute (Default)", help = "Use precise seeks if the seek is to an absolute position in the file, such as a chapter seek, but not for relative seeks like the default behavior of arrow keys (default)." },
{ name = "always", help = "Same as yes (for compatibility)." }]
{ name = "always", help = "Same as yes (for compatibility)." }]

View File

@@ -46,6 +46,7 @@ namespace DynamicGUI
}
baseSetting.Name = setting["name"];
baseSetting.Filter = setting["filter"];
if (setting.HasKey("help")) baseSetting.Help = setting["help"];
if (setting.HasKey("helpurl")) baseSetting.HelpURL = setting["helpurl"];
if (setting.HasKey("alias")) baseSetting.Alias = setting["alias"];
@@ -62,6 +63,7 @@ namespace DynamicGUI
public string Alias { get; set; }
public string Help { get; set; }
public string HelpURL { get; set; }
public string Filter { get; set; }
public int Width { get; set; }
}

View File

@@ -1,7 +1,8 @@
namespace DynamicGUI
{
interface ISearch
interface ISettingControl
{
bool Contains(string searchString);
SettingBase SettingBase { get; }
}
}

View File

@@ -7,8 +7,8 @@
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid Margin="20,0">
<WrapPanel Orientation="Vertical">
<TextBox x:Name="TitleTextBox" FontSize="24" Margin="0,10" BorderThickness="0" IsReadOnly="True"></TextBox>
<StackPanel>
<TextBox x:Name="TitleTextBox" FontSize="24" Margin="0,10" BorderThickness="0" IsReadOnly="True" Foreground="{x:Static SystemParameters.WindowGlassBrush}"></TextBox>
<ItemsControl x:Name="ItemsControl">
<ItemsControl.ItemTemplate>
<DataTemplate>
@@ -20,9 +20,9 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
<TextBox x:Name="HelpTextBox" TextWrapping="WrapWithOverflow" BorderThickness="0" IsReadOnly="True" Margin="0,10,0,0"></TextBox>
<TextBlock Margin="0,10,0,0">
<TextBlock x:Name="LinkTextBlock" Margin="0,10">
<local:HyperlinkEx x:Name="Link"></local:HyperlinkEx>
</TextBlock>
</WrapPanel>
</StackPanel>
</Grid>
</UserControl>

View File

@@ -1,8 +1,9 @@
using System.Windows.Controls;
using System.Windows;
using System.Windows.Controls;
namespace DynamicGUI
{
public partial class OptionSettingControl : UserControl, ISearch
public partial class OptionSettingControl : UserControl, ISettingControl
{
private OptionSetting OptionSetting;
@@ -14,6 +15,9 @@ namespace DynamicGUI
HelpTextBox.Text = optionSetting.Help;
ItemsControl.ItemsSource = optionSetting.Options;
Link.SetURL(optionSetting.HelpURL);
if (string.IsNullOrEmpty(optionSetting.HelpURL))
LinkTextBlock.Visibility = Visibility.Collapsed;
}
private string _SearchableText;
@@ -31,6 +35,7 @@ namespace DynamicGUI
}
}
public SettingBase SettingBase => OptionSetting;
public bool Contains(string searchString) => SearchableText.Contains(searchString.ToLower());
}
}

View File

@@ -8,8 +8,8 @@
d:DesignHeight="450"
d:DesignWidth="800" >
<Grid Margin="20,0">
<WrapPanel Orientation="Vertical">
<TextBox x:Name="TitleTextBox" FontSize="24" Margin="0,0,0,10" BorderThickness="0" IsReadOnly="True"></TextBox>
<StackPanel>
<TextBox x:Name="TitleTextBox" FontSize="24" Margin="0,10" BorderThickness="0" IsReadOnly="True" Foreground="{x:Static SystemParameters.WindowGlassBrush}"></TextBox>
<Grid Margin="0,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -19,6 +19,9 @@
<Button x:Name="Button" Height="20" Grid.Column="1" Visibility="{Binding Path=Text, ElementName=StringSettingControl1}" Margin="5,0,0,0" Width="20" Click="Button_Click">...</Button>
</Grid>
<TextBox x:Name="HelpTextBox" TextWrapping="WrapWithOverflow" Margin="0,0,0,10" BorderThickness="0" IsReadOnly="True"></TextBox>
</WrapPanel>
<TextBlock x:Name="LinkTextBlock" Margin="0,10">
<local:HyperlinkEx x:Name="Link"></local:HyperlinkEx>
</TextBlock>
</StackPanel>
</Grid>
</UserControl>

View File

@@ -3,7 +3,7 @@ using System.Windows.Controls;
namespace DynamicGUI
{
public partial class StringSettingControl : UserControl, ISearch
public partial class StringSettingControl : UserControl, ISettingControl
{
private StringSetting StringSetting;
@@ -11,7 +11,6 @@ namespace DynamicGUI
{
StringSetting = stringSetting;
InitializeComponent();
TitleTextBox.Text = stringSetting.Name;
HelpTextBox.Text = stringSetting.Help;
ValueTextBox.Text = stringSetting.Value;
@@ -19,6 +18,10 @@ namespace DynamicGUI
ValueTextBox.Width = stringSetting.Width;
if (!StringSetting.IsFolder)
Button.Visibility = Visibility.Hidden;
Link.SetURL(StringSetting.HelpURL);
if (string.IsNullOrEmpty(stringSetting.HelpURL))
LinkTextBlock.Visibility = Visibility.Collapsed;
}
private string _SearchableText;
@@ -33,6 +36,7 @@ namespace DynamicGUI
}
public bool Contains(string searchString) => SearchableText.Contains(searchString.ToLower());
public SettingBase SettingBase => StringSetting;
public string Text
{

View File

@@ -1,22 +1,39 @@
<Window xmlns:DynamicGUI="clr-namespace:mpvSettingsEditor" x:Name="MainWindow1" x:Class="mpvSettingsEditor.MainWindow"
<Window x:Name="MainWindow1" x:Class="mpvSettingsEditor.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:mpvSettingsEditor"
mc:Ignorable="d"
Height="500" Width="800" Loaded="MainWindow1_Loaded">
Height="500" Width="700" Loaded="MainWindow1_Loaded">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="4*" />
</Grid.RowDefinitions>
<Grid x:Name="SearchGrid" Background="White" Width="300" Margin="0,0,0,10">
<TextBlock Margin="5,2" MinWidth="50" Text="Search..." Foreground="LightSteelBlue" IsHitTestVisible="False" />
<TextBox MinWidth="50" Name="SearchTextBox" Background="Transparent" TextChanged="SearchTextBox_TextChanged" />
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10*" />
<ColumnDefinition Width="60*" />
</Grid.ColumnDefinitions>
<Grid x:Name="SearchGrid" Background="White" Width="300" Margin="0,0,0,10" Grid.ColumnSpan="2">
<TextBlock x:Name="SearchTextBlock" Margin="5,2" Text="Find a setting" Foreground="LightSteelBlue" VerticalAlignment="Center" />
<TextBox Name="SearchTextBox" Padding="1,2,0,0" BorderThickness="2" Background="Transparent" TextChanged="SearchTextBox_TextChanged" Height="25" />
<Button x:Name="SearchClearButton" Background="Transparent" HorizontalAlignment="Right" Margin="2,0,4,0" FontSize="6" Width="16" Height="16" Visibility="Hidden" Click="SearchClearButton_Click"></Button>
</Grid>
<ScrollViewer VerticalScrollBarVisibility="Auto" Grid.Row="1">
<WrapPanel x:Name="MainWrapPanel"></WrapPanel>
</ScrollViewer>
<ScrollViewer VerticalScrollBarVisibility="Auto" Grid.Row="1" Grid.Column="1">
<StackPanel x:Name="MainStackPanel"></StackPanel>
</ScrollViewer>
<StackPanel Margin="20,0,0,0" Grid.Row="1">
<ListBox x:Name="FilterListBox" ItemsSource="{Binding FilterStrings}" BorderThickness="0" SelectionChanged="ListBox_SelectionChanged" Foreground="{x:Static SystemParameters.WindowGlassBrush}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding}" FontSize="16" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<TextBlock x:Name="OpenSettingsTextBlock" Margin="0,30,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static SystemParameters.WindowGlassBrush}" MouseUp="OpenSettingsTextBlock_MouseUp">Open settings folder</TextBlock>
<TextBlock x:Name="ShowManualTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static SystemParameters.WindowGlassBrush}" MouseUp="ShowManualTextBlock_MouseUp">Show mpv manual</TextBlock>
</StackPanel>
</Grid>
</Window>

View File

@@ -1,6 +1,7 @@
using DynamicGUI;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
@@ -14,15 +15,18 @@ namespace mpvSettingsEditor
public partial class MainWindow : Window
{
public string mpvConfPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\mpv\\mpv.conf";
private List<SettingBase> mpvSettings = Settings.LoadSettings(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\Definitions.toml");
private List<SettingBase> DynamicSettings = Settings.LoadSettings(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\Definitions.toml");
public MainWindow()
{
InitializeComponent();
DataContext = this;
Title = (Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), true)[0] as AssemblyProductAttribute).Product + " " + Assembly.GetExecutingAssembly().GetName().Version.ToString();
foreach (var setting in mpvSettings)
foreach (var setting in DynamicSettings)
{
if (!FilterStrings.Contains(setting.Filter))
FilterStrings.Add(setting.Filter);
foreach (var pair in mpvConf)
{
if (setting.Name == pair.Key || setting.Alias == pair.Key)
@@ -39,10 +43,10 @@ namespace mpvSettingsEditor
switch (setting)
{
case StringSetting s:
MainWrapPanel.Children.Add(new StringSettingControl(s));
MainStackPanel.Children.Add(new StringSettingControl(s));
break;
case OptionSetting s:
MainWrapPanel.Children.Add(new OptionSettingControl(s));
MainStackPanel.Children.Add(new OptionSettingControl(s));
break;
}
}
@@ -68,11 +72,13 @@ namespace mpvSettingsEditor
}
}
public ObservableCollection<string> FilterStrings { get; } = new ObservableCollection<string>();
protected override void OnClosed(EventArgs e)
{
base.OnClosed(e);
foreach (var mpvSetting in mpvSettings)
foreach (var mpvSetting in DynamicSettings)
{
switch (mpvSetting)
{
@@ -96,7 +102,7 @@ namespace mpvSettingsEditor
List<string> lines = File.ReadAllLines(mpvConfPath).ToList();
foreach (var mpvSetting in mpvSettings)
foreach (var mpvSetting in DynamicSettings)
{
foreach (var line in lines.ToArray())
{
@@ -129,7 +135,7 @@ namespace mpvSettingsEditor
lines.Add(pair.Key + " = " + pair.Value);
}
foreach (var mpvSetting in mpvSettings)
foreach (var mpvSetting in DynamicSettings)
{
foreach (var line in lines.ToArray())
{
@@ -141,23 +147,72 @@ namespace mpvSettingsEditor
}
File.WriteAllText(mpvConfPath, String.Join(Environment.NewLine, lines));
MessageBox.Show("If running, restart mpv/mpv.net", Title, MessageBoxButton.OK, MessageBoxImage.Information);
foreach (Process process in Process.GetProcesses())
if (process.ProcessName == "mpv.net")
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);
}
private void SearchTextBox_TextChanged(object sender, TextChangedEventArgs e)
{
for (int i = MainWrapPanel.Children.Count - 1; i >= 0; i--)
{
if ((MainWrapPanel.Children[i] as ISearch).Contains(SearchTextBox.Text))
MainWrapPanel.Children[i].Visibility = Visibility.Visible;
else
MainWrapPanel.Children[i].Visibility = Visibility.Collapsed;
}
}
SearchTextBlock.Text = SearchTextBox.Text == "" ? "Find a setting" : "";
if (SearchTextBox.Text == "")
SearchClearButton.Visibility = Visibility.Hidden;
else
SearchClearButton.Visibility = Visibility.Visible;
string activeFilter = "";
foreach (var i in FilterStrings)
if (SearchTextBox.Text == i + ":")
activeFilter = i;
if (activeFilter == "")
{
foreach (UIElement i in MainStackPanel.Children)
if ((i as ISettingControl).Contains(SearchTextBox.Text))
i.Visibility = Visibility.Visible;
else
i.Visibility = Visibility.Collapsed;
FilterListBox.SelectedItem = null;
}
else
foreach (UIElement i in MainStackPanel.Children)
if ((i as ISettingControl).SettingBase.Filter == activeFilter)
i.Visibility = Visibility.Visible;
else
i.Visibility = Visibility.Collapsed;
}
private void MainWindow1_Loaded(object sender, RoutedEventArgs e)
{
FocusManager.SetFocusedElement(SearchGrid, SearchTextBox);
Keyboard.Focus(SearchTextBox);
}
private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (e.AddedItems.Count > 0)
SearchTextBox.Text = e.AddedItems[0].ToString() + ":";
}
private void SearchClearButton_Click(object sender, RoutedEventArgs e)
{
SearchTextBox.Text = "";
Keyboard.Focus(SearchTextBox);
}
private void OpenSettingsTextBlock_MouseUp(object sender, MouseButtonEventArgs e)
{
Process.Start(Path.GetDirectoryName(mpvConfPath));
}
private void ShowManualTextBlock_MouseUp(object sender, MouseButtonEventArgs e)
{
Process.Start("https://mpv.io/manual/master/");
}
}
}

View File

@@ -7,11 +7,11 @@ 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 settings editor")]
[assembly: AssemblyTitle("mpv(.net) settings editor")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("mpv settings editor")]
[assembly: AssemblyProduct("mpv(.net) settings editor")]
[assembly: AssemblyCopyright("Copyright © 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("0.2.0.0")]
[assembly: AssemblyFileVersion("0.2.0.0")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

BIN
mpvSettingsEditor/mpv.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

View File

@@ -41,6 +41,9 @@
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>mpv.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
@@ -125,5 +128,8 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Resource Include="mpv.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>