private static TaskViewModel GetTaskViewModel() { TaskTypeSelectorViewModel selectorViewModel = new TaskTypeSelectorViewModel(); MainWindowViewModel.ViewLoader.ShowDialog(selectorViewModel); if (selectorViewModel.UserHitCancel == true) { return(null); } TaskViewModel taskViewModel = ViewModelUtility.GetViewModel(selectorViewModel.SelectedTaskType); return(taskViewModel); }
private void EditTask() { TaskViewModel taskViewModel = ViewModelUtility.GetViewModel(this.SelectedTasks[0].PrestoTaskType, this.SelectedTasks[0]); if (taskViewModel == null) { return; } MainWindowViewModel.ViewLoader.ShowDialog(taskViewModel); if (taskViewModel.UserCanceled) { return; } SaveApplication(); }