diff --git a/README.md b/README.md index b369f5f..5b14338 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,7 @@ mpv.net bugs and requests: - a new JavaScript example script was added to the wiki and the script descriptions were improved. [Scripting Page](https://github.com/stax76/mpv.net/wiki/Scripting). - greatly improved README.md file and github startpage +- About dialog added ### 3.1 (2019-04-23) diff --git a/mpv.net/Command.cs b/mpv.net/Command.cs index 7b0be12..1ab4f3c 100644 --- a/mpv.net/Command.cs +++ b/mpv.net/Command.cs @@ -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"; diff --git a/mpv.net/Resources/inputConf.txt b/mpv.net/Resources/inputConf.txt index 8d5cf72..f41138a 100644 --- a/mpv.net/Resources/inputConf.txt +++ b/mpv.net/Resources/inputConf.txt @@ -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 diff --git a/mpv.net/Windows/AboutWindow.xaml b/mpv.net/Windows/AboutWindow.xaml new file mode 100644 index 0000000..8dc929f --- /dev/null +++ b/mpv.net/Windows/AboutWindow.xaml @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/mpv.net/Windows/AboutWindow.xaml.cs b/mpv.net/Windows/AboutWindow.xaml.cs new file mode 100644 index 0000000..0736d2b --- /dev/null +++ b/mpv.net/Windows/AboutWindow.xaml.cs @@ -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"; + } + } +} \ No newline at end of file diff --git a/mpv.net/mpv.net.csproj b/mpv.net/mpv.net.csproj index 95cda00..6a1d9ec 100644 --- a/mpv.net/mpv.net.csproj +++ b/mpv.net/mpv.net.csproj @@ -141,6 +141,10 @@ MSBuild:Compile Designer + + MSBuild:Compile + Designer + Designer MSBuild:Compile @@ -184,6 +188,9 @@ ConfWindow.xaml + + AboutWindow.xaml + LearnWindow.xaml @@ -204,6 +211,7 @@ README.md + PreserveNewest @@ -216,6 +224,10 @@ Settings.settings True + + LICENSE.txt + PreserveNewest + diff --git a/release.ps1 b/release.ps1 index 408df91..f92f1a5 100644 --- a/release.ps1 +++ b/release.ps1 @@ -4,5 +4,4 @@ $version = [Diagnostics.FileVersionInfo]::GetVersionInfo($exePath).FileVersion $desktopDir = [Environment]::GetFolderPath("Desktop") $targetDir = $desktopDir + "\mpv.net-" + $version Copy-Item $scriptDir\mpv.net\bin $targetDir -Recurse -Exclude System.Management.Automation.xml -Force -Copy-Item $scriptDir\README.md $targetDir\README.md -Force & "C:\Program Files\7-Zip\7z.exe" a -t7z -mx9 "$targetDir.7z" -r "$targetDir\*" \ No newline at end of file