/// <summary>Called when 'ok' is pressed in a blocking dialogue.</summary> public static void Ok(UIEvent e) { // Get the window: Window window = e.htmlDocument.window; // Get the dialogue: BlockingDialogue bd = window.BlockingDialogue; window.BlockingDialogue = null; if (bd == null) { return; } // Restore it with a true or content from 'input zone': HtmlElement inputZone = null; if (bd.Type == "prompt") { inputZone = window.document.getElementById("spark-prompt-input-zone") as HtmlElement; } if (inputZone != null) { bd.Resume(inputZone.value); } else { bd.Resume(true); } }
/// <summary>Called when 'cancel' is pressed in a blocking dialogue.</summary> public static void Cancel(UIEvent e) { // Get the window: Window window = e.htmlDocument.window; // Get the dialogue: BlockingDialogue bd = window.BlockingDialogue; window.BlockingDialogue = null; if (bd == null) { return; } // Restore it with a false: bd.Resume(false); }