move code before base.OnShown so scripts can use the ContextMenu

This commit is contained in:
Frank Skare
2019-07-14 01:40:13 +02:00
parent 2b2b60b90f
commit b80b375df1
4 changed files with 8 additions and 4 deletions

View File

@@ -1,3 +1,7 @@
### 4.7.2
- fix cursor showing load activity on startup
### 4.7.1 ### 4.7.1
- few layout problems were fixed, autosize for instance did not work - few layout problems were fixed, autosize for instance did not work

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 // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("4.7.1.0")] [assembly: AssemblyVersion("4.7.2.0")]
[assembly: AssemblyFileVersion("4.7.1.0")] [assembly: AssemblyFileVersion("4.7.2.0")]

View File

@@ -45,7 +45,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(288F, 288F); this.AutoScaleDimensions = new System.Drawing.SizeF(288F, 288F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackColor = System.Drawing.Color.Black; this.BackColor = System.Drawing.Color.Black;
this.ClientSize = new System.Drawing.Size(348, 0); this.ClientSize = new System.Drawing.Size(542, 0);
this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);

View File

@@ -511,7 +511,6 @@ namespace mpvnet
protected override void OnShown(EventArgs e) protected override void OnShown(EventArgs e)
{ {
base.OnShown(e);
if (App.IsDarkMode) ToolStripRendererEx.ColorTheme = Color.Black; if (App.IsDarkMode) ToolStripRendererEx.ColorTheme = Color.Black;
ContextMenu = new ContextMenuStripEx(components); ContextMenu = new ContextMenuStripEx(components);
ContextMenu.Opened += ContextMenu_Opened; ContextMenu.Opened += ContextMenu_Opened;
@@ -521,6 +520,7 @@ namespace mpvnet
IgnoreDpiChanged = false; IgnoreDpiChanged = false;
CheckClipboardForURL(); CheckClipboardForURL();
Cursor.Position = new Point(Cursor.Position.X + 1, Cursor.Position.Y); Cursor.Position = new Point(Cursor.Position.X + 1, Cursor.Position.Y);
base.OnShown(e);
} }
protected override void OnActivated(EventArgs e) protected override void OnActivated(EventArgs e)