This commit is contained in:
Frank Skare
2019-04-06 02:10:41 +02:00
parent b16bcd0295
commit 39f6f4de0d
7 changed files with 34 additions and 17 deletions

View File

@@ -72,9 +72,10 @@ https://github.com/stax76/mpv.net/wiki/Scripting-(CSharp,-Python,-JavaScript,-Lu
### 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
- 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 it has a new feature to narrow the filter scope to eather of input, menu or command and the editor writes always the same help on top of input.conf as it is found in the defaults
- the conf edit GUI was often starting out of working area bounds and is now starting with center screen
### 2.3 (2019-04-04)

View File

@@ -29,6 +29,7 @@ namespace mpvnet
Application.ThreadException += Application_ThreadException;
Instance = this;
Hwnd = Handle;
MinimumSize = new Size(FontHeight * 16, FontHeight * 9);
Text += " " + Application.ProductVersion;
if (mp.mpvConf.ContainsKey("screen"))

View File

@@ -59,20 +59,20 @@
Ctrl+KP2 add video-pan-y 0.01 #menu: Pan & Scan > Move Down
_ ignore #menu: Pan & Scan > -
w add panscan -0.1 #menu: Pan & Scan > Decrease Height
W add panscan +0.1 #menu: Pan & Scan > Increase Height
W add panscan 0.1 #menu: Pan & Scan > Increase Height
_ ignore #menu: Pan & Scan > -
Ctrl+BS set video-zoom 0 ; set video-pan-x 0 ; set video-pan-y 0 #menu: Pan & Scan > Reset
Ctrl+BS set video-zoom 0; set video-pan-x 0; set video-pan-y 0 #menu: Pan & Scan > Reset
Ctrl+1 add contrast -1 #menu: Video > Decrease Contrast
Ctrl+2 add contrast 1 #menu: Video > Increase Contrast
Ctrl+2 add contrast #menu: Video > Increase Contrast
_ ignore #menu: Video > -
Ctrl+3 add brightness -1 #menu: Video > Decrease Brightness
Ctrl+4 add brightness 1 #menu: Video > Increase Brightness
Ctrl+4 add brightness 1 #menu: Video > Increase Brightness
_ ignore #menu: Video > -
Ctrl+5 add gamma -1 #menu: Video > Decrease Gamma
Ctrl+6 add gamma 1 #menu: Video > Increase Gamma
Ctrl+6 add gamma 1 #menu: Video > Increase Gamma
_ ignore #menu: Video > -
Ctrl+7 add saturation -1 #menu: Video > Decrease Saturation
Ctrl+8 add saturation 1 #menu: Video > Increase Saturation
Ctrl+8 add saturation 1 #menu: Video > Increase Saturation
_ ignore #menu: Video > -
Ctrl+s async screenshot #menu: Video > Take Screenshot
d cycle deinterlace #menu: Video > Toggle Deinterlace
@@ -85,13 +85,13 @@
v cycle sub-visibility #menu: Subtitle > Toggle Visibility
_ ignore #menu: Subtitle > -
z add sub-delay -0.1 #menu: Subtitle > Delay -0.1
Z add sub-delay +0.1 #menu: Subtitle > Delay +0.1
Z add sub-delay 0.1 #menu: Subtitle > Delay +0.1
_ ignore #menu: Subtitle > -
r add sub-pos -1 #menu: Subtitle > Move Up
R add sub-pos +1 #menu: Subtitle > Move Down
_ ignore #menu: Subtitle > -
_ add sub-scale -0.1 #menu: Subtitle > Decrease Subtitle Font Size
_ add sub-scale +0.1 #menu: Subtitle > Increase Subtitle Font Size
_ add sub-scale 0.1 #menu: Subtitle > Increase Subtitle Font Size
+ add volume 10 #menu: Volume > Up
- add volume -10 #menu: Volume > Down
_ ignore #menu: Volume > -
@@ -150,7 +150,7 @@
Forward seek 60
Rewind seek -60
Mute cycle mute
Volume_Up add volume 10
Volume_Up add volume 10
Volume_Down add volume -10
Wheel_Up add volume 10
Wheel_Down add volume -10

View File

@@ -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="600" Width="800" Loaded="MainWindow1_Loaded">
Height="600" Width="800" Loaded="MainWindow1_Loaded" WindowStartupLocation="CenterScreen">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />

View File

@@ -34,10 +34,22 @@ namespace mpvInputEdit
bool Filter(InputItem item)
{
string searchText = SearchControl.SearchTextBox.Text.ToLowerInvariant();
string searchText = SearchControl.SearchTextBox.Text.ToLower();
if (searchText == "") return true;
if (item.Command.ToLower().Contains(searchText) ||
if (searchText.StartsWith("i "))
{
searchText = searchText.Substring(2).Trim();
if (searchText.Length < 3)
return item.Input.ToLower().Replace("ctrl+", "").Replace("shift+", "").Replace("alt+", "").Contains(searchText);
else
return item.Input.ToLower().Contains(searchText);
} else if (searchText.StartsWith("m "))
return item.Menu.ToLower().Contains(searchText.Substring(2).Trim());
else if (searchText.StartsWith("c "))
return item.Command.ToLower().Contains(searchText.Substring(2).Trim());
else if (item.Command.ToLower().Contains(searchText) ||
item.Menu.ToLower().Contains(searchText) ||
item.Input.ToLower().Contains(searchText))
{

View File

@@ -6,7 +6,7 @@
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid x:Name="SearchTextBoxUserControl1" Background="White">
<TextBlock x:Name="SearchTextBlock" Margin="5,2" Text="Search" Foreground="LightSteelBlue" VerticalAlignment="Center" />
<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>

View File

@@ -21,12 +21,15 @@ namespace Controls
private void SearchTextBox_TextChanged(object sender, TextChangedEventArgs e)
{
SearchTextBlock.Text = SearchTextBox.Text == "" ? "Search" : "";
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("Use i, m or c to set the filter scope to Input, Menu or Command.", "Filter", MessageBoxButton.OK, MessageBoxImage.Information);
}
}
}