Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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();
        }