mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-28 10:37:41 +00:00
a4a58c59f1
fixed update app issue.
29 lines
No EOL
898 B
C#
29 lines
No EOL
898 B
C#
using System;
|
|
using System.Windows.Forms;
|
|
using NzbDrone.Common.EnvironmentInfo;
|
|
using NzbDrone.Host;
|
|
using NzbDrone.SysTray;
|
|
|
|
namespace NzbDrone
|
|
{
|
|
public static class WindowsApp
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
try
|
|
{
|
|
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);
|
|
MessageBox.Show(text: message, buttons: MessageBoxButtons.OK, icon: MessageBoxIcon.Error, caption: "Epic Fail!");
|
|
}
|
|
}
|
|
}
|
|
} |