Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Commit

Permalink
merge 5503cm & fix & update
Browse files Browse the repository at this point in the history
  • Loading branch information
hooke007 committed Nov 12, 2021
1 parent 975f918 commit feb1964
Show file tree
Hide file tree
Showing 16 changed files with 1,392 additions and 760 deletions.
6 changes: 3 additions & 3 deletions src/Misc/CorePlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,20 +137,20 @@ public void Init()
SetPropertyString("msg-level", "osd/libass=fatal");
}

SetPropertyString("watch-later-options", "mute");
SetPropertyString("watch-later-options", "vid,aid,sid");
SetPropertyString("screenshot-directory", "~~desktop/");
SetPropertyString("script-opts", "osc-scalewindowed=1.5,osc-hidetimeout=2000,console-scale=1.5");
SetPropertyString("script-opts", "osc-scalewindowed=1.0,osc-hidetimeout=1000,console-scale=1.5,osc-deadzonesize=1,osc-seekbarstyle=knob,osc-title=音量[${volume}] 速度[${speed}] 列表[${playlist-pos-1}/${playlist-count}]");
SetPropertyString("osd-playing-msg", "${filename}");
SetPropertyString("wid", MainForm.Hwnd.ToString());
SetPropertyString("osc", "yes");
SetPropertyString("force-window", "yes");
SetPropertyString("config-dir", ConfigFolder);
SetPropertyString("config", "yes");
SetPropertyString("include", "~~/profiles.conf");

SetPropertyInt("osd-duration", 2000);

SetPropertyBool("keep-open", true);
SetPropertyBool("keep-open-pause", false);

SetPropertyBool("input-default-bindings", true);

Expand Down
2 changes: 1 addition & 1 deletion src/Misc/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ bool IsMouseInOSC()
if (FormBorderStyle == FormBorderStyle.None)
top = ClientSize.Height * 0.1f;

return pos.Y > ClientSize.Height * 0.85 || pos.Y < top;
return pos.Y > ClientSize.Height * 0.80 || pos.Y < top;
}

void UpdateMenu()
Expand Down
4 changes: 2 additions & 2 deletions src/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="editor_conf" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\editor_conf.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
<value>..\Resources\editor_conf.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="input_conf" 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\input.conf.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="mpvnet" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\mpvnet.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
Expand Down
1,592 changes: 1,100 additions & 492 deletions src/Resources/editor_conf.txt

Large diffs are not rendered by default.

424 changes: 216 additions & 208 deletions src/Resources/input.conf.txt

Large diffs are not rendered by default.

35 changes: 25 additions & 10 deletions src/Resources/theme.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@

[dark]

heading = #3C8CC8
foreground = #DDDDDD
foreground2 = #AAAAAA
background = #323232
highlight = #404040
heading = #3C8CC8
foreground = #DDDDDD
foreground2 = #AAAAAA
background = #323232
highlight = #404040

menu-foreground = #DDDDDD
menu-background = #323232
menu-highlight = #505050



[light]

heading = #0068B2
foreground = #000000
foreground2 = #4C4C4C
background = #F7F7F7
highlight = #DFDFDF
heading = #0068B2
foreground = #000000
foreground2 = #4C4C4C
background = #F7F7F7
highlight = #DFDFDF

menu-foreground = #000000
menu-background = #DFDFDF
menu-highlight = #BFBFBF



[bili]

heading = #FFC0CB
foreground = #FFFFFF
foreground2 = #87CEFA
background = #1C1C1C
highlight = #404040

menu-foreground = #FFFFFF
menu-background = #000000
menu-highlight = #D3D3D3
4 changes: 2 additions & 2 deletions src/WPF/AboutWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"

Title="About mpv.net"
Title="关于 mpv.net_CM"
FontSize="16"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner"
Expand All @@ -18,7 +18,7 @@

<Grid>
<StackPanel HorizontalAlignment="Center">
<TextBlock FontSize="30" TextAlignment="Center" Margin="10,10,10,0">mpv.net</TextBlock>
<TextBlock FontSize="30" TextAlignment="Center" Margin="10,10,10,0">mpv.net的中文模组</TextBlock>
<TextBlock Name="ContentBlock" TextAlignment="Center" Margin="20,10,20,20"></TextBlock>
</StackPanel>
</Grid>
Expand Down
5 changes: 3 additions & 2 deletions src/WPF/CommandPaletteControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
mc:Ignorable="d"


FontFamily="微软雅黑"
FontSize="13"
Loaded="OnLoaded"
Background="#111111"
Expand Down Expand Up @@ -39,7 +40,7 @@
>

<local:SearchTextBoxUserControl
HintText="Search"
HintText="搜索"
x:Name="SearchControl"
Grid.ColumnSpan="2"
Padding="1,1,1,0"
Expand Down
14 changes: 7 additions & 7 deletions src/WPF/ConfWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
mc:Ignorable="d"

Title="Config Editor"
Title="mpv.conf 编辑器"
Height="530"
Width="700"
Foreground="{Binding Theme.Foreground}"
Expand All @@ -31,7 +31,7 @@

<local:SearchTextBoxUserControl
x:Name="SearchControl"
HintText="Find a setting"
HintText="查找设置"
Width="250"
Margin="0,20,0,0"
Grid.ColumnSpan="2"
Expand All @@ -48,7 +48,7 @@
<StackPanel x:Name="MainStackPanel"></StackPanel>
</ScrollViewer>

<StackPanel Margin="20,0,0,0" Grid.Row="1">
<StackPanel Margin="20,20,0,0" Grid.RowSpan="2">
<ListBox
Name="FilterListBox"
ItemsSource="{Binding FilterStrings}"
Expand All @@ -75,10 +75,10 @@
</ListBox.ItemTemplate>
</ListBox>

<TextBlock Name="OpenSettingsTextBlock" Margin="0,30,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{Binding Theme.Heading}" MouseUp="OpenSettingsTextBlock_MouseUp">Open config folder</TextBlock>
<TextBlock Name="PreviewTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{Binding Theme.Heading}" MouseUp="PreviewTextBlock_MouseUp">Preview mpv.conf</TextBlock>
<TextBlock Name="ShowManualTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{Binding Theme.Heading}" MouseUp="ShowManualTextBlock_MouseUp">Show mpv manual</TextBlock>
<TextBlock Name="SupportTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{Binding Theme.Heading}" MouseUp="SupportTextBlock_MouseUp">Show support forum</TextBlock>
<TextBlock Name="OpenSettingsTextBlock" Margin="0,30,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{Binding Theme.Heading}" MouseUp="OpenSettingsTextBlock_MouseUp">打开 设置目录</TextBlock>
<TextBlock Name="PreviewTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{Binding Theme.Heading}" MouseUp="PreviewTextBlock_MouseUp">预览mpv.conf</TextBlock>
<TextBlock Name="ShowManualTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{Binding Theme.Heading}" MouseUp="ShowManualTextBlock_MouseUp">mpv 手册</TextBlock>
<TextBlock Name="SupportTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{Binding Theme.Heading}" MouseUp="SupportTextBlock_MouseUp">上游支持</TextBlock>
</StackPanel>
</Grid>
</Window>
2 changes: 1 addition & 1 deletion src/WPF/ConfWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ protected override void OnClosed(EventArgs e)
App.UpdateWpfColors();

if (ThemeConf != GetThemeConf())
MessageBox.Show("Changed theme settings require mpv.net being restarted.", "Info");
MessageBox.Show("重启程序使更改后的主题完全生效!", "Info");
}

string GetCompareString()
Expand Down
10 changes: 5 additions & 5 deletions src/WPF/InputWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
mc:Ignorable="d"

Title="Input Editor"
Title="input.conf 编辑器"
Height="500"
Width="750"
FontSize="13"
Expand Down Expand Up @@ -80,7 +80,7 @@
</Grid.RowDefinitions>

<local:SearchTextBoxUserControl
HintText="Type ? to get help."
HintText="输入 ? 弹出帮助"
x:Name="SearchControl"
Width="300"
Margin="0,20,0,20"
Expand Down Expand Up @@ -108,9 +108,9 @@
</DataGrid.Resources>

<DataGrid.Columns>
<DataGridTextColumn Header="Menu" Binding="{Binding Path}"/>
<DataGridTextColumn Header="右键菜单项目" Binding="{Binding Path}"/>

<DataGridTemplateColumn Header="Input">
<DataGridTemplateColumn Header="快捷键">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button MinHeight="20" Click="ButtonClick">
Expand All @@ -120,7 +120,7 @@
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>

<DataGridTextColumn Header="Command" Binding="{Binding Command}" MaxWidth="330" />
<DataGridTextColumn Header="命令" Binding="{Binding Command}" MaxWidth="330" />
</DataGrid.Columns>
</DataGrid>
</Grid>
Expand Down
14 changes: 7 additions & 7 deletions src/WPF/InputWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ void SearchTextBox_TextChanged(object sender, TextChangedEventArgs e)
{
SearchControl.SearchTextBox.Text = "";

Msg.ShowInfo("Filtering" + BR2 +
"Reduce the filter scope with:" + BR2 +
"i input" + BR2 +
"m menu" + BR2 +
"c command" + BR2 +
"If only one character is entered input search is performed.");
Msg.ShowInfo("搜索过滤" + BR2 +
"可使用以下前缀缩小索引范围" + BR2 +
"i: 仅索引快捷键" + BR2 +
"m: 仅索引右键菜单项目" + BR2 +
"c: 仅索引命令" + BR2 +
"如果只输入一个字符,则直接执行搜索。");
}
}

Expand Down Expand Up @@ -143,7 +143,7 @@ void Window_Closed(object sender, EventArgs e)
return;

File.WriteAllText(Core.InputConfPath, GetInputConfContent());
Msg.ShowInfo("Changes will be available on next startup.");
Msg.ShowInfo("重启程序使所做更改生效!");
}

void DataGrid_PreviewCanExecute(object sender, CanExecuteRoutedEventArgs e)
Expand Down
6 changes: 3 additions & 3 deletions src/WPF/LearnWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"

