cleaned up app startup logic.

fixed update app issue.
This commit is contained in:
kay.one
2013-08-15 19:20:54 -07:00
parent b1e5646d7d
commit a4a58c59f1
16 changed files with 148 additions and 54 deletions
+5 -1
View File
@@ -1,6 +1,7 @@
using System;
using System.Windows.Forms;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Host;
using NzbDrone.SysTray;
namespace NzbDrone
@@ -11,10 +12,13 @@ namespace NzbDrone
{
try
{
var container = Host.Bootstrap.Start(new StartupArguments(args));
var container = Bootstrap.Start(new StartupArguments(args), new MessageBoxUserAlert());
container.Register<ISystemTrayApp, SystemTrayApp>();
container.Resolve<ISystemTrayApp>().Start();
}
catch (TerminateApplicationException)
{
}
catch (Exception e)
{
var message = string.Format("{0}: {1}", e.GetType().Name, e.Message);