diff --git a/Ninjacrab.PersistentWindows.Solution/Common/HotKeyWindow.cs b/Ninjacrab.PersistentWindows.Solution/Common/HotKeyWindow.cs index 78788d0..abf9e8c 100644 --- a/Ninjacrab.PersistentWindows.Solution/Common/HotKeyWindow.cs +++ b/Ninjacrab.PersistentWindows.Solution/Common/HotKeyWindow.cs @@ -6,7 +6,6 @@ using System.Data; using System.Drawing; using System.Linq; using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; using System.Runtime.InteropServices; @@ -632,7 +631,6 @@ namespace PersistentWindows.Common active = false; } } - } diff --git a/Ninjacrab.PersistentWindows.Solution/SystrayShell/HotKey.cs b/Ninjacrab.PersistentWindows.Solution/SystrayShell/HotKey.cs index 5363fe0..c2f7df2 100644 --- a/Ninjacrab.PersistentWindows.Solution/SystrayShell/HotKey.cs +++ b/Ninjacrab.PersistentWindows.Solution/SystrayShell/HotKey.cs @@ -1,6 +1,8 @@ using System; using System.Threading; using System.Windows.Forms; +using System.Diagnostics; +using System.IO; using PersistentWindows.Common; using PersistentWindows.Common.WinApiBridge; @@ -10,6 +12,7 @@ namespace PersistentWindows.SystrayShell { public class HotKeyForm : Form { + static bool init = true; static HotKeyWindow hkwin = null; static Thread messageLoop; @@ -63,6 +66,18 @@ namespace PersistentWindows.SystrayShell Program.HideRestoreTip(false); //hide icon Program.HideRestoreTip(); //show icon hkwin.HotKeyPressed(from_menu : false); + if (init) + { + init = false; + string webpage_commander_notification = Path.Combine(Program.AppdataFolder, "webpage_commander_notification"); + if (!File.Exists(webpage_commander_notification)) + { + File.Create(webpage_commander_notification); + Process.Start(Program.ProjectUrl + "/blob/master/webpage_commander.md"); + } + Program.systrayForm.notifyIconMain.ShowBalloonTip(5000, $"webpage commander is invoked via hotkey", "Press the hotkey (Alt + W) again to revoke", ToolTipIcon.Info); + } + return; } else if (m.Msg == 0x0010 || m.Msg == 0x0002) diff --git a/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs b/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs index 10c9c1d..4c2d408 100644 --- a/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs +++ b/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs @@ -29,7 +29,7 @@ namespace PersistentWindows.SystrayShell private const int MaxSnapshots = 38; // 0-9, a-z, ` and final one for undo static PersistentWindowProcessor pwp = null; - static SystrayForm systrayForm = null; + public static SystrayForm systrayForm = null; static bool silent = false; //suppress all balloon tip & sound prompt static bool notification = false; //pop balloon when auto restore static int delay_manual_capture = 5000; //in millisecond diff --git a/webpage_commander.md b/webpage_commander.md index 4a97516..d1234ae 100644 --- a/webpage_commander.md +++ b/webpage_commander.md @@ -1,5 +1,5 @@ -### Webpage commander window is activated via hotkey (Alt + W) -* If the activation is unintentional, press the hotkey again to deactivate webpage commander. This feature can be disabled via PW menu or command line. -* Webpage commander improves the efficiency of web browsing using single-letter command shortcut -* Check out online help for more details \ No newline at end of file +### Webpage commander window is invoked via hotkey (Alt + W) +* If the invocation is unintentional, press the hotkey again to revoke webpage commander. The hotkey can be disabled via PW menu or command line. +* Webpage commander improves the efficiency of web browsing using single-letter command shortcut. +* Check out [Online Help](https://www.github.com/kangyu-california/PersistentWindows/blob/master/Help.md) for detailed instructions. \ No newline at end of file