Title="Learn Input"
Title="快捷键修改"
Height="150"
Width="350"
FontSize="16"
Expand Down Expand Up @@ -48,7 +48,7 @@
HorizontalAlignment="Center"
/>

<Button x:Name="ConfirmButton" Grid.Row="2" Margin="10,0,10,10" Click="ConfirmButton_Click">Confirm</Button>
<Button x:Name="ClearButton" Grid.Row="2" Margin="0,0,10,10" Click="ClearButton_Click" Grid.Column="1">Clear</Button>
<Button x:Name="ConfirmButton" Grid.Row="2" Margin="10,0,10,10" Click="ConfirmButton_Click">确认</Button>
<Button x:Name="ClearButton" Grid.Row="2" Margin="0,0,10,10" Click="ClearButton_Click" Grid.Column="1">清除</Button>
</Grid>
</Window>
2 changes: 1 addition & 1 deletion src/WPF/MsgBox/MessageBoxExStatic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public partial class MessageBoxEx : Window, INotifyPropertyChanged

public static MsgBoxExCheckBoxData CheckBoxData { get; set; } = null;

public static FontFamily MsgFontFamily { get; set; } = new FontFamily("Segoe UI");
public static FontFamily MsgFontFamily { get; set; } = new FontFamily("微软雅黑");

public static double MsgFontSize { get; set; } = 12;

Expand Down
28 changes: 14 additions & 14 deletions src/WPF/SetupWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
xmlns:mpvnet="clr-namespace:mpvnet"
mc:Ignorable="d"

Title="mpv.net Setup"
Title="注册"
FontSize="13"
Foreground="{Binding Theme.Foreground}"
Background="{Binding Theme.Background}"
Expand Down Expand Up @@ -54,80 +54,80 @@
TextAlignment="Center"
VerticalAlignment="Center"
FontSize="14"
>Start Menu Shortcut</TextBlock>
>开始菜单-快捷方式</TextBlock>
</Border>
<Button Name="AddStartMenuShortcut"
Height="30"
Margin="3"
Click="AddStartMenuShortcut_Click"
>Add</Button>
>创建</Button>
<Button Name="RemoveStartMenuShortcut"
Height="30"
Margin="3"
Click="RemoveStartMenuShortcut_Click"
>Remove</Button>
>移除</Button>
</StackPanel>
<StackPanel Width="140" Margin="20,5,5,25">
<Border Height="50">
<TextBlock TextWrapping="Wrap"
TextAlignment="Center"
VerticalAlignment="Center"
FontSize="14"
>File Extensions</TextBlock>
>文件格式关联</TextBlock>
</Border>
<Button Name="AddVideo"
Height="30"
Margin="3"
Click="AddVideo_Click"
Template="{StaticResource ShieldButtonTemplate}"
>Add Video</Button>
>关联视频</Button>
<Button Name="AddAudio"
Height="30"
Margin="3"
Click="AddAudio_Click"
Template="{StaticResource ShieldButtonTemplate}"
>Add Audio</Button>
>关联音频</Button>
<Button Name="AddImage"
Height="30"
Margin="3"
Click="AddImage_Click"
Template="{StaticResource ShieldButtonTemplate}"
>Add Image</Button>
>关联图片</Button>
<Button Name="RemoveFileAssociations"
Margin="3,15,3,3"
Height="30"
Click="RemoveFileAssociations_Click"
Template="{StaticResource ShieldButtonTemplate}"
>Remove All</Button>
>移除全部关联</Button>
<Button Name="EditDefaultApp"
Height="30"
Margin="3"
Click="EditDefaultApp_Click"
>Edit Default App</Button>
>编辑默认应用</Button>
</StackPanel>
<StackPanel Width="140" Margin="20,5,25,5">
<Border Height="50">
<TextBlock TextWrapping="Wrap"
TextAlignment="Center"
VerticalAlignment="Center"
FontSize="14"
>Path Environment Variable</TextBlock>
>环境变量-PATH</TextBlock>
</Border>
<Button Name="AddToPathEnvVar"
Height="30"
Margin="3"
Click="AddToPathEnvVar_Click"
>Add</Button>
>创建</Button>
<Button Name="RemoveFromPathEnvVar"
Height="30"
Margin="3"
Click="RemoveFromPathEnvVar_Click"
>Remove</Button>
>移除</Button>
<Button Name="ShowEnvVarEditor"
Height="30"
Margin="3"
Click="ShowEnvVarEditor_Click"
>Show Editor</Button>
>控制面板-环境变量</Button>
</StackPanel>
</StackPanel>
</Grid>
Expand Down
4 changes: 2 additions & 2 deletions src/WPF/SetupWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ void RegFileAssoc(string[] extensions)
proc.WaitForExit();

if (proc.ExitCode == 0)
Msg.ShowInfo("File associations successfully created.");
Msg.ShowInfo("关联成功!");
else
Msg.ShowError("Error creating file associations.");
Msg.ShowError("关联失败!");
}
} catch {}
}
Expand Down

0 comments on commit feb1964

Please sign in to comment.