private void AddItemDialog(MeshType type) { using (AddItemWithStepsDialog dlg = new AddItemWithStepsDialog()) { if (dlg.ShowDialog() == DialogResult.OK) { AddItem(type, dlg.Steps); } } }