mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-23 16:26:02 +00:00
08e7490ac5
New: Tray Icon visible when running without console window
26 lines
No EOL
483 B
C#
26 lines
No EOL
483 B
C#
using System.Linq;
|
|
using System.Windows.Forms;
|
|
|
|
namespace NzbDrone.Common.SysTray
|
|
{
|
|
public class SysTrayProvider
|
|
{
|
|
private readonly SysTrayApp _sysTrayApp;
|
|
|
|
public SysTrayProvider(SysTrayApp sysTrayApp)
|
|
{
|
|
_sysTrayApp = sysTrayApp;
|
|
}
|
|
|
|
public SysTrayProvider()
|
|
{
|
|
}
|
|
|
|
public virtual void Start()
|
|
{
|
|
_sysTrayApp.Create();
|
|
|
|
Application.Run(_sysTrayApp);
|
|
}
|
|
}
|
|
} |