private void BtnAddInput_Click(object sender, EventArgs e) { FmVarInput fm = new FmVarInput(); fm.SelectValue += (obj) => { VarInput info = obj as VarInput; mDataGridInput.AddItem <VarInput>(info); }; fm.ShowDialog(); }
private void BtnEditInput_Click(object sender, EventArgs e) { if (mDataGridInput.CurrentRow == null) { return; } VarInput old = mDataGridInput.GetCurrentEntity() as VarInput; FmVarInput fm = new FmVarInput(old); fm.SelectValue += (obj) => { VarInput info = obj as VarInput; mDataGridInput.EditCurrentItem <VarInput>(info); }; fm.ShowDialog(); }