public FrmMain() { InitializeComponent(); Load += (sender, e) => { DaemonService.Start(); }; }
private static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); BindExceptionHandler(); MessageBus.Start(); DaemonService.Start(); Application.ApplicationExit += (sender, e) => { MessageBus.Stop(); }; Application.Run(new FrmMain()); }