From fbfe5c683774b897705bf697e37f9af9387bba64 Mon Sep 17 00:00:00 2001 From: flashwave Date: Fri, 26 Aug 2022 01:57:51 +0200 Subject: [PATCH] v1.4.2 - 2020-06-10 --- TopMostFriend/Properties/AssemblyInfo.cs | 4 ++-- TopMostFriend/SettingsWindow.cs | 25 ++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/TopMostFriend/Properties/AssemblyInfo.cs b/TopMostFriend/Properties/AssemblyInfo.cs index 58b0a0d..94e34e2 100644 --- a/TopMostFriend/Properties/AssemblyInfo.cs +++ b/TopMostFriend/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("1.4.1.0")] -[assembly: AssemblyFileVersion("1.4.1.0")] +[assembly: AssemblyVersion("1.4.2.0")] +[assembly: AssemblyFileVersion("1.4.2.0")] diff --git a/TopMostFriend/SettingsWindow.cs b/TopMostFriend/SettingsWindow.cs index 17c9b5a..c723b72 100644 --- a/TopMostFriend/SettingsWindow.cs +++ b/TopMostFriend/SettingsWindow.cs @@ -22,6 +22,7 @@ namespace TopMostFriend { public readonly CheckBox FgModCtrl; public readonly CheckBox FgModAlt; public readonly CheckBox FgModShift; + public readonly CheckBox FgModWindows; public readonly CheckBox FlAlwaysAdmin; public readonly CheckBox FlToggleNotification; @@ -34,7 +35,7 @@ namespace TopMostFriend { StartPosition = FormStartPosition.CenterScreen; FormBorderStyle = FormBorderStyle.FixedSingle; AutoScaleMode = AutoScaleMode.Dpi; - ClientSize = new Size(410, 278); + ClientSize = new Size(430, 278); MinimizeBox = MaximizeBox = false; MinimumSize = MaximumSize = Size; @@ -140,8 +141,19 @@ namespace TopMostFriend { }; FgModShift.Click += FgModShift_Click; + FgModWindows = new CheckBox { + Text = @"WIN", + Location = new Point(mod_x + 150, mod_y), + Checked = (KeyCode & (int)Win32ModKeys.MOD_WIN) > 0, + Appearance = FgModCtrl.Appearance, + Size = FgModCtrl.Size, + TextAlign = FgModCtrl.TextAlign, + TabIndex = 105, + }; + FgModWindows.Click += FgModWindows_Click; + hotKeyGroup.Controls.AddRange(new Control[] { - toggleForegroundLabel, FgModCtrl, FgModAlt, FgModShift, fgReset, FgKey, + toggleForegroundLabel, FgModCtrl, FgModAlt, FgModShift, FgModWindows, fgReset, FgKey, }); FlAlwaysAdmin = new CheckBox { @@ -244,6 +256,15 @@ namespace TopMostFriend { } } + private void FgModWindows_Click(object sender, EventArgs e) { + if(sender is CheckBox cb) { + if(cb.Checked) + KeyCode |= (int)Win32ModKeys.MOD_WIN; + else + KeyCode &= ~(int)Win32ModKeys.MOD_WIN; + } + } + private void FgKey_KeyDown(object sender, KeyEventArgs e) { if (!(sender is TextBox textBox)) return;