private void AddItem() { AddListBoxItemForm dlg = new AddListBoxItemForm(); DialogResult result = dlg.ShowDialog(this); if (result == DialogResult.OK) { string newItem = dlg.NewItem; listBox.Items.Add(newItem); } }
private void AddItem() { AddListBoxItemForm dlg = new AddListBoxItemForm(); DialogResult result = dlg.ShowDialog(this); if(result == DialogResult.OK) { string newItem = dlg.NewItem; listBox.Items.Add(newItem); } }