public TrayManager(CustomApplicationContext context) { activeIcon = new Icon("icons\\active.ico"); errorIcon = new Icon("icons\\error.ico"); this.context = context; BuildSystemTray(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { var applicationContext = new CustomApplicationContext(); Application.Run(applicationContext); } catch (Exception ex) { MessageBox.Show(ex.Message, "Program Terminated Unexpectedly", MessageBoxButtons.OK, MessageBoxIcon.Error); } }