mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-25 17:27:18 +00:00
25 lines
No EOL
777 B
C#
25 lines
No EOL
777 B
C#
using System;
|
|
using System.Windows.Forms;
|
|
using NzbDrone.Common.EnvironmentInfo;
|
|
using NzbDrone.SysTray;
|
|
|
|
namespace NzbDrone
|
|
{
|
|
public static class WindowsApp
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
try
|
|
{
|
|
var container = Host.Bootstrap.Start(new StartupArguments(args));
|
|
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!");
|
|
}
|
|
}
|
|
}
|
|
} |