public TriviaBotService(IChatService chatService, IScoreKeeperService scoreKeeper, ILifetimeScorekeeper lifetimeScoreService, IQuestionSetManager questionSetManager)
        {
            _chatService          = chatService;
            _questionSetManager   = questionSetManager;
            _scoreKeeper          = scoreKeeper;
            _lifetimeScoreService = lifetimeScoreService;

            hasAnsweredCurrentQuestion = new Dictionary <ulong, bool>();
            hasVotedToSkip             = new Dictionary <ulong, ulong>();

            // The timer which represents how often to send messages
            messageSendTimer = new Timer
            {
                AutoReset = true,
                Enabled   = true,
                Interval  = 500
            };
            messageSendTimer.Elapsed += MessageTimer_Elapsed;
            // A queue which holds our to-be-sent messages
            messageSendingQueue = new Queue <string>();

            _questionTimer           = new Timer();
            _questionTimer.AutoReset = false;
            _questionTimer.Enabled   = false;
            _questionTimer.Elapsed  += QuestionTimer_Elapsed;
            _questionTimer.Interval  = questionTimerLength * 1000;
        }
示例#2
0
 public VideoModule(
     IScoreKeeperService scoreKeeperService,
     IStopWatchService stopWatchService)
 {
     this.scoreKeeperService = scoreKeeperService;
     this.stopWatchService = stopWatchService;
     this.pipeCommandService = null;
 }
示例#3
0
 public VideoModule(
     IScoreKeeperService scoreKeeperService,
     IStopWatchService stopWatchService)
 {
     this.scoreKeeperService = scoreKeeperService;
     this.stopWatchService   = stopWatchService;
     this.pipeCommandService = null;
 }
示例#4
0
 public NetworkModule(
     IAppConfigService appConfigService,
     IScoreKeeperService scoreKeeperService,
     IStopWatchService stopWatchService,
     ReceiverEvents.ButtonPressed receiverButtonPressed)
 {
     this.appConfigService      = appConfigService;
     this.scoreKeeperService    = scoreKeeperService;
     this.stopWatchService      = stopWatchService;
     this.receiverButtonPressed = receiverButtonPressed;
 }
示例#5
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 MeterCollectionViewModel(CompositionContainer container, IScoreKeeperService scoreKeeperService)
        {
            this.Meters             = new DispatchingObservableCollection <MeterView>();
            this.container          = container;
            this.scoreKeeperService = scoreKeeperService;
            this.scoreKeeperService.Competitors.CollectionChanged += Competitors_CollectionChanged;

            foreach (CompetitorModel item in this.scoreKeeperService.Competitors)
            {
                this.Meters.Add(GetMeterView(item));
            }
        }
        public MeterCollectionViewModel(CompositionContainer container, IScoreKeeperService scoreKeeperService)
        {
            this.Meters = new DispatchingObservableCollection<MeterView>();
            this.container = container;
            this.scoreKeeperService = scoreKeeperService;
            this.scoreKeeperService.Competitors.CollectionChanged += Competitors_CollectionChanged;

            foreach (CompetitorModel item in this.scoreKeeperService.Competitors)
            {
                this.Meters.Add(GetMeterView(item));
            }
        }
        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();
        }
示例#9
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();
        }
示例#10
0
        public TriviaManagerService(IQuestionSetManager questionSetManager, IScoreKeeperService scoreKeeper)
        {
            this.questionSetManager = questionSetManager;
            this.scoreKeeper        = scoreKeeper;

            hasAnsweredCurrentQuestion = new Dictionary <ulong, bool>();
            hasVotedToSkip             = new Dictionary <ulong, ulong>();
            questionTimer           = new Timer();
            questionTimer.AutoReset = false;
            questionTimer.Enabled   = false;
            questionTimer.Elapsed  += QuestionTimer_Elapsed;
            questionTimer.Interval  = questionTimerLength * 1000;
        }
        /// <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);
        }
示例#12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MeterGraphPresenter"/> class.
 /// </summary>
 /// <param name="eventAggregator">The event aggregator.</param>
 /// <param name="logger">The logger.</param>
 public PopupGraphViewModel(IEventAggregator eventAggregator, ILoggerFacade logger, IScoreKeeperService scoreKeeperService) : base(eventAggregator, logger)
 {
     this.ScoreKeeperService = scoreKeeperService;
     this.CloseCommand       = new DelegateCommand <object>(new Action <object>(o => OnRequestRemoval()));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MeterGraphPresenter"/> class.
 /// </summary>
 /// <param name="eventAggregator">The event aggregator.</param>
 /// <param name="logger">The logger.</param>
 public PopupGraphViewModel(IEventAggregator eventAggregator, ILoggerFacade logger, IScoreKeeperService scoreKeeperService) : base(eventAggregator, logger)
 {
     this.ScoreKeeperService = scoreKeeperService;
     this.CloseCommand = new DelegateCommand<object>(new Action<object>(o => OnRequestRemoval() ));
 }
 public EventScreenViewModel(IScoreKeeperService scoreService)
 {
     this.ScoreKeeperService = scoreService;
 }
 public ConfigGameViewModel(IEventAggregator eventAggregator, ILoggerFacade logger, IScoreKeeperService scoreService)
 {
     this.ScoreKeeper = scoreService;
     logger.Log("ConfigGameNumberViewModel Initialized", Category.Debug, Priority.None);
 }
 public ConfigGameViewModel(IEventAggregator eventAggregator, ILoggerFacade logger, IScoreKeeperService scoreService)
 {
     this.ScoreKeeper = scoreService;
     logger.Log("ConfigGameNumberViewModel Initialized", Category.Debug, Priority.None);
 }
 public EventScreenViewModel(IScoreKeeperService scoreService)
 {
     this.ScoreKeeperService = scoreService;
 }