Example #1
0
        private void btnIngresar_Click(object sender, RoutedEventArgs e)
        {
            var      username = txtUsuario.Text;
            var      pass     = txtPassword.Password.ToString();
            MySQLCon mysql    = new MySQLCon();

            List <string>[] checkUsers = new List <string> [1000];
            checkUsers = mysql.Select();
            if (username == "NobleSix" && pass == "haha")
            {
                Msgbox.Show("Bienvenido NobleSix");
            }
            else
            {
                Msgbox.Show("Usuario/Password Incorrecto");
            }
        }
Example #2
0
        private async void btnRegistrar_Click(object sender, RoutedEventArgs e)
        {
            string stringKey   = "XZ*+2!@#4>.";
            var    button      = sender as Button;
            var    username    = txtUsuario.Text;
            var    password    = txtPassword.Password.ToString();
            var    confpass    = txtConfirmaPassword.Password.ToString();
            string encryptPass = await EncryptStringHelper(password, stringKey);

            if (password == confpass)
            {
                MySQLCon mysql = new MySQLCon();
                mysql.InsertUser(username, password);
            }
            else
            {
                Msgbox.Show("Los passwords no coinciden.");
            }
        }