void WorkQueue() { if (!isVisible && this.queuedNotifications.Count > 0) { ToastWindow win = this.queuedNotifications.Dequeue(); this.Show(win); isVisible = true; } }
protected override void HandleNotification(Notification notification, string displayName) { ToastWindow win = new ToastWindow(); win.Tag = this; win.FormClosed += new FormClosedEventHandler(win_FormClosed); win.SetNotification(notification); this.queuedNotifications.Enqueue(win); WorkQueue(); }