private void ListenToCurrentRaceRun() { if (_currentRace != _dm.GetCurrentRaceRun()) { if (_notifier != null) { _notifier.CollectionChanged -= StartListChanged; _notifier.ItemChanged -= StartListItemChanged; _notifier = null; } _rslVP = null; Application.Current.Dispatcher.Invoke(() => { RaceRun raceRun = _dm.GetCurrentRaceRun(); _rslVP = new RemainingStartListViewProvider(); _rslVP.Init(raceRun.GetStartListProvider(), raceRun); _notifier = new ItemsChangedNotifier(_rslVP.GetView()); _notifier.CollectionChanged += StartListChanged; _notifier.ItemChanged += StartListItemChanged; }); _currentRace = _dm.GetCurrentRaceRun(); SendStartList(); } }
public override void Dispose() { _notifier.CollectionChanged -= StartListChanged; _notifier.ItemChanged -= StartListItemChanged; _notifier = null; _timer = null; }
public override void Dispose() { _dm.CurrentRaceChanged -= OnCurrentRaceChanged; _notifier.CollectionChanged -= ResultListChanged; _notifier.ItemChanged -= ResultListItemChanged; _notifier = null; }
public override void Dispose() { _dm.CurrentRaceChanged -= OnCurrentRaceChanged; _notifier.CollectionChanged -= StartListChanged; _notifier.ItemChanged -= StartListItemChanged; _rslVP = null; _notifier = null; _timer = null; }
public StartListDataProvider(AppDataModel dm) { _dm = dm; Application.Current.Dispatcher.Invoke(() => { _notifier = new ItemsChangedNotifier(_dm.GetCurrentRace().GetRun(0).GetStartList()); _notifier.CollectionChanged += StartListChanged; _notifier.ItemChanged += StartListItemChanged; }); }
public RaceResultDataProvider(AppDataModel dm) { _dm = dm; Application.Current.Dispatcher.Invoke(() => { _notifier = new ItemsChangedNotifier(_dm.GetCurrentRace().GetResultViewProvider().GetView()); _notifier.CollectionChanged += DataListChanged; _notifier.ItemChanged += DataListItemChanged; }); }
public DatabaseDelegatorCategories(AppDataModel dm, IAppDataModelDataBase db) { _dm = dm; _db = db; _notifierClasses = new ItemsChangedNotifier(_dm.GetParticipantCategories()); _notifierClasses.ItemChanged += OnItemChanged; _notifierClasses.CollectionChanged += OnCollectionChanged; }
private void ListenToCurrentRaceRun() { if (_currentRace != _dm.GetCurrentRaceRun()) { if (_notifier != null) { _notifier.CollectionChanged -= ResultListChanged; _notifier.ItemChanged -= ResultListItemChanged; _notifier = null; } Application.Current.Dispatcher.Invoke(() => { _notifier = new ItemsChangedNotifier(_dm.GetCurrentRaceRun().GetOnTrackList()); _notifier.CollectionChanged += ResultListChanged; _notifier.ItemChanged += ResultListItemChanged; }); _currentRace = _dm.GetCurrentRaceRun(); SendResultList(); } }