private void btNewProject_Click(object sender, EventArgs e) { var project = new Project(); project.title = "New Project"; project.baseDir = options.htdocsPath; project.publicDir = options.htdocsPath; var form = new FormProject(project); if (form.ShowDialog() == DialogResult.OK) { projects.add(project); saveAndReload(); } }
private void lbProjects_DoubleClick(object sender, EventArgs e) { int selIndex = lbProjects.SelectedIndex; if (selIndex > -1) { var project = (Project) lbProjects.Items[selIndex]; var form = new FormProject(project); form.ShowDialog(); saveAndReload(); } }