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)
|
||||
{
|
||||
init = true;
|
||||
hotkey = hkey;
|
||||
|
||||
InitializeComponent();
|
||||
|
|
|
@ -24,6 +24,7 @@ namespace PersistentWindows.SystrayShell
|
|||
public static string CmdArgs;
|
||||
public static bool Gui = 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
|
||||
|
||||
|
@ -74,7 +75,6 @@ namespace PersistentWindows.SystrayShell
|
|||
bool auto_upgrade = false;
|
||||
bool legacy_icon = false;
|
||||
bool waiting_taskbar = false;
|
||||
uint hotkey = 'W'; //Alt + W
|
||||
|
||||
foreach (var arg in args)
|
||||
{
|
||||
|
|
|
@ -154,7 +154,7 @@ namespace PersistentWindows.SystrayShell
|
|||
|
||||
// web commander
|
||||
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);
|
||||
if (!Program.hotkey_window)
|
||||
this.invokeWebCommander.Visible = false;
|
||||
|
|
|
@ -343,11 +343,15 @@ namespace PersistentWindows.SystrayShell
|
|||
{
|
||||
if ((User32.GetKeyState(0x11) & 0x8000) != 0)
|
||||
HotKeyForm.InvokeFromMenu();
|
||||
else if (this.invokeWebCommander.Text.Contains("Disable"))
|
||||
{
|
||||
this.invokeWebCommander.Text = "Enable webpage commander";
|
||||
HotKeyForm.Stop();
|
||||
}
|
||||
else
|
||||
{
|
||||
//this.invokeWebCommander.Enabled = false;
|
||||
this.invokeWebCommander.Visible = false;
|
||||
HotKeyForm.Stop();
|
||||
this.invokeWebCommander.Text = "Disable webpage commander";
|
||||
HotKeyForm.Start(Program.hotkey);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue