// override the base method protected override void DescribeComponent(ScriptComponentDescriptor descriptor) { // Register fields and handlers for use in client-side if (Search != null) { RegisteredFields.Add(new Obout.Ajax.UI.HTMLEditor.Popups.RegisteredField("search", Search)); } if (ReplaceWith != null) { RegisteredFields.Add(new Obout.Ajax.UI.HTMLEditor.Popups.RegisteredField("replaceWith", ReplaceWith)); } if (MatchCase != null) { RegisteredFields.Add(new Obout.Ajax.UI.HTMLEditor.Popups.RegisteredField("matchCase", MatchCase)); } if (SearchNext != null) { RegisteredHandlers.Add(new Obout.Ajax.UI.HTMLEditor.Popups.RegisteredField("searchNext", SearchNext)); } if (Replace != null) { RegisteredHandlers.Add(new Obout.Ajax.UI.HTMLEditor.Popups.RegisteredField("replace", Replace)); } if (ReplaceAll != null) { RegisteredHandlers.Add(new Obout.Ajax.UI.HTMLEditor.Popups.RegisteredField("replaceAll", ReplaceAll)); } base.DescribeComponent(descriptor); }
protected override void FillContent() { Table table = new Table(); TableRow row = null; TableCell cell; InnerQuickFormatting.EnsureChildControls(); Collection <StyleItem> items = new Collection <StyleItem>(); foreach (Control control in InnerQuickFormatting.Controls[1].Controls) { StyleItem item = control as StyleItem; items.Add(item); } int n = 0; foreach (StyleItem item in items) { row = new TableRow(); table.Rows.Add(row); cell = new TableCell(); cell.Attributes["class"] = "oae_quickformatting"; ButtonInPopup popupButton = new ButtonInPopup(item); RegisteredHandlers.Add(new Obout.Ajax.UI.HTMLEditor.Popups.RegisteredField("button_" + n.ToString(), popupButton)); n++; cell.Controls.Add(popupButton); cell.Style[HtmlTextWriterStyle.BackgroundColor] = "Transparent"; cell.Style[HtmlTextWriterStyle.FontSize] = "10pt"; cell.Style[HtmlTextWriterStyle.Padding] = "0px"; cell.Style[HtmlTextWriterStyle.FontFamily] = "Verdana"; cell.Style[HtmlTextWriterStyle.Color] = "Blue"; cell.Style[HtmlTextWriterStyle.Cursor] = "pointer"; row.Cells.Add(cell); } table.Attributes.Add("border", "0"); table.Attributes.Add("cellspacing", "0"); table.Attributes.Add("cellpadding", "0"); table.Style["background-color"] = "transparent"; Content.Add(table); }
// override the base method protected override void DescribeComponent(ScriptComponentDescriptor descriptor) { // Register fields and handlers for use in client-side if (FieldsetWidth != null) { if (FieldsetWidth.ClientID.Length > 0) { RegisteredFields.Add(new RegisteredField("width", FieldsetWidth)); } } if (FieldsetHeight != null) { if (FieldsetHeight.ClientID.Length > 0) { RegisteredFields.Add(new RegisteredField("height", FieldsetHeight)); } } if (WidthUnitToggle != null) { RegisteredHandlers.Add(new RegisteredField("widthUnitToggle", WidthUnitToggle)); } if (HeightUnitToggle != null) { RegisteredHandlers.Add(new RegisteredField("heightUnitToggle", HeightUnitToggle)); } if (Padding != null) { if (Padding.ClientID.Length > 0) { RegisteredFields.Add(new RegisteredField("padding", Padding)); } } if (Margin != null) { if (Margin.ClientID.Length > 0) { RegisteredFields.Add(new RegisteredField("margin", Margin)); } } base.DescribeComponent(descriptor); }
protected override void CreateChildControls() { var ok = new PopupBGIButton(); ok.Text = GetButton("OK"); ok.Name = "OK"; ok.CssClass += " " + "ajax__htmleditor_popup_confirmbutton "; var cancel = new PopupBGIButton(); cancel.Text = GetButton("Cancel"); cancel.Name = "Cancel"; cancel.CssClass += " " + "ajax__htmleditor_popup_confirmbutton"; var table = new Table(); table.Attributes.Add("border", "0"); table.Attributes.Add("cellspacing", "0"); table.Attributes.Add("cellpadding", "0"); table.Style["width"] = "100%"; var row = new TableRow(); table.Rows.Add(row); var cell = new TableCell(); row.Cells.Add(cell); cell.HorizontalAlign = HorizontalAlign.Right; cell.Controls.Add(ok); cell.Controls.Add(cancel); Content.Add(table); RegisteredHandlers.Add(new RegisteredField("OK", ok)); RegisteredHandlers.Add(new RegisteredField("Cancel", cancel)); base.CreateChildControls(); }
// ovveride the base method protected override void DescribeComponent(ScriptComponentDescriptor descriptor) { // register client-side handler for our custom button RegisteredHandlers.Add(new Obout.Ajax.UI.HTMLEditor.Popups.RegisteredField("customaction1", CButton)); base.DescribeComponent(descriptor); }