public static FrmEmpresa Instance() { if (frmInstance == null || frmInstance.IsDisposed == true) { frmInstance = new FrmEmpresa(); } frmInstance.BringToFront(); return(frmInstance); }
private void btnEmpresa_Click(object sender, EventArgs e) { try { var frmEmpresa = FrmEmpresa.Instance(); frmEmpresa.StartPosition = FormStartPosition.CenterScreen; frmEmpresa.Show(); } catch (Exception ex) { General.ErrorMessage(ex.Message); } }