Exemplo n.º 1
0
        public static void NewAccount(NewAccount P)
        {
            NewAccountDialog.ConfirmButton.Enabled = true;
            switch (P.Result)
            {
            case 0:
                SceneFunctions.ShowMessage("An error occured whilst creating the account.");
                NewAccountDialog.Hide();
                NewAccountDialog.Clear();
                LoginDialog.Show();
                break;

            case 1:
                SceneFunctions.ShowMessage("Account creation is currently disabled.");
                NewAccountDialog.Hide();
                NewAccountDialog.Clear();
                LoginDialog.Show();
                break;

            case 2:
                SceneFunctions.ShowMessage("Your AccountID is not acceptable.");
                NewAccountDialog.AccountIDTextBox.SetFocus();
                break;

            case 3:
                SceneFunctions.ShowMessage("Your Password is not acceptable.");
                NewAccountDialog.Password1TextBox.SetFocus();
                break;

            case 4:
                SceneFunctions.ShowMessage("Your E-Mail Address is not acceptable.");
                NewAccountDialog.EMailTextBox.SetFocus();
                break;

            case 5:
                SceneFunctions.ShowMessage("Your User Name is not acceptable.");
                NewAccountDialog.UserNameTextBox.SetFocus();
                break;

            case 6:
                SceneFunctions.ShowMessage("Your Secret Question is not acceptable.");
                NewAccountDialog.QuestionTextBox.SetFocus();
                break;

            case 7:
                SceneFunctions.ShowMessage("Your Secret Answer is not acceptable.");
                NewAccountDialog.AnswerTextBox.SetFocus();
                break;

            case 8:
                SceneFunctions.ShowMessage("An Account with this ID already exists.");
                NewAccountDialog.AccountIDTextBox.SetFocus();
                NewAccountDialog.AccountIDTextBox.Text = string.Empty;
                break;

            case 9:
                SceneFunctions.ShowMessage("Your account was created successfully.");
                NewAccountDialog.Hide();
                NewAccountDialog.Clear();
                LoginDialog.Show();
                break;

#if DEBUG
            default:
                throw new NotImplementedException();
#endif
            }
        }