bool LoadProcesso() { //NFe.UI.uninfeDummy.showError = false; try { UserControl1 control = null; switch (opcao) { case uninfeOpcoes.opCadastro: this.Controls.Add(control = new userCadastro()); break; case uninfeOpcoes.opConfiguracoes: this.Controls.Add(control = new userConfiguracoes()); break; case uninfeOpcoes.opLogs: this.Controls.Add(control = new userLogs()); break; case uninfeOpcoes.opServicos: this.Controls.Add(control = new userPedidoSituacao()); break; case uninfeOpcoes.opSobre: this.Size = new Size(800, 600); this.Controls.Add(control = new userSobre()); break; case uninfeOpcoes.opValidarXML: this.Controls.Add(control = new userValidaXML()); break; case uninfeOpcoes.opMunicipios: this.Controls.Add(control = new Formularios.userMunicipios()); break; } if (control != null) { control.Dock = DockStyle.Fill; control.back_button.Click += delegate { this.Close(); }; control.UpdateControles(); this.Invalidate(); return(true); } return(false); } catch (Exception ex) { MetroFramework.MetroMessageBox.Show(this, ex.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } }
bool LoadProcesso() { //NFe.UI.uninfeDummy.showError = false; try { UserControl1 control = null; switch (opcao) { case uninfeOpcoes.opCadastro: this.Controls.Add(control = new userCadastro()); break; case uninfeOpcoes.opConfiguracoes: this.Controls.Add(control = new userConfiguracoes()); break; case uninfeOpcoes.opLogs: this.Controls.Add(control = new userLogs()); break; case uninfeOpcoes.opServicos: this.Controls.Add(control = new userPedidoSituacao()); break; case uninfeOpcoes.opSobre: this.Size = new Size(800, 600); this.Controls.Add(control = new userSobre()); break; case uninfeOpcoes.opValidarXML: this.Controls.Add(control = new userValidaXML()); break; case uninfeOpcoes.opMunicipios: this.Controls.Add(control = new Formularios.userMunicipios()); break; } if (control != null) { control.Dock = DockStyle.Fill; control.back_button.Click += delegate { this.Close(); }; control.UpdateControles(); this.Invalidate(); return true; } return false; } catch (Exception ex) { MetroFramework.MetroMessageBox.Show(this, ex.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; } }