コード例 #1
0
        private void NovoMenuItem_Click(object sender, EventArgs e)
        {
            var notepad = new FrmNotePad();

            notepad.MdiParent = MDISingleton.GetMDI();
            notepad.Show();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: gunn3r71/Windows_App
 static void Main()
 {
     Application.SetHighDpiMode(HighDpiMode.SystemAware);
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(MDISingleton.GetMDI());
 }
コード例 #3
0
        // Esse metodo é o pertencente ao Esqueceu a senha?
        public bool RecuperarSenha(string pergunta, string resposta, string senha, string senha2)
        {
            int cod_pergunta = EscolherCod(pergunta);

            if ((senha.Equals("")) || (senha2.Equals("")))
            {
                MessageBox.Show("Existem campos invalidos!");
            }
            else if ((senha.Equals(senha2)) && Convert.ToBoolean(admDao.EsqueceuSenha(cod_pergunta, resposta)) == true)
            {
                adm.Senha = senha;
                admDao.NovaSenha(adm);

                using (var childForm = new PainelLogin())
                {
                    childForm.MdiParent = MDISingleton.InstanciaMDI();
                    childForm.Show();
                    return(true);
                }
            }
            else
            {
                if (senha.Equals(senha2))
                {
                    MessageBox.Show("Os campos das respostas não correspondem!");
                }
                else
                {
                    MessageBox.Show("Os campos das senhas não correspondem!");
                }
            }
            return(false);
        }
        private void btnCancelar_Click(object sender, EventArgs e)
        {
            PainelLogin childForm = new PainelLogin();

            childForm.MdiParent = MDISingleton.InstanciaMDI();
            childForm.Show();
            Close();
        }
コード例 #5
0
        private void TreeViewMenuItem_Click(object sender, EventArgs e)
        {
            var frm = new FrmTreeNode
            {
                MdiParent = MDISingleton.GetMDI(),
                Width     = 300,
                Height    = 300
            };

            frm.Show();
        }
        private void BtnSalvar(object sender, EventArgs e)
        {
            string usuario, senha, senha2, pergunta, resposta, resposta2;

            usuario   = EdtUsuario.Text;
            senha     = EdtSenha.Text;
            senha2    = EdtSenha2.Text;
            pergunta  = comboBox1.Text;
            resposta  = EdtResposta.Text;
            resposta2 = EdtResposta2.Text;
            ControllerAdm CAdm = new ControllerAdm();

            if (CAdm.SalvarAdm(usuario, senha, senha2, pergunta, resposta, resposta2))
            {
                Hide();
                PainelLogin childForm = new PainelLogin();
                childForm.MdiParent = MDISingleton.InstanciaMDI();
                childForm.Show();
            }
        }
コード例 #7
0
 private static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(MDISingleton.InstanciaMDI());
 }