Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public bool PromptPassword(nsIDOMWindow aParent, string aDialogTitle, string aText, ref string aPassword, string aCheckMsg, bool [] aCheckState)
        {
            PasswordDialog dialog = new PasswordDialog(aDialogTitle, aText, "", aPassword, aCheckMsg);

            dialog.DisableUserName();
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                aPassword = dialog.Password;
                if (aCheckState != null)
                {
                    aCheckState[0] = dialog.IsChecked;
                }
                return(true);
            }

            return(false);
        }
Exemplo n.º 3
0
        public bool PromptPassword(nsIDOMWindow aParent, string aDialogTitle, string aText, ref string aPassword, string aCheckMsg, IntPtr aCheckState)
        {
            bool checkState = (aCheckState == IntPtr.Zero) ? false : (Marshal.ReadIntPtr(aCheckState) != IntPtr.Zero);

            PasswordDialog dialog = new PasswordDialog(aDialogTitle, aText, "", aPassword, aCheckMsg, checkState);

            dialog.DisableUserName();
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                aPassword = dialog.Password;
                if (aCheckState != IntPtr.Zero)
                {
                    Marshal.WriteIntPtr(aCheckState, dialog.IsChecked ? new IntPtr(-1) : new IntPtr(0));
                }
                return(true);
            }

            return(false);
        }
Exemplo n.º 4
0
		public bool PromptPassword(nsIDOMWindow aParent, string aDialogTitle, string aText, ref string aPassword, string aCheckMsg, bool [] aCheckState)
		{
			PasswordDialog dialog = new PasswordDialog(aDialogTitle, aText, "", aPassword, aCheckMsg);
			dialog.DisableUserName();
			if (dialog.ShowDialog() == DialogResult.OK)
			{
				aPassword = dialog.Password;
				if (aCheckState != null)
					aCheckState[0] = dialog.IsChecked;
				return true;
			}
			
			return false;
		}
        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;
        }
Exemplo n.º 6
0
		public bool PromptPassword(nsIDOMWindow aParent, string aDialogTitle, string aText, ref string aPassword, string aCheckMsg, IntPtr aCheckState)
		{
			bool checkState = (aCheckState == IntPtr.Zero) ? false : (Marshal.ReadIntPtr(aCheckState) != IntPtr.Zero);
			
			PasswordDialog dialog = new PasswordDialog(aDialogTitle, aText, "", aPassword, aCheckMsg, checkState);
			dialog.DisableUserName();
			if (dialog.ShowDialog() == DialogResult.OK)
			{
				aPassword = dialog.Password;
				if (aCheckState != IntPtr.Zero)
					Marshal.WriteIntPtr(aCheckState, dialog.IsChecked ? new IntPtr(-1) : new IntPtr(0));
				return true;
			}
			
			return false;
		}