示例#1
0
        private TimerController GetControllerMock(ITimerController itcon)
        {
            var tcon = Substitute.For <TimerController>();

            tcon.SetTimerController(itcon);
            return(tcon);
        }
示例#2
0
 public GameHandler(ICardController cardController, IDatabase database, PokerTable pokerTable)
 {
     this.database        = database;
     this.cardController  = cardController;
     this.dealHandler     = new DealHandler(this.Database);
     this.betHandler      = new BetHandler(this.Database);
     this.pokerTable      = pokerTable;
     this.timerController = new TimerController(this.Database.Players[0]);
 }
示例#3
0
 public TimerTaskController(ITimeService timeService,
                            ITimerController timerController,
                            IApplicationController applicationController)
 {
     this.timeService                   = timeService;
     this.timerController               = timerController;
     this.applicationController         = applicationController;
     applicationController.Initialized += ApplicationController_Initialized;
     timerController.OnTick            += TimerController_OnTick;
 }
示例#4
0
        protected override void OnScopedSet(ILifetimeScope scope)
        {
            timerController     = scope.Resolve <ITimerController>();
            timerTaskController = scope.Resolve <ITimerTaskController>();
            workTimerController = scope.Resolve <IWorkTimerController>();
            events = scope.Resolve <WorkTimerEvents>();

            timerController.OnTick       += TimerController_OnTick;
            timerController.StateChanged += TimerController_StateChanged;
            events.OnWorkStarted         += Events_OnWorkStarted;
        }
示例#5
0
        public StopwatchViewModel(ITimerController timerController)
        {
            this.TimerController = timerController;
            this.TimerController.UpdateDataAction = this.PrintTime;

            TimerController.Reset();

            StartCommand = new RelayCommand(new Action(Start));
            StopCommand  = new RelayCommand(new Action(Stop));
            ResetCommand = new RelayCommand(new Action(Reset));
        }
示例#6
0
 public Notifier(TimerSettings settings, ITimerController timerController, GameScenesManager gameScenesManager)
 {
     _settings          = settings;
     _timerController   = timerController;
     _gameScenesManager = gameScenesManager;
 }
示例#7
0
 private void Start()
 {
     timerController = FindObjectOfType <TimerController>();
 }
示例#8
0
 [SetUp] public void Init()
 {
     this.itcon = GetEffectMock();
     this.tcon  = GetControllerMock(itcon);
 }
示例#9
0
 public void SetTimerController(ITimerController itcon)
 {
     this.itcon = itcon;
 }