private void lb_Model_MouseDoubleClick(object sender, MouseEventArgs e) { TemplateModel pm = TemplateModel.Create(); if (dtModels.Rows.Count > 0) { pm = cb_Model.SelectedValue as TemplateModel; } new Fm_AddNewModel(pm).ShowDialog(); }