diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-09-30 00:07:21 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-09-30 00:07:21 -0400 |
| commit | 459e483b4e9f5f4a8284ef450733a215ba4ac334 (patch) | |
| tree | c7f8dc34270aa94bc193ea443f929dd21cad4f33 /MediaBrowser.ServerApplication/ServerNotifyIcon.cs | |
| parent | 11754a2fb285fbe57db408ceb7e02b834e692c19 (diff) | |
fix windows restart hang
Diffstat (limited to 'MediaBrowser.ServerApplication/ServerNotifyIcon.cs')
| -rw-r--r-- | MediaBrowser.ServerApplication/ServerNotifyIcon.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/MediaBrowser.ServerApplication/ServerNotifyIcon.cs b/MediaBrowser.ServerApplication/ServerNotifyIcon.cs index 725720731..ad0bd8a1a 100644 --- a/MediaBrowser.ServerApplication/ServerNotifyIcon.cs +++ b/MediaBrowser.ServerApplication/ServerNotifyIcon.cs @@ -168,6 +168,19 @@ namespace MediaBrowser.ServerApplication } notifyIcon1.DoubleClick += notifyIcon1_DoubleClick; + Application.ApplicationExit += Application_ApplicationExit; + } + + void Application_ApplicationExit(object sender, EventArgs e) + { + try + { + notifyIcon1.Visible = false; + } + catch + { + + } } void notifyIcon1_DoubleClick(object sender, EventArgs e) |
