Esempio n. 1
0
        protected override void Render(HtmlTextWriter writer)
        {
            SectionCollection sectionCollection = (this.ContentControl != null) ? this.ContentControl.Sections : null;

            if (sectionCollection != null && sectionCollection.Count > 1)
            {
                Bookmark bookmark = new Bookmark();
                for (int i = 0; i < sectionCollection.Count; i++)
                {
                    this.SetInitialFocus = false;
                    Section section = sectionCollection[i];
                    if (section.Visible)
                    {
                        bookmark.AddEntry(section.ID, section.Title, section.WorkflowName, section.ClientVisibilityBinding);
                        if (i != 0)
                        {
                            section.Attributes.CssStyle.Add(HtmlTextWriterStyle.Display, "none");
                        }
                    }
                }
                this.inPagePanel.Controls.AddAt(2, bookmark);
                Panel panel = this.inPagePanel;
                panel.CssClass += " sBmk";
            }
            else
            {
                Panel panel2 = this.inPagePanel;
                panel2.CssClass += " nobmk";
            }
            if (!this.ReadOnly && this.ContentControl != null && this.ContentControl.ReadOnly)
            {
                this.ReadOnly = true;
            }
            base.Render(writer);
        }