From 5d30bfeb3c69f9c9743b3467fdd3e47e99317881 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 13 Jan 2016 15:59:32 -0500 Subject: [PATCH] update notify icon --- MediaBrowser.ServerApplication/ServerNotifyIcon.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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