Ejemplo n.º 1
0
        /// <summary>
        /// Launches the delete project window.
        /// </summary>
        public void DeleteProject()
        {
            ProjectViewModel selectedProjectVM = ChildProjects.FirstOrDefault(p => p.IsSelected == true);

            if (selectedProjectVM != null && WPFMessageBox.Show(Properties.Resources.Delete_Confirm, Properties.Resources.Projects_Delete_Confirm, WPFMessageBoxButtons.YesNo, WPFMessageBoxImage.Question) == WPFMessageBoxResult.Yes)
            {
                _projectData.DeleteProject(_projectData.GetProjectByProjectId(selectedProjectVM.ProjectId), _taskData);
                selectedProjectVM.Dispose();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Launches the edit project window.
        /// </summary>
        public void EditProject()
        {
            ProjectView window = new ProjectView();

            ProjectViewModel selectedProjectVM = ChildProjects.FirstOrDefault(p => p.IsSelected == true);

            using (var viewModel = new ProjectViewModel(_projectData.GetProjectByProjectId(selectedProjectVM.ProjectId), _projectData, _taskData))
            {
                this.ShowWorkspaceAsDialog(window, viewModel);
            }
        }