Esempio n. 1
0
 public EditTaskViewModel(
     Guid taskId,
     ITasksModel tasksModel,
     IEditTimeBlocksViewModelFactory editTimeBlocksViewModelFactory,
     IGroupSelectorViewModel groupSelectorViewModel)
 {
     GroupSelectorViewModel = groupSelectorViewModel;
     this.tasksModel = tasksModel;
     task = tasksModel.Get(taskId);
     groupSelectorViewModel.SelectedGroupId = task.GroupId;
     UpdateTaskCommand = new RelayCommand(UpdateTaskExecute);
     EditTimeBlocksViewModel = editTimeBlocksViewModelFactory.Create(taskId);
 }
Esempio n. 2
0
 public TaskListItemViewModel(
     Task task,
     ITaskListViewModel taskListViewModel,
     IGroupsModel groupsModel,
     ITotalTimeSummerFactory totalTimeSummerFactory,
     ITodayTimeSummerFactory todayTimeSummerFactory)
 {
     this.taskListViewModel = taskListViewModel;
     this.groupsModel = groupsModel;
     Update(task);
     totalTimeSummer = totalTimeSummerFactory.Create(this);
     todayTimeSummer = todayTimeSummerFactory.Create(this);
     // Execute so the sums show up on the GUI immediately
     totalTimeSummer.Execute();
     todayTimeSummer.Execute();
 }
Esempio n. 3
0
 ITaskListItemViewModel CreateItemViewModel(Task task)
 {
     return taskListItemViewModelFactory.Create(task, this);
 }
Esempio n. 4
0
 public void Update(Task task)
 {
     this.task = task;
     RaisePropertyChanged(() => Header);
     RaisePropertyChanged(() => Id);
     RaisePropertyChanged(() => Index);
     RaisePropertyChanged(() => TodayTime);
     RaisePropertyChanged(() => TotalTime);
     Group = groupsModel.GetGroupName(task.GroupId);
 }
 public void Update(Task task)
 {
     throw new NotImplementedException();
 }