Example #1
0
        public void CreateAccount(object o, EventArgs e)
        {
            string email          = emailEdit.Text;
            string username       = usernameEdit.Text;
            string password       = passwordEdit.Text;
            string passwordRepeat = passwordRepeatEdit.Text;

            if (passwordRepeat != password)
            {
                Toast.MakeText(this, "Passwords don't match", ToastLength.Long).Show();
                return;
            }

            string errorMsg = RequestSender.CreateAccount(email, username, password, false);

            if (errorMsg.Length > 0)
            {
                Toast.MakeText(this, errorMsg, ToastLength.Long).Show();
                return;
            }

            Toast.MakeText(this, "Account created successfully!", ToastLength.Short).Show();
            Finish();
        }