Пример #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();
        }