Ejemplo n.º 1
0
        /// <summary>
        /// Refreshes the pages.
        /// </summary>
        /// <remarks>Documented by Dev05, 2007-12-21</remarks>
        private void RefreshPages()
        {
            if (radioButtonBoxes.Checked && !ParentWizard.Pages.Contains(BoxPage))
            {
                ParentWizard.Pages.Insert(1, BoxPage);
            }
            else if (!radioButtonBoxes.Checked && ParentWizard.Pages.Contains(BoxPage))
            {
                ParentWizard.Pages.Remove(BoxPage);
            }

            if (radioButtonChapters.Checked && !ParentWizard.Pages.Contains(ChapterPage))
            {
                ParentWizard.Pages.Insert(1, ChapterPage);
            }
            else if (!radioButtonChapters.Checked && ParentWizard.Pages.Contains(ChapterPage))
            {
                ParentWizard.Pages.Remove(ChapterPage);
            }

            if (radioButtonIndividual.Checked && !ParentWizard.Pages.Contains(IndividualPage))
            {
                ParentWizard.Pages.Insert(1, IndividualPage);
            }
            else if (!radioButtonIndividual.Checked && ParentWizard.Pages.Contains(IndividualPage))
            {
                ParentWizard.Pages.Remove(IndividualPage);
            }

            ParentWizard.UpdateButtonStates();
        }