コード例 #1
0
        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();
            }
        }
コード例 #2
0
 public override void Dispose()
 {
     _notifier.CollectionChanged -= StartListChanged;
     _notifier.ItemChanged       -= StartListItemChanged;
     _notifier = null;
     _timer    = null;
 }
コード例 #3
0
        public override void Dispose()
        {
            _dm.CurrentRaceChanged -= OnCurrentRaceChanged;

            _notifier.CollectionChanged -= ResultListChanged;
            _notifier.ItemChanged       -= ResultListItemChanged;
            _notifier = null;
        }
コード例 #4
0
        public override void Dispose()
        {
            _dm.CurrentRaceChanged -= OnCurrentRaceChanged;

            _notifier.CollectionChanged -= StartListChanged;
            _notifier.ItemChanged       -= StartListItemChanged;
            _rslVP    = null;
            _notifier = null;
            _timer    = null;
        }
コード例 #5
0
 public StartListDataProvider(AppDataModel dm)
 {
     _dm = dm;
     Application.Current.Dispatcher.Invoke(() =>
     {
         _notifier = new ItemsChangedNotifier(_dm.GetCurrentRace().GetRun(0).GetStartList());
         _notifier.CollectionChanged += StartListChanged;
         _notifier.ItemChanged       += StartListItemChanged;
     });
 }
コード例 #6
0
 public RaceResultDataProvider(AppDataModel dm)
 {
     _dm = dm;
     Application.Current.Dispatcher.Invoke(() =>
     {
         _notifier = new ItemsChangedNotifier(_dm.GetCurrentRace().GetResultViewProvider().GetView());
         _notifier.CollectionChanged += DataListChanged;
         _notifier.ItemChanged       += DataListItemChanged;
     });
 }
コード例 #7
0
        public DatabaseDelegatorCategories(AppDataModel dm, IAppDataModelDataBase db)
        {
            _dm = dm;
            _db = db;

            _notifierClasses = new ItemsChangedNotifier(_dm.GetParticipantCategories());

            _notifierClasses.ItemChanged       += OnItemChanged;
            _notifierClasses.CollectionChanged += OnCollectionChanged;
        }
コード例 #8
0
        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();
            }
        }