예제 #1
0
        private void EditProjectSettings(ProjectInfo projectInfo)
        {
            ProjectPropertiesForm form = new ProjectPropertiesForm();

            form.EnableSelectLocation = false;
            form.ProjectName          = projectInfo.Name;
            form.ProjectFileName      = projectInfo.FileName;
            form.ProjectDescription   = projectInfo.Description;
            if (form.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }
            projectInfo.Name        = form.ProjectName;
            projectInfo.Description = form.ProjectDescription;
            SettingsStore.Default.SaveToXml();
            MainForm.LibraryControl.UpdateFormCaption();
            UpdateTileItem(projectInfo);
        }
예제 #2
0
        public static ProjectInfo CreateNewProjectCore(IWin32Window owner)
        {
            ProjectPropertiesForm form = new ProjectPropertiesForm();

            if (form.ShowDialog(owner) != DialogResult.OK)
            {
                return(null);
            }
            ProjectInfo info = SettingsStore.Default.GetProject(form.ProjectFileName);

            if (info != null)
            {
                SettingsStore.Default.Projects.Remove(info);
            }
            info             = new ProjectInfo();
            info.Name        = form.ProjectName;
            info.FileName    = form.ProjectFileName;
            info.Description = form.ProjectDescription;

            return(info);
        }