Пример #1
0
        public void AddMessage(Message message)
        {
            var allUserMessages = GetUserMessages(message.UserUniqueName);

            if (allUserMessages.Count == User.GetMessageCountToShow())
            {
                allUserMessages.Sort(delegate(Message a, Message b) { return(a.AddDateTime.CompareTo(b.AddDateTime)); });
                messages.Remove(allUserMessages.First());
            }
            messages.Add(message);
            XmlStorage.SaveChanges();
        }
Пример #2
0
 static XmlStorage()
 {
     XmlStorage.GetDataFromStorage();
 }