aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-01-13 15:59:32 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-01-13 15:59:32 -0500
commit150630f1525b9c054558816aa0ca506fc861a499 (patch)
treebfe9dadea8ea88b6216f4b2751967d0ed7fa464b
parent9b527dcd4fd95a886b7e6cd85a7c5b171f216b61 (diff)
update notify icon
-rw-r--r--MediaBrowser.ServerApplication/ServerNotifyIcon.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/MediaBrowser.ServerApplication/ServerNotifyIcon.cs b/MediaBrowser.ServerApplication/ServerNotifyIcon.cs
index e9a7d5985..673c6cddd 100644
--- a/MediaBrowser.ServerApplication/ServerNotifyIcon.cs
+++ b/MediaBrowser.ServerApplication/ServerNotifyIcon.cs
@@ -133,9 +133,22 @@ namespace MediaBrowser.ServerApplication
LocalizeText();
notifyIcon1.DoubleClick += notifyIcon1_DoubleClick;
+ Application.ThreadExit += Application_ThreadExit;
Application.ApplicationExit += Application_ApplicationExit;
}
+ void Application_ThreadExit(object sender, EventArgs e)
+ {
+ try
+ {
+ notifyIcon1.Visible = false;
+ }
+ catch
+ {
+
+ }
+ }
+
void Application_ApplicationExit(object sender, EventArgs e)
{
try