示例#1
0
        private void abrirTelaInicial()
        {
            telaInicial objTela = new telaInicial();

            objTela.MdiParent = telaFundo.ActiveForm;
            objTela.Show();
        }
示例#2
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     try
     {
         if (txtUsuario.Text.Equals(""))
         {
             MessageBox.Show("Preencha o campo usuário", "Informação", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         }
         else if (txtSenha.Text.Equals(""))
         {
             MessageBox.Show("Preencha o campo senha", "Informação", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         }
         else if (txtUsuario.Text != "adminceb" || txtSenha.Text != "anchor3128")
         {
             MessageBox.Show("Usuário ou senha incorretos!", "Informação", MessageBoxButtons.OK, MessageBoxIcon.Error);
             txtSenha.Clear();
         }
         else
         {
             telaInicial tela = new telaInicial();
             tela.menuCriarCategoria.Visible   = true;
             tela.menuRemoverCategoria.Visible = true;
             tela.MdiParent = telaFundo.ActiveForm;
             //tela.Show();
             telaInicial.adm = true;
             this.Close();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Informação", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        private void RedefinirListaCategorias()
        {
            telaInicial tela = new telaInicial();

            if (telaInicial.adm == true)
            {
                tela.menuCriarCategoria.Visible   = true;
                tela.menuRemoverCategoria.Visible = true;
            }
        }
示例#4
0
        private void telaAdministrador_FormClosing(object sender, FormClosingEventArgs e)
        {
            telaInicial objTela = new telaInicial();

            objTela.MdiParent = telaFundo.ActiveForm;
            objTela.Show();
            if (telaInicial.adm == true)
            {
                objTela.menuCriarCategoria.Visible   = true;
                objTela.menuRemoverCategoria.Visible = true;
            }
        }
示例#5
0
        private void ReabrirListaCategorias()
        {
            telaInicial tela = new telaInicial();

            tela.MdiParent = telaFundo.ActiveForm;
            tela.Show();
            listaAux0.Clear();
            listaAux1.Clear();
            listaAux2.Clear();
            listaImagens.Clear();
            listaRandom.Clear();
            if (telaInicial.adm == true)
            {
                tela.menuCriarCategoria.Visible   = true;
                tela.menuRemoverCategoria.Visible = true;
            }
        }