private void button2_Click(object sender, EventArgs e) { openFileDialog1.FileName = ""; openFileDialog1.ShowDialog(); if (openFileDialog1.FileName == "") { return; } if (ProjectFolder.ReadProjectFile(openFileDialog1.FileName)) { this.Visible = false; var projectForm = new ProjectForm(); ProjectFolder.rootDir = Path.GetDirectoryName(openFileDialog1.FileName); initalizationData.lastOpenedProjectFile = openFileDialog1.FileName; SaveLastOpened(); LoadLastOpened(); projectForm.ShowDialog(); this.Visible = true; } }
private void button3_Click(object sender, EventArgs e) { string projectFile = initalizationData.lastOpenedProjectFile; if (ProjectFolder.ReadProjectFile(projectFile)) { this.Visible = false; var projectForm = new ProjectForm(); ProjectFolder.rootDir = Path.GetDirectoryName(projectFile); projectForm.ShowDialog(); this.Visible = true; } }