Example #1
0
 void Perfil()
 {
     try
     {
         LimparForms();
         Panel_Carregando.Visible = true;
         Panel_Carregando.Refresh();
         this.Panel_Usuario.Visible  = false;
         this.Panel_Materias.Visible = false;
         this.Refresh();
         Panel_Materias.Refresh();
         Panel_Usuario.Refresh();
         Form frm = new Form_Perfil();
         frm.MdiParent = this;
         frm.Show();
         Panel_Carregando.Visible = false;
     }
     catch
     {
         MessageBox.Show("Erro de Conexão, tente novamente", "Enigma", MessageBoxButtons.OK, MessageBoxIcon.Error);
         Form frm = new Form_Home();
         frm.MdiParent = this;
         frm.Show();
         Program.PanelCarregando.Visible = false;
     }
 }
Example #2
0
 private void Grid_Materias_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (Grid_Materias.RowCount > 0)
     {
         try
         {
             LimparForms();
             Panel_Carregando.Visible = true;
             Panel_Carregando.Refresh();
             this.Panel_Usuario.Visible  = false;
             this.Panel_Materias.Visible = false;
             this.Refresh();
             MateriaDAL dal  = new MateriaDAL();
             Form       form = new Form_Conteudo(dal.Consultar(Grid_Materias.CurrentRow.Cells[0].Value.ToString()));
             form.MdiParent = this;
             form.Show();
             Panel_Carregando.Visible = false;
         }
         catch (Exception)
         {
             MessageBox.Show("Erro de Conexão, tente novamente", "Enigma", MessageBoxButtons.OK, MessageBoxIcon.Error);
             Program.PanelCarregando.Visible = false;
             Form frm = new Form_Home();
             frm.MdiParent = this;
             frm.Show();
         }
     }
 }
Example #3
0
 void ShowHome()
 {
     LimparForms();
     Panel_Carregando.Visible = true;
     Panel_Carregando.Refresh();
     this.Panel_Usuario.Visible  = false;
     this.Panel_Materias.Visible = false;
     this.Refresh();
     Panel_Carregando.Visible = false;
 }