EditorPartCollection IWebEditable.CreateEditorParts() { List <EditorPart> editors = new List <EditorPart>(); EditorPartCollection baseParts = base.CreateEditorParts(); foreach (EditorPart basePart in baseParts) { editors.Add(basePart); } FormXslEditorPart form = new FormXslEditorPart { ID = ID + "_StyleEditor", Title = "Style" }; editors.Add(form); FormDataEditorPart data = new FormDataEditorPart { ID = ID + "_FormDataEditor", Title = "Data" }; editors.Add(data); return(new EditorPartCollection(editors)); }
private void SyncChanges(EditorPartCollection editorParts) { foreach (EditorPart part3 in editorParts) { part3.SyncChanges(); } }
/// <summary> /// /// </summary> /// <returns></returns> EditorPartCollection IWebEditable.CreateEditorParts() { List <EditorPart> editors = new List <EditorPart>(); EditorPartCollection baseParts = base.CreateEditorParts(); foreach (EditorPart basePart in baseParts) { editors.Add(basePart); } DesignXslEditorPart design = new DesignXslEditorPart { ID = ID + "_StyleEditor", Title = "Style" }; editors.Add(design); DesignDataEditorPart data = new DesignDataEditorPart { ID = ID + "_DesignDataEditor", Title = "Data" }; editors.Add(data); return(new EditorPartCollection(editors)); }
EditorPartCollection IWebEditable.CreateEditorParts() { EditorPartCollection defaultEditor = base.CreateEditorParts(); List <EditorPart> editors = new List <EditorPart>(); editors.Add(new ContactUsAddressEditorPart(this.ID)); return(new EditorPartCollection(defaultEditor, editors)); }
EditorPartCollection IWebEditable.CreateEditorParts() { EditorPartCollection defaultEditors = base.CreateEditorParts(); List <EditorPart> editors = new List <EditorPart>(); editors.Add(new WriteOnWallEditorPart(this.ID)); return(new EditorPartCollection(defaultEditors, editors)); }
public override EditorPartCollection CreateEditorParts() { var def = base.CreateEditorParts(); var merged = new EditorPartCollection(def, new[] { new InitializationCodeEditor(this.ID) }); return(merged); }
public override EditorPartCollection CreateEditorParts() { List <EditorPart> customEditorPartCollection = new List <EditorPart>(); HtmlDisplayEditorPart o = new HtmlDisplayEditorPart(); o.ID = "ContentEditor1"; customEditorPartCollection.Add(o); EditorPartCollection EditorPartCollection = new EditorPartCollection(customEditorPartCollection); return(EditorPartCollection); }
public override EditorPartCollection CreateEditorParts() { ArrayList editorArray = new ArrayList(); MyEditorPart edPart = new MyEditorPart(); edPart.ID = this.ID + "_editorPart1"; editorArray.Add(edPart); EditorPartCollection editorParts = new EditorPartCollection(editorArray); return(editorParts); }
public override EditorPartCollection CreateEditorParts() { List <EditorPart> customEditorPartCollection = new List <EditorPart>(); ScriptletPartExEditor o = new ScriptletPartExEditor(); o.ID = "ScriptletPartExEditor1"; customEditorPartCollection.Add(o); EditorPartCollection EditorPartCollection = new EditorPartCollection(customEditorPartCollection); return(EditorPartCollection); }
public override EditorPartCollection CreateEditorParts() { ArrayList partsArray = new ArrayList(); CustomEditorPart ce = new CustomEditorPart { ID = ID + "_editorPart1", Title = "List" }; partsArray.Add(ce); EditorPartCollection parts = new EditorPartCollection(partsArray); return(parts); }
/// <summary> /// Called when a control enters edit display mode. It creates EditPart controls /// </summary> /// <returns>The collection of EditorPart controls</returns> public override EditorPartCollection CreateEditorParts() { ArrayList editorArray = new ArrayList(); PropertyImages edPart = new PropertyImages(); edPart.ID = this.ID + "_PropertyImages"; editorArray.Add(edPart); EditorPartCollection editorParts = new EditorPartCollection(editorArray); return(editorParts); }
/// <summary> /// Returns a collection of custom <see cref="EditorPart"/> controls that can be used to edit a <see cref="WebPart"/> control when it is in edit mode. /// </summary> /// <returns>An <see cref="EditorPartCollection"/> that contains custom <see cref="EditorPart"/> controls associated with a <see cref="WebPart"/> control.</returns> public override EditorPartCollection CreateEditorParts() { List <EditorPart> editorParts = new List <EditorPart>(); AnnouncementsEditorPart editor = new AnnouncementsEditorPart(); editor.ID = this.ID + "_editor"; editor.Title = "Announcement List Configuration"; editorParts.Add(editor); EditorPartCollection epc = new EditorPartCollection(editorParts); return(epc); }
//protected override void OnPreRender(EventArgs e) //{ // base.OnPreRender(e); // Label lblTitleFirst = new Label(); // lblTitleFirst.Text = FirstText; // this.Controls.Add(lblTitleFirst); // Label lblTitleSecond = new Label(); // lblTitleSecond.Text = SecondText; // this.Controls.Add(lblTitleSecond); //} public override EditorPartCollection CreateEditorParts() { var newEditorPart = new TitleWebPartEditor { ID = ID + "_titleEditorPart", Title = "Custom Settings" }; var newEditorPartCollection = new EditorPartCollection(new[] { newEditorPart }); return(new EditorPartCollection(newEditorPartCollection, base.CreateEditorParts())); }
public override EditorPartCollection CreateEditorParts() { var partsArray = new ArrayList(); var phonePart = new PhoneEditor(); phonePart.ID = ID + "_editorPart1"; phonePart.Title = "Phone Number"; phonePart.GroupingText = "(xxx) xxx-xxxx"; partsArray.Add(phonePart); var parts = new EditorPartCollection(partsArray); return(parts); }
private void ApplyChanges(EditorPartCollection editors) { foreach (EditorPart part2 in editors) { if (!part2.Display) { continue; } if (!part2.Visible) { continue; } if (part2.ApplyChanges()) { this._applyError = true; } } }
public override EditorPartCollection CreateEditorParts() { ConfigPart tp = new ConfigPart(); tp.ID = this.ID + "ConnectionSettingsEditor"; tp.Title = "Connection Settings"; tp.ChromeState = PartChromeState.Normal; List <EditorPart> editors = new List <EditorPart>(); /*PropertyGridEditorPart tp = new PropertyGridEditorPart(); * tp.ID = this.ID + "setting_editor"; * tp.Title = "Connection Settings"; */ editors.Add(tp); EditorPartCollection result = new EditorPartCollection(editors); return(result); }
EditorPartCollection IWebEditable.CreateEditorParts() { List <EditorPart> editors = new List <EditorPart>(); EditorPartCollection baseParts = base.CreateEditorParts(); foreach (EditorPart basePart in baseParts) { editors.Add(basePart); } PageEditorPart editor = new PageEditorPart { ID = ID + "_Editor", Title = "Page Editor Part" }; editors.Add(editor); return(new EditorPartCollection(editors)); }
public EditorPartCollection(EditorPartCollection existingEditorParts, System.Collections.ICollection editorParts) {}
public EditorPartCollection(EditorPartCollection existingEditorParts, System.Collections.ICollection editorParts) { }
/// <summary> /// This method is sealed and cannot be overriden in EnhancedWebPart /// If you need to create your custom editor parts, use <see cref="GetAdditionalEditorParts">GetAdditionalEditorParts</cref> /// </summary> public override EditorPartCollection CreateEditorParts() { WebPartServiceLocator.Current.Initialize( GetCompositionAssemblies() .Concat(new Assembly[] { Assembly.GetExecutingAssembly(), Assembly.GetCallingAssembly() }) ); List <EditorPart> editorParts = new List <EditorPart>(1); List <PropertyInfo> enhancedProperties = new List <PropertyInfo>(); foreach (PropertyInfo pi in this.GetType().GetProperties()) { if (pi.GetCustomAttributes(typeof(EnhancedWebPartPropertyAttribute), false).Count() != 0) { enhancedProperties.Add(pi); } } if (enhancedProperties.Count > 0) { Dictionary <string, List <string> > editorPartsData = new Dictionary <string, List <string> >(); foreach (PropertyInfo pi in enhancedProperties) { CategoryAttribute categoryAttribute = (CategoryAttribute)pi.GetCustomAttributes(typeof(CategoryAttribute), false).FirstOrDefault(); if (categoryAttribute != null) { if (!editorPartsData.ContainsKey(categoryAttribute.Category)) { editorPartsData.Add(categoryAttribute.Category, new List <string>()); } editorPartsData[categoryAttribute.Category].Add(pi.Name); } else { if (!editorPartsData.ContainsKey("Preferences")) { editorPartsData.Add(categoryAttribute.Category, new List <string>()); } editorPartsData["Preferences"].Add(pi.Name); } } int i = 0; foreach (string key in editorPartsData.Keys) { EditorPart part = new EnhancedEditorPart(editorPartsData[key].ToArray()); part.ID = "EnhancedEditorPart" + i.ToString(); part.Title = key; i++; editorParts.Add(part); } } editorParts.AddRange(GetAdditionalEditorParts()); EditorPartCollection baseParts = base.CreateEditorParts(); return(new EditorPartCollection(baseParts, editorParts)); }