Skybound.Gecko.PromptService.PromptPassword C# (CSharp) Méthode

PromptPassword() public méthode

public PromptPassword ( nsIDOMWindow aParent, string aDialogTitle, string aText, string &aPassword, string aCheckMsg, System &aCheckState ) : bool
aParent nsIDOMWindow
aDialogTitle string
aText string
aPassword string
aCheckMsg string
aCheckState System
Résultat bool
        public bool PromptPassword(nsIDOMWindow aParent, string aDialogTitle, string aText, ref string aPassword, string aCheckMsg, ref System.Boolean aCheckState)
        {
            #if false // Changes made when using autogenerated interfaces.
            bool checkState = (aCheckState == IntPtr.Zero) ? false : (Marshal.ReadIntPtr(aCheckState) != IntPtr.Zero);
            #else
            bool checkState = aCheckState;
            #endif

            PasswordDialog dialog = new PasswordDialog(aDialogTitle, aText, "", aPassword, aCheckMsg, checkState);
            dialog.DisableUserName();
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                aPassword = dialog.Password;
            #if false // Changes made when using autogenerated interfaces.
                if (aCheckState != IntPtr.Zero)
                    Marshal.WriteIntPtr(aCheckState, dialog.IsChecked ? new IntPtr(-1) : new IntPtr(0));
            #else
                aCheckState = dialog.IsChecked;
            #endif
                return true;
            }

            return false;
        }