Example #1
0
        private void btnSignUpConfirm_Click(object sender, EventArgs e)
        {
            if (txtName.Text == "")
            {
                MessageBox.Show("Full Name cannot be empty.");
            }
            else if (txtUsername.Text == "")
            {
                MessageBox.Show("Username cannot be empty.");
            }
            else if (IsValidEmail(txtEmailUp.Text) == false)
            {
                MessageBox.Show("Must be a valid email address.");
            }
            else if (txtPasswordUp.Text.Length <= 8)
            {
                MessageBox.Show("Password must be greater than 8.");
            }
            else
            {
                salt           = CreateSalt(10);
                hashedpassword = GenerateSHA256Hash(txtPasswordUp.Text, salt);
                NameUp         = txtName.Text;
                UserUp         = txtUsername.Text;
                EmailUp        = txtEmailUp.Text;

                if (Select(EMAIL).Contains(EmailUp))
                {
                    MessageBox.Show("Email already registered.");
                }
                else if (Select(USERNAME).Contains(UserUp))
                {
                    MessageBox.Show("Username already taken.");
                }
                else
                {
                    Insert();
                    DialogSuccess.ShowDialog("Thank you for registering with Crypto Central!");
                    Transition.HideSync(panelSignUp);
                    panelSignUp.Left = 803;

                    panelSignIn.Visible = false;
                    panelSignIn.Left    = 270;
                    Transition.ShowSync(panelSignIn);
                    panelSignIn.Refresh();

                    ButtonHighlight.Left = btnSignIn.Left;

                    txtEmailIn.Text    = EmailUp;
                    txtPasswordIn.Text = "";

                    txtName.Text       = "";
                    txtUsername.Text   = "";
                    txtEmailUp.Text    = "";
                    txtPasswordUp.Text = "";
                }
            }
        }
        public static void ShowDialog(string message)
        {
            DialogSuccess DialogS = new DialogSuccess(message);

            DialogS.ShowDialog();
        }
Example #3
0
 private void btnOpSummarySaveAll_Click(object sender, EventArgs e)
 {
     DialogSuccess.ShowDialog("ALL SUMMARY OPTIONS SAVED");
 }