Ejemplo n.º 1
0
 public void AddMessage(MessageCategory category, MessagePriority priority, int secondsDuration, string text)
 {
     var message = new Message();
     message.CreatedAt = BestTime;
     message.Text = text;
     message.Priority = priority;
     message.Duration = new TimeSpan(0,0,0,secondsDuration);
     AddMessage(message);
 }
Ejemplo n.º 2
0
 public void AddMessage(Message message)
 {
     lock (_messages)
     {
         message.ShownAt = null;
         _messages.Add(message);
     }
     //if we're not showing anything right now, we can go ahead and show it
     if(Message==null)
     {
         CycleMessages();
     }
 }