Ejemplo n.º 1
0
        public void CheckLunchTime()
        {
            var config = UserConfigurationManager.Instance.GetConfiguration <LunchTimeConfig>(ConfigKey.LunchTime);

            if (config == null ||
                string.IsNullOrEmpty(config.StartHHmm) ||
                string.IsNullOrEmpty(config.EndHHmm))
            {
                return;
            }

            // 休憩開始
            var lunchPeriod = config.TimePeriod;

            if (lunchPeriod.WithinRangeAtCurrentTime &&
                _LunchTimeStartNotificated == false)
            {
                NotificationService.Current.ShowLunchStartInteractor();
                _LunchTimeStartNotificated = true;
            }
            // 仕事再開
            if (lunchPeriod.EndDateTime.Value < SystemClockServiceLocator.Current.Now &&
                _LunchTimeEndNotificated == false &&
                _LunchTimeStartNotificated)
            {
                var selectableTasks = PlanedTaskModels.Where(c => c.IsScheduled == false);
                NotificationService.Current.ShowTaskStarterInteractor(selectableTasks, "お昼休憩が終了しました" + Environment.NewLine + "再開するタスクを選択してください");
                _LunchTimeEndNotificated = true;
            }
        }
Ejemplo n.º 2
0
        public void Load()
        {
            var list = _GetWorkTaskWithTimesUseCase.GetByYmd(TargetYmd, ContainsCompleted.Value);

            PlanedTaskModels.Clear();
            PlanedTaskModels.AddRange(list);

            LoadWorkingTime();
        }