private void tabSections_ControlRemoved(object sender, ControlEventArgs e)
 {
     if (e.Control is SectionPage)
     {
         SectionPage sectionPage = e.Control as SectionPage;
         m_manager.RemoveSection(sectionPage.Section);
     }
 }
 private void tabSections_ControlAdded(object sender, ControlEventArgs e)
 {
     if (e.Control is SectionPage && e.Control != firstSection)
     {
         Section newSection = new Section();
         m_manager.AddSection(newSection);
         SectionPage sectionPage = e.Control as SectionPage;
         sectionPage.Text    = String.Format(PlaceholderGenerator.Properties.Resources.TitleSection, this.tabSections.TabCount - 1);
         sectionPage.Section = newSection;
     }
 }
        public PlaceholderGeneratorForm()
        {
            InitializeComponent();

            m_manager = new SectionManager();

            //
            // firstSection
            //
            this.firstSection = new SectionPage();
            this.tabSections.Controls.Add(this.firstSection);
            this.firstSection.UseVisualStyleBackColor = true;
            this.firstSection.Text        = string.Format(PlaceholderGenerator.Properties.Resources.TitleSection, 1);
            firstSection.Section          = m_manager[0];
            this.tabSections.ItemRenderer = typeof(SectionPage);
        }