From 3eeee7335e6c0bbe2eb76faf8d7c58af24f18476 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 9 Jan 2014 20:32:21 -0800 Subject: [PATCH] Fixed: Exit from tray icon --- src/NzbDrone.Common/Composition/ContainerBuilderBase.cs | 4 ---- src/NzbDrone.Common/ServiceProvider.cs | 1 - src/NzbDrone.Host/Bootstrap.cs | 5 ++++- src/NzbDrone/SysTray/SysTrayApp.cs | 1 - src/NzbDrone/WindowsApp.cs | 2 -- 5 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/NzbDrone.Common/Composition/ContainerBuilderBase.cs b/src/NzbDrone.Common/Composition/ContainerBuilderBase.cs index 7a9154672..d2041c6de 100644 --- a/src/NzbDrone.Common/Composition/ContainerBuilderBase.cs +++ b/src/NzbDrone.Common/Composition/ContainerBuilderBase.cs @@ -17,8 +17,6 @@ namespace NzbDrone.Common.Composition protected ContainerBuilderBase(IStartupContext args, params string[] assemblies) { - - _loadedTypes = new List(); foreach (var assembly in assemblies) @@ -55,8 +53,6 @@ namespace NzbDrone.Common.Composition { var implementations = Container.GetImplementations(contractType).Where(c => !c.IsGenericTypeDefinition).ToList(); - - if (implementations.Count == 0) { return; diff --git a/src/NzbDrone.Common/ServiceProvider.cs b/src/NzbDrone.Common/ServiceProvider.cs index 7b140fb9e..e669321cf 100644 --- a/src/NzbDrone.Common/ServiceProvider.cs +++ b/src/NzbDrone.Common/ServiceProvider.cs @@ -139,7 +139,6 @@ namespace NzbDrone.Common } } - public ServiceControllerStatus GetStatus(string serviceName) { return GetService(serviceName).Status; diff --git a/src/NzbDrone.Host/Bootstrap.cs b/src/NzbDrone.Host/Bootstrap.cs index c42a7cbf1..96ebc1ab6 100644 --- a/src/NzbDrone.Host/Bootstrap.cs +++ b/src/NzbDrone.Host/Bootstrap.cs @@ -40,7 +40,10 @@ namespace NzbDrone.Host startCallback(_container); } - SpinToExit(appMode); + else + { + SpinToExit(appMode); + } } catch (TerminateApplicationException e) { diff --git a/src/NzbDrone/SysTray/SysTrayApp.cs b/src/NzbDrone/SysTray/SysTrayApp.cs index 1c410d895..bfbc96cb2 100644 --- a/src/NzbDrone/SysTray/SysTrayApp.cs +++ b/src/NzbDrone/SysTray/SysTrayApp.cs @@ -23,7 +23,6 @@ namespace NzbDrone.SysTray _browserService = browserService; } - public void Start() { Application.ThreadException += OnThreadException; diff --git a/src/NzbDrone/WindowsApp.cs b/src/NzbDrone/WindowsApp.cs index d2b82a2a1..452e284cd 100644 --- a/src/NzbDrone/WindowsApp.cs +++ b/src/NzbDrone/WindowsApp.cs @@ -34,7 +34,5 @@ namespace NzbDrone MessageBox.Show(text: message, buttons: MessageBoxButtons.OK, icon: MessageBoxIcon.Error, caption: "Epic Fail!"); } } - - } }