2013-08-07 08:32:22 +03:00
|
|
|
using System;
|
|
|
|
using System.Windows.Forms;
|
2013-08-13 08:08:37 +03:00
|
|
|
using NzbDrone.Common.EnvironmentInfo;
|
2013-08-07 08:32:22 +03:00
|
|
|
using NzbDrone.SysTray;
|
|
|
|
|
|
|
|
namespace NzbDrone
|
|
|
|
{
|
|
|
|
public static class WindowsApp
|
|
|
|
{
|
|
|
|
public static void Main(string[] args)
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
2013-08-13 08:08:37 +03:00
|
|
|
var container = Host.Bootstrap.Start(new StartupArguments(args));
|
2013-08-07 08:32:22 +03:00
|
|
|
container.Register<ISystemTrayApp, SystemTrayApp>();
|
|
|
|
container.Resolve<ISystemTrayApp>().Start();
|
|
|
|
}
|
|
|
|
catch (Exception e)
|
|
|
|
{
|
|
|
|
var message = string.Format("{0}: {1}", e.GetType().Name, e.Message);
|
|
|
|
MessageBox.Show(text: message, buttons: MessageBoxButtons.OK, icon: MessageBoxIcon.Error, caption: "Epic Fail!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|