Exemple #1
0
        private void btnJogar2_Click(object sender, EventArgs e)
        {
            Usuario usr   = new Usuario();
            GameBD  login = new GameBD();

            try
            {
                usr.username = txt_username.Text;
                usr.password = txt_password.Text;
                login.login(usr);

                if (Usuario.SessionGame != null)
                {
                    telaJogo t5 = new telaJogo();
                    t5.Show();
                    this.Close();
                }
            }
            catch (Exception)
            {
                // MessageBox.Show("Senha incorreta");   (APAGAR EMBAIXO E ATIVAR ESSA LINHA)
                telaJogo t5 = new telaJogo();
                t5.Show();
                this.Close();
            }
        }
Exemple #2
0
 public TelaCadastro()
 {
     InitializeComponent();
     this.dadosGame = new GameBD();
     this.bdGame    = new BancoDeDados();
     this.user      = new Usuario();
 }