mirror of
https://github.com/ckaczor/wpf-notifyicon.git
synced 2026-01-22 17:29:12 -05:00
WPF NotifyIcon
--------------
FIX Dispose only deregisters OnExit event listenter if there is actually an
application (not the case in WinForms environments).
CHG Added dispose to WinForms sample which closes the NotifyIcon.
git-svn-id: https://svn.evolvesoftware.ch/repos/evolve.net/WPF/NotifyIcon@121 9f600761-6f11-4665-b6dc-0185e9171623
This commit is contained in:
@@ -994,7 +994,10 @@ namespace Hardcodet.Wpf.TaskbarNotification
|
||||
IsDisposed = true;
|
||||
|
||||
//deregister application event listener
|
||||
Application.Current.Exit -= OnExit;
|
||||
if (Application.Current != null)
|
||||
{
|
||||
Application.Current.Exit -= OnExit;
|
||||
}
|
||||
|
||||
//stop timers
|
||||
singleClickTimer.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user