mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 13:05:38 +02:00
code cleanup
This commit is contained in:
parent
c41ab850bc
commit
30d2efad08
2 changed files with 4 additions and 10 deletions
|
@ -10,7 +10,6 @@ namespace PersistentWindows.SystrayShell
|
|||
public class HotKeyForm : Form
|
||||
{
|
||||
static HotKeyWindow hkwin = null;
|
||||
static IntPtr handle;
|
||||
static Thread messageLoop;
|
||||
|
||||
public static void Start(uint hotkey)
|
||||
|
@ -32,7 +31,6 @@ namespace PersistentWindows.SystrayShell
|
|||
{
|
||||
//InitializeComponent();
|
||||
var r = User32.RegisterHotKey(this.Handle, 0, (int)User32.KeyModifier.Alt, hotkey); // Register Alt + W
|
||||
handle = this.Handle;
|
||||
}
|
||||
|
||||
protected override void WndProc(ref Message m)
|
||||
|
@ -50,7 +48,7 @@ namespace PersistentWindows.SystrayShell
|
|||
|
||||
Program.HideRestoreTip(false); //hide icon
|
||||
Program.HideRestoreTip(); //show icon
|
||||
hkwin.HotKeyPressed(this.Handle, from_menu : false);
|
||||
hkwin.HotKeyPressed(from_menu : false);
|
||||
return;
|
||||
}
|
||||
else if (m.Msg == 0x0010 || m.Msg == 0x0002)
|
||||
|
@ -65,7 +63,7 @@ namespace PersistentWindows.SystrayShell
|
|||
{
|
||||
Program.HideRestoreTip(false); //hide icon
|
||||
Program.HideRestoreTip(); //show icon
|
||||
hkwin.HotKeyPressed(handle, from_menu: true);
|
||||
hkwin.HotKeyPressed(from_menu: true);
|
||||
}
|
||||
|
||||
protected override void SetVisibleCore(bool value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue