mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-10 20:45:38 +02:00
force update pw icon by hide and then show it
This commit is contained in:
parent
41603fd49e
commit
ea555b45b8
3 changed files with 13 additions and 7 deletions
|
@ -415,12 +415,12 @@ namespace PersistentWindows.SystrayShell
|
|||
}
|
||||
}
|
||||
|
||||
public static void HideRestoreTip()
|
||||
public static void HideRestoreTip(bool show_icon = true)
|
||||
{
|
||||
if (systrayForm.contextMenuStripSysTray.InvokeRequired)
|
||||
systrayForm.contextMenuStripSysTray.BeginInvoke((Action)delegate ()
|
||||
{
|
||||
HideRestoreTip();
|
||||
HideRestoreTip(show_icon);
|
||||
});
|
||||
else
|
||||
{
|
||||
|
@ -428,7 +428,12 @@ namespace PersistentWindows.SystrayShell
|
|||
ni.Icon = IdleIcon;
|
||||
|
||||
if (Gui)
|
||||
ni.Visible = true;
|
||||
{
|
||||
if (show_icon)
|
||||
ni.Visible = true;
|
||||
else
|
||||
ni.Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue