Exemple #1
0
 public static void ChangePasswordBanned(ChangePasswordBanned P)
 {
     ChangePasswordDialog.ConfirmButton.Enabled = true;
     SceneFunctions.ShowMessage(string.Format("This account is banned.\n Reason{0}\n ExpiaryDate:{1}", P.Reason,
                                              P.ExpiryDate));
     ChangePasswordDialog.Clear();
 }
Exemple #2
0
        public static void ChangePassword(ChangePassword P)
        {
            ChangePasswordDialog.ConfirmButton.Enabled = true;

            switch (P.Result)
            {
            case 0:
                SceneFunctions.ShowMessage("An error occured whilst Changing Password.");
                ChangePasswordDialog.Hide();
                ChangePasswordDialog.Clear();
                LoginDialog.Show();
                break;

            case 1:
                SceneFunctions.ShowMessage("Password Changing is currently disabled.");
                ChangePasswordDialog.Hide();
                ChangePasswordDialog.Clear();
                LoginDialog.Show();
                break;

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

            case 3:
                SceneFunctions.ShowMessage("The current Password is not acceptable.");
                ChangePasswordDialog.CurrentPasswordTextBox.SetFocus();
                break;

            case 4:
                SceneFunctions.ShowMessage("Your new Password is not acceptable.");
                ChangePasswordDialog.NewPassword1TextBox.SetFocus();
                break;

            case 5:
                SceneFunctions.ShowMessage("The AccountID does not exist.");
                ChangePasswordDialog.AccountIDTextBox.SetFocus();
                break;

            case 6:
                SceneFunctions.ShowMessage("Incorrect Password and AccountID combination.");
                ChangePasswordDialog.CurrentPasswordTextBox.SetFocus();
                ChangePasswordDialog.CurrentPasswordTextBox.Text = string.Empty;
                break;

            case 7:
                SceneFunctions.ShowMessage("Your password was changed successfully.");
                ChangePasswordDialog.Hide();
                ChangePasswordDialog.Clear();
                LoginDialog.Show();
                break;

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