private void btnOK_Click(object sender, EventArgs e) { pnlBottom.Controls.Clear(); FormMoney f = new FormMoney { TopLevel = false, FormBorderStyle = FormBorderStyle.None }; pnlBottom.Controls.Add(f); f.Show(); }
private void ShowForm(FieldType fieldType) { switch (fieldType) { case FieldType.Date: var formDate = new FormDate(); formDate.ShowDialogDate(entityDesigner); break; case FieldType.Bool: var formBool = new FormBool(); formBool.ShowDialogBool(entityDesigner); break; case FieldType.Number: case FieldType.Money: var formMoney = new FormMoney(); formMoney.MaxValue = entityDesigner.MaxValue; formMoney.ShowDialogMoney(entityDesigner); break; case FieldType.String: var formString = new FormString(); formString.ShowDialogString(entityDesigner); break; case FieldType.None: break; case FieldType.Constraint: break; default: break; } }