Esempio n. 1
0
        public void AddSection(CollapsibleControlSection newSection)
        {
            this.SectionList.Add(newSection);
            // Add a new row.
            var header = new ListHeader();

            header.Text  = newSection.SectionName;
            header.Width = Width;
            header.ListHeaderStateChanged += header_ListHeaderStateChanged;

            if (newSection.HeaderExtControl != null)
            {
                header.Controls.Add(newSection.HeaderExtControl);
                newSection.HeaderExtControl.BringToFront();
            }

            this.flowLayoutPanel1.Controls.Add(header);
            // Get the position of the control the application will add, so that it can show
            // and hide it when needed.
            header.Tag = "CollapsibleControl" + this._cControlCounter;
            this._cControlCounter++;

            Control c = newSection.SectionControl;

            c.Width = Width;
            c.Name  = header.Tag.ToString();
            this.flowLayoutPanel1.Controls.Add(c);
        }
Esempio n. 2
0
        public ControlBuildDetailPanel()
        {
            InitializeComponent();

            this.sectionIcons[0] = CreateSectionIcon();
            this.sectionIcons[1] = CreateSectionIcon();

            var section_summary = new CollapsibleControlSection("Summary", this.controlSummary, this.sectionIcons[0]);

            this.collapsibleControl1.AddSection(section_summary);

            var section_buildSteps = new CollapsibleControlSection("Build steps", this.controlBuildSteps,
                                                                   this.sectionIcons[1]);

            this.collapsibleControl1.AddSection(section_buildSteps);
        }