public bool Prompt(nsIDOMWindow aParent, string aDialogTitle, string aText, ref string aValue, string aCheckMsg, ref bool aCheckState) { PromptDialog dialog = new PromptDialog(aDialogTitle, aText, aValue, aCheckMsg); DialogResult result = dialog.ShowDialog(); if (result == DialogResult.OK) { aValue = dialog.Result; } #if false // Changes made when using autogenerated interfaces. // passing aCheckState as an IntPtr instead of a bool [] fixes the prompts in about:config if (aCheckState != IntPtr.Zero) Marshal.WriteIntPtr(aCheckState, dialog.IsChecked ? new IntPtr(-1) : new IntPtr(0)); #else aCheckState = dialog.IsChecked; #endif return (result == DialogResult.OK); }
public bool Prompt(nsIDOMWindow aParent, string aDialogTitle, string aText, ref string aValue, string aCheckMsg, bool [] aCheckState) { PromptDialog dialog = new PromptDialog(aDialogTitle, aText, aValue, aCheckMsg); DialogResult result = dialog.ShowDialog(); if (result == DialogResult.OK) { aValue = dialog.Result; } if (aCheckState != null) aCheckState[0] = dialog.IsChecked; return (result == DialogResult.OK); }
public bool Prompt(nsIDOMWindow aParent, string aDialogTitle, string aText, ref string aValue, string aCheckMsg, IntPtr aCheckState) { PromptDialog dialog = new PromptDialog(aDialogTitle, aText, aValue, aCheckMsg); DialogResult result = dialog.ShowDialog(); if (result == DialogResult.OK) { aValue = dialog.Result; } // passing aCheckState as an IntPtr instead of a bool [] fixes the prompts in about:config if (aCheckState != IntPtr.Zero) Marshal.WriteIntPtr(aCheckState, dialog.IsChecked ? new IntPtr(-1) : new IntPtr(0)); return (result == DialogResult.OK); }