private void btnCadCliente_Click(object sender, EventArgs e) { selecionarFormatoDeSerializacao(); frmCadCliente frmcadcliente = new frmCadCliente(formato); frmcadcliente.ShowDialog(); }
void abrirFormularioCadastroOrcamento(string codigo = null) { frmCadCliente frmCadCliente = new frmCadCliente(codigo); if ((Application.OpenForms["frmCadCliente"] as frmCadCliente) != null) { frmCadCliente.BringToFront(); frmCadCliente.Focus(); } else { frmCadCliente.MdiParent = this.MdiParent; frmCadCliente.Show(); } }