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(); } }
public TelaCadastro() { InitializeComponent(); this.dadosGame = new GameBD(); this.bdGame = new BancoDeDados(); this.user = new Usuario(); }