コード例 #1
0
        private void DoTimerAction(IEnumerable <ITimerViewModel> viewModels)
        {
            bool refreshView = false;

            if (this.IsDirty)
            {
                this.WeekDays = this.dayDataService.GetCurrentWeekDays();

                this.IsDirty = false;
            }

            if (this.IsCurrentDayDirty)
            {
                refreshView = true;

                this.CurrentDay = dayDataService.GetCurrentDay();

                this.IsCurrentDayDirty = false;
            }

            foreach (ITimerViewModel timerViewModel in viewModels)
            {
                timerViewModel.DoTimerAction(refreshView);
            }
        }
コード例 #2
0
        public MainViewModel()
        {
            instance = this;

            this.dayDataService = new DayDataService();

            this.CurrentDay = dayDataService.GetCurrentDay();
            this.WeekDays   = this.dayDataService.GetCurrentWeekDays();

            this.Fichada = new FichadaViewModel();
            this.Semana  = new SemanaViewModel();

            this.InitializeTimer();
        }
コード例 #3
0
        public MainViewModel()
        {
            instance = this;

            dayDataService = new DayDataService();

            CurrentDay = dayDataService.GetCurrentDay();
            WeekDays   = dayDataService.GetCurrentWeekDays();

            Fichada = new FichadaViewModel();
            Semana  = new SemanaViewModel();

            InitializeTimer();
        }