private void butCreateProject_Click(object sender, EventArgs e) { if (!String.IsNullOrEmpty(labPathFile.Text) && !String.IsNullOrEmpty(tbProjectName.Text)) { var project = new SlynchyProject(tbProjectName.Text); ProjectFile = tbFileName.Text + ".slynchy"; ProjectPathFile = labPathFile.Text; ProjectName = tbProjectName.Text; SlynchyProjectFiles.SaveProject(project, ProjectFile); this.Close(); } }
private void cbProject_SelectedIndexChanged(object sender, System.EventArgs e) { //This will always be an existing project on the list, populate associated fields SlynchyProjectFiles.SaveProject(SlynchyTrack.Project, SlynchyTrack.ProjectFileName); if (!String.IsNullOrEmpty(cbProject.Text)) { SlynchyProjectFiles.LoadProject(cbProject.Text); CurrProject = cbProject.Text; Project = SlynchyTrack.Project; SetProjectFields(); } }
private void butAddTree_Click(object sender, EventArgs e) { if (!String.IsNullOrEmpty(tbAddTreeName.Text) && !String.IsNullOrEmpty(tbAddTreeRootDirectory.Text) && !IsInTreeNameList(tbAddTreeName.Text) && !IsInTreeDirList(tbAddTreeRootDirectory.Text)) { var newTree = new SlynchyDirectoryTree(tbAddTreeName.Text, tbAddTreeRootDirectory.Text); var CurrentComparison = SlynchyTrack.Project.FindComparison(cboSelectComparison.Text); CurrentComparison.Directories.Add(newTree); LoadDirTrees(); tbAddTreeName.Text = ""; tbAddTreeRootDirectory.Text = ""; SlynchyProjectFiles.SaveProject(SlynchyTrack.Project, SlynchyTrack.ProjectFileName); Application.DoEvents(); } }
private void SaveProject() { SlynchyProjectFiles.SaveProject(SlynchyTrack.Project, SlynchyTrack.ProjectFileName); }