From f5c786477150f87b3df7852824236324c9907171 Mon Sep 17 00:00:00 2001 From: stax76 Date: Tue, 19 Sep 2017 23:08:35 +0200 Subject: [PATCH] 0.2.1 --- RatingAddon/Rating.cs | 20 +------------------- mpvnet/Command.cs | 22 +--------------------- mpvnet/MainForm.cs | 28 ++++++++-------------------- mpvnet/Native.cs | 20 +------------------- mpvnet/NativeHelp.cs | 20 +------------------- mpvnet/Program.cs | 20 +------------------- mpvnet/Properties/AssemblyInfo.cs | 4 ++-- mpvnet/StringExtensions.cs | 28 +--------------------------- mpvnet/UI.cs | 20 +------------------- mpvnet/docs/changelog.md | 3 +++ mpvnet/libmpv.cs | 20 +------------------- mpvnet/mpv.cs | 23 ++--------------------- mpvnet/mpv.net.csproj | 1 + 13 files changed, 24 insertions(+), 205 deletions(-) create mode 100644 mpvnet/docs/changelog.md diff --git a/RatingAddon/Rating.cs b/RatingAddon/Rating.cs index 2b6de93..2307798 100644 --- a/RatingAddon/Rating.cs +++ b/RatingAddon/Rating.cs @@ -1,22 +1,4 @@ -/** - *mpv.net - *Copyright(C) 2017 stax76 - * - *This program is free software: you can redistribute it and/or modify - *it under the terms of the GNU General Public License as published by - *the Free Software Foundation, either version 3 of the License, or - *(at your option) any later version. - * - *This program is distributed in the hope that it will be useful, - *but WITHOUT ANY WARRANTY; without even the implied warranty of - *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the - *GNU General Public License for more details. - * - *You should have received a copy of the GNU General Public License - *along with this program. If not, see http://www.gnu.org/licenses/. - */ - -using System; +using System; using System.ComponentModel.Composition; using System.Collections.Generic; diff --git a/mpvnet/Command.cs b/mpvnet/Command.cs index fcf0421..4ac7f83 100644 --- a/mpvnet/Command.cs +++ b/mpvnet/Command.cs @@ -1,29 +1,9 @@ -/** - *mpv.net - *Copyright(C) 2017 stax76 - * - *This program is free software: you can redistribute it and/or modify - *it under the terms of the GNU General Public License as published by - *the Free Software Foundation, either version 3 of the License, or - *(at your option) any later version. - * - *This program is distributed in the hope that it will be useful, - *but WITHOUT ANY WARRANTY; without even the implied warranty of - *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the - *GNU General Public License for more details. - * - *You should have received a copy of the GNU General Public License - *along with this program. If not, see http://www.gnu.org/licenses/. - */ - -using System; -using System.Linq; +using System; using System.Collections.Generic; using System.IO; using System.Windows.Forms; using vbnet; -using System.Drawing; using static vbnet.UI.MainModule; namespace mpvnet diff --git a/mpvnet/MainForm.cs b/mpvnet/MainForm.cs index 9740ad0..b7732df 100644 --- a/mpvnet/MainForm.cs +++ b/mpvnet/MainForm.cs @@ -1,23 +1,4 @@ -/** - *mpv.net - *Copyright(C) 2017 stax76 - * - *This program is free software: you can redistribute it and/or modify - *it under the terms of the GNU General Public License as published by - *the Free Software Foundation, either version 3 of the License, or - *(at your option) any later version. - * - *This program is distributed in the hope that it will be useful, - *but WITHOUT ANY WARRANTY; without even the implied warranty of - *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the - *GNU General Public License for more details. - * - *You should have received a copy of the GNU General Public License - *along with this program. If not, see http://www.gnu.org/licenses/. - */ - -using System; -using System.Diagnostics; +using System; using System.Drawing; using System.IO; using System.Runtime.InteropServices; @@ -261,6 +242,13 @@ namespace mpvnet Native.ReleaseCapture(); Native.PostMessage(Handle, 0xA1 /* WM_NCLBUTTONDOWN */, HTCAPTION, IntPtr.Zero); } + + var sb = Screen.FromControl(this).Bounds; + var p1 = new Point(sb.Width, 0); + var p2 = PointToScreen(e.Location); + + if (Math.Abs(p1.X - p2.X) < 10 && Math.Abs(p1.Y - p2.Y) < 10) + Close(); } protected override void OnMouseMove(MouseEventArgs e) diff --git a/mpvnet/Native.cs b/mpvnet/Native.cs index 0a384d4..3a8f03c 100644 --- a/mpvnet/Native.cs +++ b/mpvnet/Native.cs @@ -1,22 +1,4 @@ -/** - *mpv.net - *Copyright(C) 2017 stax76 - * - *This program is free software: you can redistribute it and/or modify - *it under the terms of the GNU General Public License as published by - *the Free Software Foundation, either version 3 of the License, or - *(at your option) any later version. - * - *This program is distributed in the hope that it will be useful, - *but WITHOUT ANY WARRANTY; without even the implied warranty of - *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the - *GNU General Public License for more details. - * - *You should have received a copy of the GNU General Public License - *along with this program. If not, see http://www.gnu.org/licenses/. - */ - -using System; +using System; using System.Drawing; using System.Runtime.InteropServices; diff --git a/mpvnet/NativeHelp.cs b/mpvnet/NativeHelp.cs index 48a7605..de36ae6 100644 --- a/mpvnet/NativeHelp.cs +++ b/mpvnet/NativeHelp.cs @@ -1,22 +1,4 @@ -/** - *mpv.net - *Copyright(C) 2017 stax76 - * - *This program is free software: you can redistribute it and/or modify - *it under the terms of the GNU General Public License as published by - *the Free Software Foundation, either version 3 of the License, or - *(at your option) any later version. - * - *This program is distributed in the hope that it will be useful, - *but WITHOUT ANY WARRANTY; without even the implied warranty of - *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the - *GNU General Public License for more details. - * - *You should have received a copy of the GNU General Public License - *along with this program. If not, see http://www.gnu.org/licenses/. - */ - -using System; +using System; namespace mpvnet { diff --git a/mpvnet/Program.cs b/mpvnet/Program.cs index 2d22940..baa5e7b 100644 --- a/mpvnet/Program.cs +++ b/mpvnet/Program.cs @@ -1,22 +1,4 @@ -/** - *mpv.net - *Copyright(C) 2017 stax76 - * - *This program is free software: you can redistribute it and/or modify - *it under the terms of the GNU General Public License as published by - *the Free Software Foundation, either version 3 of the License, or - *(at your option) any later version. - * - *This program is distributed in the hope that it will be useful, - *but WITHOUT ANY WARRANTY; without even the implied warranty of - *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the - *GNU General Public License for more details. - * - *You should have received a copy of the GNU General Public License - *along with this program. If not, see http://www.gnu.org/licenses/. - */ - -using System; +using System; using System.Windows.Forms; namespace mpvnet diff --git a/mpvnet/Properties/AssemblyInfo.cs b/mpvnet/Properties/AssemblyInfo.cs index e99e43d..0919bad 100644 --- a/mpvnet/Properties/AssemblyInfo.cs +++ b/mpvnet/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // 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("0.2.1.0")] +[assembly: AssemblyFileVersion("0.2.1.0")] diff --git a/mpvnet/StringExtensions.cs b/mpvnet/StringExtensions.cs index 3afc4dd..c401227 100644 --- a/mpvnet/StringExtensions.cs +++ b/mpvnet/StringExtensions.cs @@ -1,32 +1,6 @@ -/** - *mpv.net - *Copyright(C) 2017 stax76 - * - *This program is free software: you can redistribute it and/or modify - *it under the terms of the GNU General Public License as published by - *the Free Software Foundation, either version 3 of the License, or - *(at your option) any later version. - * - *This program is distributed in the hope that it will be useful, - *but WITHOUT ANY WARRANTY; without even the implied warranty of - *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the - *GNU General Public License for more details. - * - *You should have received a copy of the GNU General Public License - *along with this program. If not, see http://www.gnu.org/licenses/. - */ - -using Microsoft.VisualBasic; -using System; +using System; using System.Linq; -using System.Collections; -using System.Collections.Generic; -using System.Data; -using System.Diagnostics; -using System.Globalization; using System.IO; -using System.Runtime.CompilerServices; -using System.Text; public static class StringExtensions { diff --git a/mpvnet/UI.cs b/mpvnet/UI.cs index 2dc0b9d..c1de532 100644 --- a/mpvnet/UI.cs +++ b/mpvnet/UI.cs @@ -1,22 +1,4 @@ -/** - *mpv.net - *Copyright(C) 2017 stax76 - * - *This program is free software: you can redistribute it and/or modify - *it under the terms of the GNU General Public License as published by - *the Free Software Foundation, either version 3 of the License, or - *(at your option) any later version. - * - *This program is distributed in the hope that it will be useful, - *but WITHOUT ANY WARRANTY; without even the implied warranty of - *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the - *GNU General Public License for more details. - * - *You should have received a copy of the GNU General Public License - *along with this program. If not, see http://www.gnu.org/licenses/. - */ - -using System; +using System; using System.Drawing; using System.Windows.Forms; diff --git a/mpvnet/docs/changelog.md b/mpvnet/docs/changelog.md new file mode 100644 index 0000000..10942aa --- /dev/null +++ b/mpvnet/docs/changelog.md @@ -0,0 +1,3 @@ +### 0.2.1 + +- right-click in fullscreen in the right-left corner closes the app \ No newline at end of file diff --git a/mpvnet/libmpv.cs b/mpvnet/libmpv.cs index 003a150..7dde556 100644 --- a/mpvnet/libmpv.cs +++ b/mpvnet/libmpv.cs @@ -1,22 +1,4 @@ -/** - *mpv.net - *Copyright(C) 2017 stax76 - * - *This program is free software: you can redistribute it and/or modify - *it under the terms of the GNU General Public License as published by - *the Free Software Foundation, either version 3 of the License, or - *(at your option) any later version. - * - *This program is distributed in the hope that it will be useful, - *but WITHOUT ANY WARRANTY; without even the implied warranty of - *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the - *GNU General Public License for more details. - * - *You should have received a copy of the GNU General Public License - *along with this program. If not, see http://www.gnu.org/licenses/. - */ - -using System; +using System; using System.Runtime.InteropServices; namespace mpvnet diff --git a/mpvnet/mpv.cs b/mpvnet/mpv.cs index 118e3a3..e9f1d17 100644 --- a/mpvnet/mpv.cs +++ b/mpvnet/mpv.cs @@ -1,23 +1,4 @@ -/** - *mpv.net - *Copyright(C) 2017 stax76 - * - *This program is free software: you can redistribute it and/or modify - *it under the terms of the GNU General Public License as published by - *the Free Software Foundation, either version 3 of the License, or - *(at your option) any later version. - * - *This program is distributed in the hope that it will be useful, - *but WITHOUT ANY WARRANTY; without even the implied warranty of - *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the - *GNU General Public License for more details. - * - *You should have received a copy of the GNU General Public License - *along with this program. If not, see http://www.gnu.org/licenses/. - */ - -using System; -using System.Diagnostics; +using System; using System.IO; using System.Linq; using System.Runtime.InteropServices; @@ -85,7 +66,7 @@ namespace mpvnet { IntPtr ptr = mpv_wait_event(MpvHandle, -1); mpv_event evt = (mpv_event)Marshal.PtrToStructure(ptr, typeof(mpv_event)); - Debug.WriteLine(evt.event_id); + //Debug.WriteLine(evt.event_id); if (MpvWindowHandle == IntPtr.Zero) MpvWindowHandle = FindWindowEx(MainForm.Hwnd, IntPtr.Zero, "mpv", null); diff --git a/mpvnet/mpv.net.csproj b/mpvnet/mpv.net.csproj index ec582be..f23f12d 100644 --- a/mpvnet/mpv.net.csproj +++ b/mpvnet/mpv.net.csproj @@ -104,6 +104,7 @@ +