Example #1
0
        public void AddProject(string title, string description)
        {
            _project.Priority      = Priority;
            _project.Header        = Title;
            _project.Path          = $"Projects{Path.DirectorySeparatorChar}{Title}{Path.DirectorySeparatorChar}";
            _project.SubmitionDate = DateTime.Now;
            _project.DueDate       = DueDate;
            _project.Content       = Description;
            _project.AddPersons(AddedContributors.ToList());


            try
            {
                Directory.Move(_projectPath, $"{_allProjectPath}{_project.Header}");
                DataBase.InsertProject(_project);
            }
            catch
            {
                MessageBox.Show("Project directory already exist");
                return;
            }

            ProjectListViewModel lg = new ProjectListViewModel();
            var parentConductor     = (Conductor <object>)(this.Parent);

            parentConductor.ActivateItem(lg);
        }
Example #2
0
        public void BackToProjectList()
        {
            Directory.Delete(_projectPath, true);
            ProjectListViewModel lg = new ProjectListViewModel();
            var parentConductor     = (Conductor <object>)(this.Parent);

            parentConductor.ActivateItem(lg);
        }
Example #3
0
        public void BackToProjectList()
        {
            if (_editableComment != null)
            {
                ExpandCommentView(null);
                return;
            }
            ProjectListViewModel lg = new ProjectListViewModel();
            var parentConductor     = (Conductor <object>)(this.Parent);

            parentConductor.ActivateItem(lg);
        }