private static void QUEUE(Notification notification) { if (notification == null) { if (NotificationsQueue.Count > 0) { CurrentNotification = NotificationsQueue[0]; NotificationsQueue.RemoveAt(0); PopUpWindow(); } else { return; } } else { NotificationsQueue.Add(notification); if (NotificationsQueue.Count > 0 && !IsShowing) { CurrentNotification = NotificationsQueue[0]; NotificationsQueue.RemoveAt(0); PopUpWindow(); } else { return; } } }
private void notificationIcon_BalloonTipClosed(object sender, EventArgs e) { Debug.Assert(NotificationsQueue.Count != 0); if (NotificationsQueue[0].Source != null) { NotificationsQueue[0].Source.Closed(sender, e); } NotificationsQueue.RemoveAt(0); if (NotificationsQueue.Count > 0) { ShowNextNotification(); } }
public EmbeddedIdentityProxy( UserManager <EmbeddedIdentityServerUser> userManager, IClientProxy clientProxy, IEmailSender emailSender, NotificationsQueue notificationsQueue, IHttpContextAccessor httpContextAccessor, LinkGenerator linkGenerator) { _userManager = userManager; _clientProxy = clientProxy; _emailSender = emailSender; _notificationsQueue = notificationsQueue; _httpAccessor = httpContextAccessor; _linkGenerator = linkGenerator; }
/// <summary> /// Diplays the given title, message and icon as a system notification area balloon. /// </summary> /// <param name="title">The title of the balloon.</param> /// <param name="message">The message to display.</param> /// <param name="icon">The icon to show.</param> public void ShowNotificationBalloon(string title, string message, ToolTipIcon icon) { NotificationInfo info; info.Source = null; info.Timeout = 0; info.Icon = icon; info.Title = title; info.Message = message; NotificationsQueue.Add(info); //Can we show the notification immediately? if (NotificationsQueue.Count == 1) { ShowNextNotification(); } }
public void ShowNotification(INotifier source, int timeout, ToolTipIcon icon, string title, string message) { NotificationInfo info; info.Source = source; info.Timeout = timeout; info.Icon = icon; info.Title = title; info.Message = message; NotificationsQueue.Add(info); //Can we show the notification immediately? if (NotificationsQueue.Count == 1) { ShowNextNotification(); } }