reorganize code for easier scripting

This commit is contained in:
Frank Skare
2019-07-14 02:06:23 +02:00
parent b80b375df1
commit d5b2923c68
3 changed files with 10 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
### 4.7.2
### 4.7.3
- fix cursor showing load activity on startup

View File

@@ -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("4.7.2.0")]
[assembly: AssemblyFileVersion("4.7.2.0")]
[assembly: AssemblyVersion("4.7.3.0")]
[assembly: AssemblyFileVersion("4.7.3.0")]

View File

@@ -9,6 +9,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Threading.Tasks;
using System.Diagnostics;
namespace mpvnet
{
@@ -46,6 +47,11 @@ namespace mpvnet
else
RecentFiles = new List<string>();
if (App.IsDarkMode) ToolStripRendererEx.ColorTheme = Color.Black;
ContextMenu = new ContextMenuStripEx(components);
ContextMenu.Opened += ContextMenu_Opened;
ContextMenu.Opening += ContextMenu_Opening;
App.ProcessCommandLineEarly();
if (mp.Screen == -1) mp.Screen = Array.IndexOf(Screen.AllScreens, Screen.PrimaryScreen);
@@ -511,16 +517,12 @@ namespace mpvnet
protected override void OnShown(EventArgs e)
{
if (App.IsDarkMode) ToolStripRendererEx.ColorTheme = Color.Black;
ContextMenu = new ContextMenuStripEx(components);
ContextMenu.Opened += ContextMenu_Opened;
ContextMenu.Opening += ContextMenu_Opening;
base.OnShown(e);
BuildMenu();
ContextMenuStrip = ContextMenu;
IgnoreDpiChanged = false;
CheckClipboardForURL();
Cursor.Position = new Point(Cursor.Position.X + 1, Cursor.Position.Y);
base.OnShown(e);
}
protected override void OnActivated(EventArgs e)