Beispiel #1
0
        private void btnCadastrar_click(object sender, RoutedEventArgs e)
        {
            if (txtLogin.Text != "" && txtSenha.Text != "")
            {
                if (txtSenha.Text == txtConfirma.Text)
                {
                    userModel.Username = Convert.ToString(txtLogin.Text);
                    userModel.Password = Convert.ToString(txtSenha.Text);
                    bool res;
                    res = bll.Incluir(userModel);
                    Aviso aviso = new Aviso("Usuário cadstrado!");
                    aviso.Show();

                    if (Entrar() > 0)
                    {
                        WindowGame janelaJogo = new WindowGame();
                        janelaJogo.Show();
                    }
                    this.Close();
                }
                else
                {
                    Aviso aviso = new Aviso("Senhas diferentes!");
                    aviso.Show();
                    txtSenha.Text    = "";
                    txtConfirma.Text = "";
                }
            }
            else
            {
                Aviso aviso = new Aviso("Preencher campos obrigatórios!");
                aviso.Show();
            }
        }
Beispiel #2
0
        private void btnContinuar_click(object sender, RoutedEventArgs e)
        {
            WindowGame janela = new WindowGame();

            janela.Show();
            WindowGame2.Close();
        }
Beispiel #3
0
 private void btnJogar_Click(object sender, RoutedEventArgs e)
 {
     if (Entrar() > 0)
     {
         //chamar pagina de jogo
         WindowGame janelaGame = new WindowGame();
         janelaGame.Show();
         Hide();
     }
 }