public Project(string projectName, string projectPath, User projectUser) { ProjectName = projectName; ProjectPath = projectPath; ProjectUser = projectUser; AllSyntheses = new List<Synthesis>(); LoadEdits(); }
public Form1() { InitializeComponent(); FFManager.FirstRunSetup("rap"); currentOpenSyntheses = new List<Synthesis>(); currentSynthesis = new Synthesis(); tabControl.Selecting += new TabControlCancelEventHandler(tabControl_Selecting); user = new User("rap","Richard Albert Peck","rap"); OpenLastOpenedProject(); }
public StartupInfo(User lastUser, ProjectInfo lastProject) { LastUser = lastUser; LastProject = lastProject; }
private void OpenProject(User user, ProjectInfo projectInfo) { this.user = user; this.Text = "SynType " + this.user.UserInitials + " loaded project: " + projectInfo.ProjectName; currentProject = new Project(projectInfo.ProjectName, projectInfo.ProjectPath, user); if (currentProject.AllSyntheses.Count == 0) { //IF there are no syntheses then we prompt the user to create a new one if (MessageBox.Show("The project is empty, would you like to create a new synthesis now?", "Create a new synthesis?", MessageBoxButtons.YesNo) == DialogResult.Yes) { InputDialog inputDialog = new InputDialog("Enter a name for the new synthesis"); if (inputDialog.ShowDialog() == DialogResult.OK) { while(string.IsNullOrEmpty(inputDialog.Input)) { if (inputDialog.ShowDialog() == DialogResult.Cancel) return; } Synthesis newSynth = new Synthesis(inputDialog.Input, currentProject.GetNewProjectID()); currentSynthesis = newSynth; currentProject.AllSyntheses.Add(currentSynthesis); //Save the synthesis FFManager.SaveSynFile(currentSynthesis, currentProject); } } } UpdateTreeView(); }