private void FixupCup(Cup previousValue) { if (previousValue != null && previousValue.Matches.Contains(this)) { previousValue.Matches.Remove(this); } if (Cup != null) { if (!Cup.Matches.Contains(this)) { Cup.Matches.Add(this); } } }
private void _dataTimer_Tick(object sender, EventArgs e) { var dataService = ServiceLocator.Current.GetInstance<IDataService>(); Model = dataService.GetCup(_cupId); }