public static DialogResult ShowDlg(Form2Data oData) { Form2 oFrm = new Form2(); oFrm.SetData(oData); DialogResult nResult = oFrm.ShowDialog(); if (nResult == DialogResult.Ok) { oFrm.GetData(oData); } return(nResult); }
private void GetData(Form2Data oData) { // Read control values here }
private void SetData(Form2Data oData) { // Set control values here }