private void bEdit_Click(object sender, EventArgs e) { AddEnt newForm = new AddEnt(actionType, lbEnt.SelectedItem as Ent); newForm.Owner = this; newForm.FormClosed += NewForm_FormClosed; newForm.ShowDialog(); }
private void bAdd_Click(object sender, EventArgs e) { AddEnt newForm = new AddEnt(actionType); newForm.Owner = this; newForm.FormClosed += NewForm_FormClosed; newForm.ShowDialog(); }
private void bEdit_Click(object sender, EventArgs e) { if (lbEnt.SelectedItem != null) { AddEnt newForm = new AddEnt(ent, lbEnt.SelectedItem as Ent); initNewEnt(newForm); } }
private void initNewEnt(AddEnt newForm) { ent.Name = tb.Text; newForm.FormClosed += NewForm_FormClosed; newForm.Text = "AddEnt to " + ent.Name; newForm.Owner = this; newForm.ShowDialog(); }
private void bAdd_Click(object sender, EventArgs e) { AddEnt newForm = new AddEnt(ent); initNewEnt(newForm); }