예제 #1
0
 public MatchViewModel()
 {
     Match fake = new Match();
     fake.Id = "a";
     fake.Person = new Person();
     fake.Person.Name = "NAme";
     fake.CreatedDate = "1/1/2014";
     fake.Closed = true;
     _data = fake;
 }
예제 #2
0
        internal void Update(Match[] matches)
        {
            lock (_matches)
            {
                foreach (var match in matches)
                {
                    var existingMatch = _matches.FirstOrDefault(a => a.Data.Id == match.Id);
                    if (existingMatch != null)
                    {
                        foreach (var msg in match.Messages)
                            existingMatch.Messages.Add(new ConversationMessageViewModel(msg));
                    }
                    else
                    {
                        _matches.Insert(0, new MatchViewModel(match));
                    }
                }

                RaisePropertyChanged("Matches");
            }
        }
예제 #3
0
 public MatchViewModel(Match data)
 {
     _data = data;
 }