Пример #1
0
        public override EditorPartCollection CreateEditorParts()
        {
            TabConfigurationEditorPart editorPart = new TabConfigurationEditorPart();

            // The ID of the Editor part should be unique. So prefix it with the ID of the Web Part.
            editorPart.ID = this.ID + "_TabConfigurationEditorPart";

            // Create a collection of Editor Parts and add them to the Editor Part collection.
            List <EditorPart> editors = new List <EditorPart> {
                editorPart
            };

            return(new EditorPartCollection(editors));
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.parentEditorPart = this.Parent as TabConfigurationEditorPart;

            // Call Sync Changes on the Editor Part, of it to read the Tab List from the Web Part
            this.parentEditorPart.SyncChanges();
            this.TabList = this.parentEditorPart.TabList;

            // Check if this is the first Page_Load of the control
            if (this.hiddenFieldDetectRequest.Value == "0")
            {
                this.hiddenFieldDetectRequest.Value = "1";

                // Save the Original Tab List to the Control's ViewState
                this.SaveOriginalTabListToViewState();

                // Bind the Tab List to the drop down
                this.PopulateConfiguredTabsDropDown();
            }
        }