private void btnProject_Click(object sender, EventArgs e) { ListProjectsForm form = new ListProjectsForm(Project.AllProjects); form.OnSelect += new ListProjectHandler(form_OnSelect); form.OnDelete += new ListProjectHandler(form_OnDelete); form.OnRename += new ListProjectHandler(form_OnRename); form.ShowDialog(this); }
private void btnProject_Click(object sender, EventArgs e) { try { ListProjectsForm form = new ListProjectsForm(Project.GetAll()); form.OnSelect += new ListProjectHandler(form_OnSelect); form.OnDelete += new ListProjectHandler(form_OnDelete); form.OnRename += new ListProjectHandler(form_OnRename); form.ShowDialog(this); } catch (Exception ex) { MessageBox.Show(this, ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); } }