This commit is contained in:
Frank Skare
2019-04-25 08:04:49 +02:00
parent 8fdbe22dd8
commit 433d741c68
7 changed files with 50 additions and 1 deletions

View File

@@ -79,6 +79,15 @@ namespace mpvnet
}));
}
public static void show_about(string[] args)
{
MainForm.Instance.Invoke(new Action(() => {
AboutWindow w = new AboutWindow();
new WindowInteropHelper(w).Owner = MainForm.Instance.Handle;
w.ShowDialog();
}));
}
public static void show_history(string[] args)
{
var fp = mp.MpvConfFolder + "history.txt";

View File

@@ -148,6 +148,8 @@
_ 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/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
_ ignore #menu: Help > -
_ script-message mpv.net show-about #menu: Help > About mpv.net
_ ignore #menu: -
Esc quit #menu: Exit

View File

@@ -0,0 +1,13 @@
<Window x:Class="mpvnet.AboutWindow"
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"
mc:Ignorable="d"
Title="About mpv.net" Height="200" Width="500" FontSize="20"
ShowInTaskbar="False" WindowStartupLocation="CenterOwner" ResizeMode="NoResize"
Foreground="#FFA0842A">
<Grid>
<TextBlock Name="TextBlock" Margin="20" />
</Grid>
</Window>

View File

@@ -0,0 +1,13 @@
using System.Windows;
namespace mpvnet
{
public partial class AboutWindow : Window
{
public AboutWindow()
{
InitializeComponent();
TextBlock.Text = $"mpv.net\nVersion {System.Windows.Forms.Application.ProductVersion}\nCopyright (c) 2017-2019 Frank Skare (stax76)\nMIT License";
}
}
}

View File

@@ -141,6 +141,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Windows\AboutWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="WPF\Resources.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -184,6 +188,9 @@
<Compile Include="Windows\ConfWindow.xaml.cs">
<DependentUpon>ConfWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Windows\AboutWindow.xaml.cs">
<DependentUpon>AboutWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Windows\LearnWindow.xaml.cs">
<DependentUpon>LearnWindow.xaml</DependentUpon>
</Compile>
@@ -204,6 +211,7 @@
</EmbeddedResource>
<None Include="..\README.md">
<Link>README.md</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="app.manifest" />
<None Include="packages.config" />
@@ -216,6 +224,10 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Content Include="..\LICENSE.txt">
<Link>LICENSE.txt</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Resources\mpvConf.txt" />
<Content Include="Resources\mpvConfToml.txt" />
<Content Include="Resources\mpvNetConfToml.txt" />