mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 04:55:39 +02:00
#331, toggle menu between Enable/Disable webpage commander
This commit is contained in:
parent
74a3f6e173
commit
169e694684
4 changed files with 10 additions and 5 deletions
|
@ -43,6 +43,7 @@ namespace PersistentWindows.Common
|
||||||
|
|
||||||
public HotKeyWindow(uint hkey)
|
public HotKeyWindow(uint hkey)
|
||||||
{
|
{
|
||||||
|
init = true;
|
||||||
hotkey = hkey;
|
hotkey = hkey;
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
|
@ -24,6 +24,7 @@ namespace PersistentWindows.SystrayShell
|
||||||
public static string CmdArgs;
|
public static string CmdArgs;
|
||||||
public static bool Gui = true;
|
public static bool Gui = true;
|
||||||
public static bool hotkey_window = true;
|
public static bool hotkey_window = true;
|
||||||
|
public static uint hotkey = 'W'; //Alt + W
|
||||||
|
|
||||||
private const int MaxSnapshots = 38; // 0-9, a-z, ` and final one for undo
|
private const int MaxSnapshots = 38; // 0-9, a-z, ` and final one for undo
|
||||||
|
|
||||||
|
@ -74,7 +75,6 @@ namespace PersistentWindows.SystrayShell
|
||||||
bool auto_upgrade = false;
|
bool auto_upgrade = false;
|
||||||
bool legacy_icon = false;
|
bool legacy_icon = false;
|
||||||
bool waiting_taskbar = false;
|
bool waiting_taskbar = false;
|
||||||
uint hotkey = 'W'; //Alt + W
|
|
||||||
|
|
||||||
foreach (var arg in args)
|
foreach (var arg in args)
|
||||||
{
|
{
|
||||||
|
|
|
@ -154,7 +154,7 @@ namespace PersistentWindows.SystrayShell
|
||||||
|
|
||||||
// web commander
|
// web commander
|
||||||
this.invokeWebCommander.Name = "web commander on/off";
|
this.invokeWebCommander.Name = "web commander on/off";
|
||||||
this.invokeWebCommander.Text = "Turn off webpage commander";
|
this.invokeWebCommander.Text = "Disable webpage commander";
|
||||||
this.invokeWebCommander.Click += new System.EventHandler(this.WebCommander);
|
this.invokeWebCommander.Click += new System.EventHandler(this.WebCommander);
|
||||||
if (!Program.hotkey_window)
|
if (!Program.hotkey_window)
|
||||||
this.invokeWebCommander.Visible = false;
|
this.invokeWebCommander.Visible = false;
|
||||||
|
|
|
@ -343,11 +343,15 @@ namespace PersistentWindows.SystrayShell
|
||||||
{
|
{
|
||||||
if ((User32.GetKeyState(0x11) & 0x8000) != 0)
|
if ((User32.GetKeyState(0x11) & 0x8000) != 0)
|
||||||
HotKeyForm.InvokeFromMenu();
|
HotKeyForm.InvokeFromMenu();
|
||||||
|
else if (this.invokeWebCommander.Text.Contains("Disable"))
|
||||||
|
{
|
||||||
|
this.invokeWebCommander.Text = "Enable webpage commander";
|
||||||
|
HotKeyForm.Stop();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//this.invokeWebCommander.Enabled = false;
|
this.invokeWebCommander.Text = "Disable webpage commander";
|
||||||
this.invokeWebCommander.Visible = false;
|
HotKeyForm.Start(Program.hotkey);
|
||||||
HotKeyForm.Stop();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue