mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-10-02 01:57:23 +13:00
Fix system tray icon not showing loading state
This commit is contained in:
parent
7ff7640ffd
commit
dfb1b46b65
1 changed files with 2 additions and 3 deletions
|
@ -35,7 +35,6 @@ namespace SystemTrayMenu.UserInterface
|
|||
|
||||
public void Dispose()
|
||||
{
|
||||
notifyIcon.Icon = IntPtr.Zero;
|
||||
notifyIcon.Dispose();
|
||||
loadingIcon?.Dispose();
|
||||
}
|
||||
|
@ -43,12 +42,12 @@ namespace SystemTrayMenu.UserInterface
|
|||
public void LoadingStart()
|
||||
{
|
||||
loadingIcon ??= App.LoadIconFromResource("Resources/Loading.ico");
|
||||
notifyIcon.Icon = loadingIcon.Handle;
|
||||
notifyIcon.UpdateIcon(loadingIcon.Handle);
|
||||
}
|
||||
|
||||
public void LoadingStop()
|
||||
{
|
||||
notifyIcon.Icon = Config.GetAppIcon().Handle;
|
||||
notifyIcon.UpdateIcon(Config.GetAppIcon().Handle);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue