Inheritance: System.Web.UI.WebControls.WebParts.EditorPart
Exemplo n.º 1
0
        protected virtual EditorPartCollection GetDefaultEditorPart()
        {
            var originalEditors = base.CreateEditorParts();
            var editors         = new List <EditorPart>();

            // copy original editors
            foreach (EditorPart editorPart in originalEditors)
            {
                editors.Add(editorPart);
            }

            // add PropertyEditorPart as the only default editor
            var propertyEditorPart = new PropertyEditorPart();

            propertyEditorPart.ID = "PropertyEditorPartOnly";

            // Backward compatibility: portlet category titles may contain plain text or a localized value.
            // Hidden category check algorithm will work with the localized values.
            propertyEditorPart.HiddenCategories = this.HiddenPropertyCategories == null ? null : this.HiddenPropertyCategories.Select(pc => SenseNetResourceManager.Current.GetString(pc)).ToList();
            propertyEditorPart.HiddenProperties = this.HiddenProperties;

            editors.Add(propertyEditorPart);

            return(new EditorPartCollection(editors));
        }
Exemplo n.º 2
0
        protected virtual EditorPartCollection GetDefaultEditorPart()
        {
            var originalEditors = base.CreateEditorParts();
            var editors         = new List <EditorPart>();

            // copy original editors
            foreach (EditorPart editorPart in originalEditors)
            {
                editors.Add(editorPart);
            }

            // add PropertyEditorPart as the only default editor
            var propertyEditorPart = new PropertyEditorPart();

            propertyEditorPart.ID = "PropertyEditorPartOnly";
            propertyEditorPart.HiddenCategories = this.HiddenPropertyCategories;
            propertyEditorPart.HiddenProperties = this.HiddenProperties;

            editors.Add(propertyEditorPart);

            return(new EditorPartCollection(editors));
        }
Exemplo n.º 3
0
        protected virtual EditorPartCollection GetDefaultEditorPart()
        {
            var originalEditors = base.CreateEditorParts();
            var editors = new List<EditorPart>();

            // copy original editors
            foreach (EditorPart editorPart in originalEditors)
                editors.Add(editorPart);               

            // add PropertyEditorPart as the only default editor
            var propertyEditorPart = new PropertyEditorPart();
            propertyEditorPart.ID = "PropertyEditorPartOnly";
            propertyEditorPart.HiddenCategories = this.HiddenPropertyCategories;
            propertyEditorPart.HiddenProperties = this.HiddenProperties;

            editors.Add(propertyEditorPart);

            return new EditorPartCollection(editors);

        }