Exemple #1
0
        public TrayManager(CustomApplicationContext context)
        {
            activeIcon = new Icon("icons\\active.ico");
            errorIcon  = new Icon("icons\\error.ico");

            this.context = context;

            BuildSystemTray();
        }
Exemple #2
0
        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);
            }
        }