static void Main() { Log.Debug("Starting"); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); TrayIcon trayIcon = new TrayIcon(); // Run thread for notifcations from the service Log.Debug("Checking for notifications"); Notifications notifications = new Notifications(trayIcon); Thread notificationsThread = new Thread(new ThreadStart(notifications.Run)); notificationsThread.Name = "NotificationsThread"; notificationsThread.IsBackground = true; notificationsThread.Start(); // Run the UI Application.Run(trayIcon); }
public Notifications(TrayIcon _trayIcon) { UIDisplay.trayIcon = _trayIcon; }