void AppenedMoreMessagesWithSameTitle(PopupQueueItem item, int count) { for (int i = 1; i <= count; i++) { if (!TryAppendMessage(item)) break; } }
bool TryAppendMessage(PopupQueueItem item) { if (PopupQueue.Count > 0 && PopupQueue.Peek().Title == item.Title) { popupNotifier1.ContentText += "\n" + PopupQueue.Dequeue().Content; return true; } return false; }
bool TryAppendMessage(PopupQueueItem item) { if (PopupQueue.Count > 0 && PopupQueue.Peek().Title == item.Title) { popupNotifier1.ContentText += "\n" + PopupQueue.Dequeue().Content; return(true); } return(false); }
void AppenedMoreMessagesWithSameTitle(PopupQueueItem item, int count) { for (int i = 1; i <= count; i++) { if (!TryAppendMessage(item)) { break; } } }
void HandlePopupQueue() { if (PopupQueue.Count != 0 && PopupQueueDelay <= 0) { PopupQueueItem item = PopupQueue.Dequeue(); popupNotifier1.TitleText = item.Title; popupNotifier1.ContentText = item.Content; AppenedMoreMessagesWithSameTitle(item, 3); popupNotifier1.Delay = item.TimeToShowMillis; popupNotifier1.Popup(); PopupQueueDelay = item.TimeToShowMillis + 250; } else { PopupQueueDelay -= timer1.Interval; } }