Beispiel #1
0
 public TaskListViewModel(
     ITasksModel tasksModel,
     ITaskListItemViewModelFactory taskListItemViewModelFactory,
     IActiveTaskController activeTaskController,
     ITimeBlockMediatorFactory timeBlockMediatorFactory,
     ISelectedItemCommandFactory<IStartTaskCommand> startTaskCommandFactory,
     ISelectedItemCommandFactory<IStopTaskCommand> stopTaskCommandFactory,
     ISelectedItemCommandFactory<IEditTaskCommand> editTaskCommandFactory,
     ISelectedItemCommandFactory<IMoveUpTaskCommand> moveUpTaskCommandFactory,
     ISelectedItemCommandFactory<IMoveDownTaskCommand> moveDownTaskCommandFactory,
     ISelectedItemCommandFactory<IDeleteTaskCommand> deleteTaskCommandFactory)
 {
     this.tasksModel = tasksModel;
     this.taskListItemViewModelFactory = taskListItemViewModelFactory;
     this.activeTaskController = activeTaskController;
     timeBlockMediator = timeBlockMediatorFactory.Create(activeTaskController);
     CreateCommands(
         startTaskCommandFactory,
         stopTaskCommandFactory,
         editTaskCommandFactory,
         moveUpTaskCommandFactory,
         moveDownTaskCommandFactory,
         deleteTaskCommandFactory);
     PopulateItems();
     SubscribeToTaskModelEvents();
     SubscribeToActiveTaskControllerEvents();
 }
Beispiel #2
0
 public TaskListViewModel(
     ITasksModel tasksModel,
     ITaskListItemViewModelFactory taskListItemViewModelFactory,
     IActiveTaskController activeTaskController,
     ITimeBlockMediatorFactory timeBlockMediatorFactory,
     ISelectedItemCommandFactory <IStartTaskCommand> startTaskCommandFactory,
     ISelectedItemCommandFactory <IStopTaskCommand> stopTaskCommandFactory,
     ISelectedItemCommandFactory <IEditTaskCommand> editTaskCommandFactory,
     ISelectedItemCommandFactory <IMoveUpTaskCommand> moveUpTaskCommandFactory,
     ISelectedItemCommandFactory <IMoveDownTaskCommand> moveDownTaskCommandFactory,
     ISelectedItemCommandFactory <IDeleteTaskCommand> deleteTaskCommandFactory)
 {
     this.tasksModel = tasksModel;
     this.taskListItemViewModelFactory = taskListItemViewModelFactory;
     this.activeTaskController         = activeTaskController;
     timeBlockMediator = timeBlockMediatorFactory.Create(activeTaskController);
     CreateCommands(
         startTaskCommandFactory,
         stopTaskCommandFactory,
         editTaskCommandFactory,
         moveUpTaskCommandFactory,
         moveDownTaskCommandFactory,
         deleteTaskCommandFactory);
     PopulateItems();
     SubscribeToTaskModelEvents();
     SubscribeToActiveTaskControllerEvents();
 }
Beispiel #3
0
 public ApplicationCaptionMediator(IMainViewModel mainViewModel, IActiveTaskController activeTaskController, ITasksModel tasksModel)
 {
     this.mainViewModel        = mainViewModel;
     this.activeTaskController = activeTaskController;
     this.tasksModel           = tasksModel;
     this.activeTaskController.ActiveTaskIdChanged += HandleActiveTaskIdChanged;
     CreateDefaultTitle();
 }
 public ApplicationCaptionMediator(IMainViewModel mainViewModel, IActiveTaskController activeTaskController, ITasksModel tasksModel)
 {
     this.mainViewModel = mainViewModel;
     this.activeTaskController = activeTaskController;
     this.tasksModel = tasksModel;
     this.activeTaskController.ActiveTaskIdChanged += HandleActiveTaskIdChanged;
     CreateDefaultTitle();
 }
Beispiel #5
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);
 }
Beispiel #6
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);
 }
Beispiel #7
0
 public MoveUpTaskCommand(ITaskListViewModel taskListViewModel, ITasksModel tasksModel)
     : base(taskListViewModel, tasksModel)
 {
 }
Beispiel #8
0
 public DeleteTaskCommand(ITaskListViewModel taskListViewModel, ITasksModel tasksModel)
     : base(taskListViewModel)
 {
     this.tasksModel = tasksModel;
 }
Beispiel #9
0
 public NewTaskViewModel(ITasksModel tasksModel, IGroupSelectorViewModel groupSelectorViewModel)
 {
     this.tasksModel        = tasksModel;
     GroupSelectorViewModel = groupSelectorViewModel;
     CreateTaskCommand      = new RelayCommand(CreateTaskExecute);
 }
Beispiel #10
0
 public NewTaskViewModel(ITasksModel tasksModel, IGroupSelectorViewModel groupSelectorViewModel)
 {
     this.tasksModel = tasksModel;
     GroupSelectorViewModel = groupSelectorViewModel;
     CreateTaskCommand = new RelayCommand(CreateTaskExecute);
 }
Beispiel #11
0
 public DeleteTaskCommand(ITaskListViewModel taskListViewModel, ITasksModel tasksModel)
     : base(taskListViewModel)
 {
     this.tasksModel = tasksModel;
 }
Beispiel #12
0
 public MoveUpTaskCommand(ITaskListViewModel taskListViewModel, ITasksModel tasksModel)
     : base(taskListViewModel, tasksModel)
 {
 }
Beispiel #13
0
 protected MoveTaskCommand(ITaskListViewModel taskListViewModel, ITasksModel tasksModel)
     : base(taskListViewModel)
 {
     TasksModel = tasksModel;
 }
Beispiel #14
0
 protected MoveTaskCommand(ITaskListViewModel taskListViewModel, ITasksModel tasksModel)
     : base(taskListViewModel)
 {
     TasksModel = tasksModel;
 }