Beispiel #1
0
 public VideoModule(
     IScoreKeeperService scoreKeeperService,
     IStopWatchService stopWatchService)
 {
     this.scoreKeeperService = scoreKeeperService;
     this.stopWatchService   = stopWatchService;
     this.pipeCommandService = null;
 }
 public VideoModule(
     IScoreKeeperService scoreKeeperService,
     IStopWatchService stopWatchService)
 {
     this.scoreKeeperService = scoreKeeperService;
     this.stopWatchService = stopWatchService;
     this.pipeCommandService = null;
 }
Beispiel #3
0
 public NetworkModule(
     IAppConfigService appConfigService,
     IScoreKeeperService scoreKeeperService,
     IStopWatchService stopWatchService,
     ReceiverEvents.ButtonPressed receiverButtonPressed)
 {
     this.appConfigService      = appConfigService;
     this.scoreKeeperService    = scoreKeeperService;
     this.stopWatchService      = stopWatchService;
     this.receiverButtonPressed = receiverButtonPressed;
 }
 public NetworkModule(
     IAppConfigService appConfigService,
     IScoreKeeperService scoreKeeperService,
     IStopWatchService stopWatchService,
     ReceiverEvents.ButtonPressed receiverButtonPressed)
 {
     this.appConfigService = appConfigService;
     this.scoreKeeperService = scoreKeeperService;
     this.stopWatchService = stopWatchService;
     this.receiverButtonPressed = receiverButtonPressed;
 }
Beispiel #5
0
        public MultiMediaModule(
            IAppConfigService appConfigService,
            IScoreKeeperService scoreKeeperService,
            IStopWatchService stopWatchService)
        {
            this.appConfigService   = appConfigService;
            this.scoreKeeperService = scoreKeeperService;
            this.stopWatchService   = stopWatchService;

            this.soundEffectsService = new SoundEffectsService();
            this.speachService       = new SpeechService();
        }
        public MultiMediaModule(
            IAppConfigService appConfigService,
            IScoreKeeperService scoreKeeperService,
            IStopWatchService stopWatchService)
        {
            this.appConfigService = appConfigService;
            this.scoreKeeperService = scoreKeeperService;
            this.stopWatchService = stopWatchService;

            this.soundEffectsService = new SoundEffectsService();
            this.speachService = new SpeechService();
        }
Beispiel #7
0
 public ClockViewModel(IStopWatchService stopwatchService)
 {
     this.StopWatchService = stopwatchService;
     this.StopWatchService.OnChanged(o => o.DisplayTime).Do(delegate
     {
         RaisePropertyChanged(() => this.ClockTime);
     });
     this.StopWatchService.OnChanged(o => o.IsRunning).Do(delegate
     {
         RaisePropertyChanged(() => this.IsRunning);
         RaisePropertyChanged(() => this.IsEditable);
     });
 }
 public ClockViewModel(IStopWatchService stopwatchService)
 {
     this.StopWatchService = stopwatchService;
     this.StopWatchService.OnChanged(o => o.DisplayTime).Do(delegate 
     {
         RaisePropertyChanged(() => this.ClockTime); 
     });
     this.StopWatchService.OnChanged(o => o.IsRunning).Do(delegate 
     {
         RaisePropertyChanged(() => this.IsRunning);
         RaisePropertyChanged(() => this.IsEditable);
     });
 }
        /// <summary>
        /// Called when [stop watch state changed].
        /// </summary>
        /// <param name="stopWatchService">The stop watch service.</param>
        protected void OnStopWatchStateChanged(IStopWatchService stopWatchService)
        {
            //foreach (ToolBarItemModel toolbarItem in this.RegionManager.Regions[TOOLBARREGION].ActiveViews)
            //{
            //    ((DelegateCommand<object>)toolbarItem.Command).RaiseCanExecuteChanged();
            //}

            // Check for end of countdown
            if (!stopWatchService.IsRunning && stopWatchService.DisplayTime == TimeSpan.Zero)
            {
                //this.ScoreKeeperService.IncrementRound();
            }
        }
Beispiel #10
0
 public TcpPingDriver(
     IDns dns = null,
     ISocketService socketService       = null,
     IStopWatchService stopWatchService = null,
     IWaiter waiter          = null,
     TextWriter outputWriter = null,
     TimeSpan retryInterval  = default(TimeSpan),
     TimeSpan timeOutLimit   = default(TimeSpan),
     int retryTimes          = 4)
 {
     Dns              = dns ?? new SystemDns();
     SocketService    = socketService ?? new SystemSocketService();
     StopWatchService = stopWatchService ?? new SystemStopWatchService();
     Waiter           = waiter ?? new Waiter();
     OutputWriter     = outputWriter ?? Console.Out;
     RetryInterval    = retryInterval != default(TimeSpan) ? retryInterval : TimeSpan.FromSeconds(1);
     TimeOutLimit     = timeOutLimit != default(TimeSpan) ? timeOutLimit : TimeSpan.FromSeconds(2);
     RetryTimes       = retryTimes;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="ReceiverService"/> class.
        /// </summary>
        /// <param name="eventAggregator">The event aggregator.</param>
        public GameDataLoggerService(
            IEventAggregator eventAggregator,
            ILoggerFacade logger,
            IStopWatchService stopWatchService,
            IScoreKeeperService scoreKeeperService)
        {
            this.EventAggregator    = eventAggregator;
            this.Logger             = logger;
            this.ScoreKeeperService = scoreKeeperService;
            this.StopWatchService   = stopWatchService;

            RegisterHandlers();
            LoadDataSet();
            if (GameDataLog.Impacts.Count > 0)
            {
                this.ScoreKeeperService.GameNumber = (byte)(this.GameDataLog.Impacts.Max(row => row.GameNumber) + 1);
            }

            DataWriterTimer.AutoReset = false;
            DataWriterTimer.Elapsed  += (s, e) => WriteDatabaseToDisk();

            logger.Log("GameDataLoggerService initialized", Category.Debug, Priority.None);
        }
        /// <summary>
        /// Called when [stop watch state changed].
        /// </summary>
        /// <param name="stopWatchService">The stop watch service.</param>
        protected void OnStopWatchStateChanged(IStopWatchService stopWatchService)
        {
            //foreach (ToolBarItemModel toolbarItem in this.RegionManager.Regions[TOOLBARREGION].ActiveViews)
            //{
            //    ((DelegateCommand<object>)toolbarItem.Command).RaiseCanExecuteChanged();
            //}

            // Check for end of countdown
            if (!stopWatchService.IsRunning && stopWatchService.DisplayTime == TimeSpan.Zero)
            {
                //this.ScoreKeeperService.IncrementRound();
            }
        }