/// <summary>Asks the user to confirm something.</summary> public bool confirm(object request) { // Open the dialogue: BlockingDialogue dialogue = BlockingDialogues.Open("confirm", this, request); if (dialogue == null) { // It failed to open. // E.g. because 'prevent this page from opening other dialogues' was ticked. return(false); } // Return the response received from the user: return(dialogue.OkResponse); }
/// <summary>Asks the user for some textual information.</summary> public string prompt(object request) { // Open the dialogue: BlockingDialogue dialogue = BlockingDialogues.Open("prompt", this, request); if (dialogue == null) { // It failed to open. // E.g. because 'prevent this page from opening other dialogues' was ticked. return(""); } // Return the response received from the user: if (dialogue.Response is string) { return((string)dialogue.Response); } // Empty string otherwise return(""); }
/// <summary>Alerts the given message.</summary> public void alert(object value) { // Open the dialogue: BlockingDialogues.Open("alert", this, value); }