Пример #1
0
        public ScreenUpdater(ICradiatorView view, DiscJockey discJockey,
							 ICountdownTimer countdownTimer, IPollTimer pollTimer,
		                     BuildDataFetcher buildDataFetcher, BuildDataTransformer buildDataTransformer,
		                     FetchExceptionHandler fetchExceptionHandler, BackgroundWorker worker)
        {
            _view = view;
            _discJockey = discJockey;
            _countdownTimer = countdownTimer;
            _pollTimer = pollTimer;
            _pollTimer.Tick = (sender, e) => Update();
            _fetcher = buildDataFetcher;
            _fetchExceptionHandler = fetchExceptionHandler;
            _transformer = buildDataTransformer;

            _worker = worker;
            worker.RunWorkerCompleted += DataFetched;
            worker.DoWork += FetchData;
        }
Пример #2
0
        public ScreenUpdater(ICradiatorView view, DiscJockey discJockey, ICountdownTimer countdownTimer,
            IPollTimer pollTimer, IConfigSettings configSettings,
            BuildDataFetcher buildDataFetcher, BuildDataTransformer transformer,
            FetchExceptionHandler fetchExceptionHandler, BackgroundWorker worker)
        {
            _view = view;
            _discJockey = discJockey;
            _countdownTimer = countdownTimer;
            _pollTimer = pollTimer;
            _configSettings = configSettings;
            _pollTimer.Tick = (sender, e) => PollTimeup();
            _fetcher = buildDataFetcher;
            _fetchExceptionHandler = fetchExceptionHandler;
            _transformer = transformer;

            SetLocalValuesFromConfig(configSettings);

            _configSettings.AddObserver(this);

            _worker = worker;
            worker.DoWork += FetchData;
            worker.RunWorkerCompleted += DataFetched;
        }
Пример #3
0
        public ScreenUpdater(ICradiatorView view, DiscJockey discJockey, ICountdownTimer countdownTimer,
                             IPollTimer pollTimer, IConfigSettings configSettings,
                             BuildDataFetcher buildDataFetcher, BuildDataTransformer transformer,
                             FetchExceptionHandler fetchExceptionHandler, BackgroundWorker worker)
        {
            _view                  = view;
            _discJockey            = discJockey;
            _countdownTimer        = countdownTimer;
            _pollTimer             = pollTimer;
            _configSettings        = configSettings;
            _pollTimer.Tick        = (sender, e) => PollTimeup();
            _fetcher               = buildDataFetcher;
            _fetchExceptionHandler = fetchExceptionHandler;
            _transformer           = transformer;

            SetLocalValuesFromConfig(configSettings);

            _configSettings.AddObserver(this);

            _worker                    = worker;
            worker.DoWork             += FetchData;
            worker.RunWorkerCompleted += DataFetched;
        }