Ejemplo n.º 1
0
        private void DoTimerAction(IEnumerable <ITimerViewModel> viewModels)
        {
            bool refreshView = false;

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

                IsDirty = false;
            }

            if (IsCurrentDayDirty)
            {
                refreshView = true;

                CurrentDay = dayDataService.GetCurrentDay();

                IsCurrentDayDirty = false;
            }

            foreach (ITimerViewModel timerViewModel in viewModels)
            {
                timerViewModel.DoTimerAction(refreshView);
            }
        }
Ejemplo n.º 2
0
        public MainViewModel()
        {
            instance = this;

            dayDataService = new DayDataService();

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

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

            InitializeTimer();
        }