mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 04:55:39 +02:00
change icon when upgrade version is detected
This commit is contained in:
parent
09f9717b48
commit
2b46fda541
2 changed files with 9 additions and 0 deletions
|
@ -19,6 +19,7 @@ namespace PersistentWindows.SystrayShell
|
|||
public static readonly string Contributors = $@"{ProjectUrl}/graphs/contributors";
|
||||
public static System.Drawing.Icon IdleIcon = null;
|
||||
public static System.Drawing.Icon BusyIcon = null;
|
||||
public static System.Drawing.Icon UpdateIcon = null;
|
||||
public static string AppdataFolder = null;
|
||||
public static string CmdArgs;
|
||||
public static bool Gui = true;
|
||||
|
@ -265,6 +266,11 @@ namespace PersistentWindows.SystrayShell
|
|||
BusyIcon = System.Drawing.Icon.FromHandle(iconHandle);
|
||||
}
|
||||
|
||||
{
|
||||
var iconHandle = Properties.Resources.pwIconUpdate.GetHicon();
|
||||
UpdateIcon = System.Drawing.Icon.FromHandle(iconHandle);
|
||||
}
|
||||
|
||||
systrayForm = new SystrayForm();
|
||||
systrayForm.enableUpgradeNotice = check_upgrade;
|
||||
systrayForm.autoUpgrade = auto_upgrade;
|
||||
|
|
|
@ -248,7 +248,10 @@ namespace PersistentWindows.SystrayShell
|
|||
if (autoUpgrade)
|
||||
Upgrade();
|
||||
else
|
||||
{
|
||||
upgradeNoticeMenuItem.Text = $"Upgrade to {latestVersion}";
|
||||
notifyIconMain.Icon = Program.UpdateIcon;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue