示例#1
0
 public void MarkAsRead(IncomingMessage msg)
 {
     msg.IsRead = true;
     NotifyPropertyChanged("UnreadMessagesCount");
 }
示例#2
0
        public void GotMessage(string username, string address, string message,Guid guid)
        {
            var contactViewModel = FindContactViewModel(username, address);
            if (contactViewModel != null)
            {
                if (!contactViewModel.Contact.Messages.Any(x => x.Guid == guid))
                {
                    var m = new IncomingMessage
                    {
                        Guid = guid,
                        Text = message,
                        TimeStamp = DateTime.Now
                    };
                    contactViewModel.AddMessage(m);

                    // todo : send confirm
                }
            }
        }