Esempio n. 1
0
        /// <summary>
        /// Handles CreateAccount button press.
        /// </summary>
        public void BtnCreateAccount_Click(object sender, EventArgs e)
        {
            string name          = "";
            string password      = "";
            string passwordAgain = "";

            name          = txtRuser.Text.Trim();
            password      = txtRPass.Text.Trim();
            passwordAgain = txtRPass2.Text.Trim();

            if (C_General.IsLoginLegal(name, password))
            {
                if (password != passwordAgain)
                {
                    MessageBox.Show("Passwords don't match.");
                    return;
                }

                if (!C_General.IsStringLegal(name))
                {
                    return;
                }

                C_General.MenuState(C_Constants.MenuStateNewaccount);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Handles Login button press.
 /// </summary>
 public void BtnLogin_Click(object sender, EventArgs e)
 {
     if (C_General.IsLoginLegal(txtLogin.Text, txtPassword.Text))
     {
         C_General.MenuState(C_Constants.MenuStateLogin);
     }
 }