Esempio n. 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;
        }
Esempio n. 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;
        }
Esempio n. 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;
        }
Esempio n. 4
0
 public PollIntervalChangeHandler(IPollTimer pollTimer, ICountdownTimer countTimer)
 {
     _pollTimer      = pollTimer;
     _countdownTimer = countTimer;
 }
 public PollIntervalChangeHandler(IPollTimer pollTimer, ICountdownTimer countTimer)
 {
     _pollTimer = pollTimer;
     _countdownTimer = countTimer;
 }
 public void SetUp()
 {
     _pollTimer = MockRepository.GenerateMock <IPollTimer>();
 }
 public void SetUp()
 {
     _pollTimer = Create.Mock <IPollTimer>();
     _countdownChangeHandler = Create.Mock <ICountdownTimer>();
     _pollingChangeHandler   = new PollIntervalChangeHandler(_pollTimer, _countdownChangeHandler);
 }
Esempio n. 8
0
 public void SetUp()
 {
     _pollTimer = MockRepository.GenerateMock<IPollTimer>();
 }
 public void SetUp()
 {
     _pollTimer = MockRepository.GenerateMock<IPollTimer>();
     _countdownChangeHandler = MockRepository.GenerateMock<ICountdownTimer>();
     _pollingChangeHandler = new PollIntervalChangeHandler(_pollTimer, _countdownChangeHandler);
 }
 public void SetUp()
 {
     _pollTimer = Create.Mock<IPollTimer>();
     _countdownChangeHandler = Create.Mock<ICountdownTimer>();
     _pollingChangeHandler = new PollIntervalChangeHandler(_pollTimer, _countdownChangeHandler);
 }