コード例 #1
0
 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();
     }
 }
コード例 #2
0
 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();
     }
 }
コード例 #3
0
ファイル: EditComparisons.cs プロジェクト: waltal/FileSlynchy
        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();
            }
        }
コード例 #4
0
 private void SaveProject()
 {
     SlynchyProjectFiles.SaveProject(SlynchyTrack.Project, SlynchyTrack.ProjectFileName);
 }