Пример #1
0
 void AppenedMoreMessagesWithSameTitle(PopupQueueItem item, int count)
 {
     for (int i = 1; i <= count; i++)
     {
         if (!TryAppendMessage(item)) break;
     }
 }
Пример #2
0
 bool TryAppendMessage(PopupQueueItem item)
 {
     if (PopupQueue.Count > 0 && PopupQueue.Peek().Title == item.Title)
     {
         popupNotifier1.ContentText += "\n" + PopupQueue.Dequeue().Content;
         return true;
     }
     return false;
 }
Пример #3
0
 bool TryAppendMessage(PopupQueueItem item)
 {
     if (PopupQueue.Count > 0 && PopupQueue.Peek().Title == item.Title)
     {
         popupNotifier1.ContentText += "\n" + PopupQueue.Dequeue().Content;
         return(true);
     }
     return(false);
 }
Пример #4
0
 void AppenedMoreMessagesWithSameTitle(PopupQueueItem item, int count)
 {
     for (int i = 1; i <= count; i++)
     {
         if (!TryAppendMessage(item))
         {
             break;
         }
     }
 }
Пример #5
0
 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;
     }
 }