private void ModifyFactor() { if (uMLFactorCollectionDataGridView.SelectedRows.Count == 1) { FactorEdit factorEdit = new FactorEdit((UMLFactor)uMLFactorCollectionDataGridView.SelectedRows[0].DataBoundItem); factorEdit.ShowDialog(); } }
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { FactorEdit factorEdit = new FactorEdit(null); DialogResult result = factorEdit.ShowDialog(); if (result == DialogResult.OK) { _factors.Add(factorEdit.Factor); uMLFactorCollectionBindingSource.ResetBindings(false); } }