From 4795e64e25e828db9f8a774cf3b040d6e7b11866 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 6 Jul 2022 19:35:01 +0100 Subject: [PATCH 1/2] Added hotkey Shift+F11 for always-on-top --- MainForm.Designer.cs | 25 ++++++++++++++++++++++--- MainForm.cs | 4 ++++ VideoPreview.csproj | 2 +- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs index dca9d23..6be232e 100644 --- a/MainForm.Designer.cs +++ b/MainForm.Designer.cs @@ -53,6 +53,8 @@ namespace VideoPreview this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.refreshToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.loadNextFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -308,7 +310,9 @@ namespace VideoPreview // this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.refreshToolStripMenuItem, - this.loadNextFileToolStripMenuItem}); + this.loadNextFileToolStripMenuItem, + this.toolStripSeparator1, + this.toolStripMenuItem3}); this.editToolStripMenuItem.Name = "editToolStripMenuItem"; this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20); this.editToolStripMenuItem.Text = "&Edit"; @@ -317,7 +321,7 @@ namespace VideoPreview // this.refreshToolStripMenuItem.Name = "refreshToolStripMenuItem"; this.refreshToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F5; - this.refreshToolStripMenuItem.Size = new System.Drawing.Size(168, 22); + this.refreshToolStripMenuItem.Size = new System.Drawing.Size(209, 22); this.refreshToolStripMenuItem.Text = "&Refresh"; this.refreshToolStripMenuItem.Click += new System.EventHandler(this.refreshToolStripMenuItem_Click); // @@ -325,10 +329,23 @@ namespace VideoPreview // this.loadNextFileToolStripMenuItem.Name = "loadNextFileToolStripMenuItem"; this.loadNextFileToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F3; - this.loadNextFileToolStripMenuItem.Size = new System.Drawing.Size(168, 22); + this.loadNextFileToolStripMenuItem.Size = new System.Drawing.Size(209, 22); this.loadNextFileToolStripMenuItem.Text = "&Load Next File"; this.loadNextFileToolStripMenuItem.Click += new System.EventHandler(this.loadNextFileToolStripMenuItem_Click); // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(206, 6); + // + // toolStripMenuItem3 + // + this.toolStripMenuItem3.Name = "toolStripMenuItem3"; + this.toolStripMenuItem3.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.F11))); + this.toolStripMenuItem3.Size = new System.Drawing.Size(209, 22); + this.toolStripMenuItem3.Text = "&Always On Top"; + this.toolStripMenuItem3.Click += new System.EventHandler(this.toolStripMenuItem3_Click); + // // toolStripMenuItem2 // this.toolStripMenuItem2.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -442,6 +459,8 @@ namespace VideoPreview private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2; private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3; } } diff --git a/MainForm.cs b/MainForm.cs index f2fab00..d5a1263 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -415,5 +415,9 @@ namespace VideoPreview }); } + private void toolStripMenuItem3_Click(object sender, EventArgs e) + { + this.TopMost = !this.TopMost; + } } } diff --git a/VideoPreview.csproj b/VideoPreview.csproj index f39b59b..2410a05 100644 --- a/VideoPreview.csproj +++ b/VideoPreview.csproj @@ -11,7 +11,7 @@ Ray Lam favicon.ico true - 0.1.2.039 + 0.1.2.031 From 7b024d22adc67de212852dd6e048bf0fbe422507 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 6 Jul 2022 19:37:39 +0100 Subject: [PATCH 2/2] Corrected build no. --- VideoPreview.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VideoPreview.csproj b/VideoPreview.csproj index 2410a05..04f8017 100644 --- a/VideoPreview.csproj +++ b/VideoPreview.csproj @@ -11,7 +11,7 @@ Ray Lam favicon.ico true - 0.1.2.031 + 0.1.2.041