#pragma warning restore 1591 /// <summary> /// Constructor /// </summary> /// <param name="dlg">Dialog to configure options of</param> public Options(Dialog dlg) : base() { this.Dialog = dlg; this.ButtonOptions = new ButtonOptions(this); this.Reset(); }
internal static Dialog SetupSimpleDialogObject(TextWriter writer) { // nothing special, just create a simple dummy tab helper as a starting point // (saves having the same code everywhere!) Dialog dlg = new Dialog(writer, "myDlg"); return dlg; }
public Dialog BuildDialogFromModel(TextWriter writer, string id) { Dialog dlg = new Dialog(writer, id); dlg.Options .SetDisabled(this.Disabled) .SetAutoOpen(this.AutoOpen) .SetCloseOnEscape(this.CloseOnEscape) .SetCloseText(this.CloseText) .SetDialogClass(this.DialogClass) .SetDraggable(this.Draggable) .SetHeight(this.Height) .SetHideEffect(this.HideEffect) .SetMaxHeight(this.MaxHeight) .SetMaxWidth(this.MaxWidth) .SetModal(this.Modal) .SetPosition(this.Position1, this.Position2) .SetResizable(this.Resizable) .SetShowEffect(this.ShowEffect) .SetStack(this.Stack) .SetTitle(this.Title) .SetWidth(this.Width) .SetZIndex(this.ZIndex) .AddButton("OK", "OKClicked(this); $(this).dialog(\"close\");") .AddButton("Cancel", "CancelClicked(this); $(this).dialog(\"close\");") .Finish(); if (this.showEvents) { dlg .Events .SetCreateEvent("return createEvent(event, ui);") .SetBeforeCloseEvent("return beforeClose(event, ui);") .SetOpenEvent("return openEvent(event, ui);") .SetFocusEvent("return focusEvent(event, ui);") .SetDragStartEvent("return dragStartEvent(event, ui);") .SetDragEvent("return dragEvent(event, ui);") .SetDragStopEvent("return dragStopEvent(event, ui);") .SetResizeStartEvent("return resizeStartEvent(event, ui);") .SetResizeEvent("return resizeEvent(event, ui);") .SetResizeStopEvent("return resizeStopEvent(event, ui);") .SetCloseEvent("return closeEvent(event, ui);") .Finish(); } if (!this.prettyRender) dlg.Rendering.Compress(); if (this.renderCSS) dlg.Rendering.ShowCSS(); return dlg; }
public Dialog ConfigureIconCheatSheetDialog(Dialog csDlg) { csDlg .Rendering .SetPrettyRender(true) .Finish() .Options .SetTitle("jQuery UI Icons Cheat Sheet") .SetAutoOpen(false) .SetWidth(600) .SetHeight(320) .AddButton("OK", " $(this).dialog('close');" ) .Finish() ; return csDlg; }
/// <summary> /// Constructor /// </summary> /// <param name="dlg">Dialog object to call</param> public Methods(Dialog dlg) : base(dlg) { }
internal static void ForceRender(Dialog dlg) { using (dlg.RenderDialog()) { } }
/// <summary> /// Constructor /// </summary> /// <param name="dlg">Dialog object to set rendering options of</param> public Rendering(Dialog dlg) : base() { this.Dialog = dlg; }
/// <summary> /// Constructor /// </summary> /// <param name="dlg">Dialog object to configure events for</param> public Events(Dialog dlg) : base() { this.Dialog = dlg; this.Reset(); }
/// <summary> /// Creates a Dialog control that can be configured and later rendered on the page. /// </summary> /// <param name="page">WebForms page to render the control onto</param> /// <param name="id">ID to give to the accordion (must be unique on the page)</param> /// <returns>Created Dialog control</returns> public static Dialog CreateDialog(this System.Web.UI.Page page, string id) { TextWriter writer = page.Response.Output; Dialog newDialog = new Dialog(writer, id); return newDialog; }
/// <summary> /// Creates a Dialog control that can be configured and later rendered on the page. /// </summary> /// <param name="html">Html helper (used to get the HttpResponse object to render onto)</param> /// <param name="id">ID to give to the accordion (must be unique on the page)</param> /// <returns>Created Dialog control</returns> public static Dialog CreateDialog(this HtmlHelper html, string id) { TextWriter writer = html.ViewContext.Writer; Dialog newDialog = new Dialog(writer, id); return newDialog; }