public bool PromptPassword(nsIDOMWindow aParent, string aDialogTitle, string aText, ref string aPassword, string aCheckMsg, ref System.Boolean aCheckState) { bool checkState = aCheckState; PasswordDialog dialog = new PasswordDialog(aDialogTitle, aText, "", aPassword, aCheckMsg, checkState); dialog.DisableUserName(); if (dialog.ShowDialog() == DialogResult.OK) { aPassword = dialog.Password; aCheckState = dialog.IsChecked; return(true); } return(false); }
public bool PromptUsernameAndPassword(nsIDOMWindow aParent, string aDialogTitle, string aText, ref string aUsername, ref string aPassword, string aCheckMsg, ref bool aCheckState) { //test: http://tools.dynamicdrive.com/password/example/ bool checkState = aCheckState; PasswordDialog dialog = new PasswordDialog(aDialogTitle, aText, aUsername, aPassword, aCheckMsg, checkState); if (dialog.ShowDialog() == DialogResult.OK) { aUsername = dialog.UserName; aPassword = dialog.Password; aCheckState = dialog.IsChecked; return(true); } return(false); }