示例#1
0
#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();
		}
示例#2
0
		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;
		}
示例#3
0
		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;
		}
示例#4
0
		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;
		}
示例#5
0
文件: Methods.cs 项目: toepoke/Fluqi
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="dlg">Dialog object to call</param>
		public Methods(Dialog dlg) : base(dlg)
		{
		}		
示例#6
0
		internal static void ForceRender(Dialog dlg)
		{
			using (dlg.RenderDialog()) {
			}
		}
示例#7
0
文件: Rendering.cs 项目: xuanvu/Fluqi
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="dlg">Dialog object to set rendering options of</param>
		public Rendering(Dialog dlg)
		 : base()
		{
			this.Dialog = dlg;
		}
示例#8
0
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="dlg">Dialog object to configure events for</param>
		public Events(Dialog dlg)
		 : base()
		{
			this.Dialog = dlg;
			this.Reset();
		}
示例#9
0
		/// <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;
		}
示例#10
0
		/// <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;
		}