Ejemplo n.º 1
0
        /// <summary>
        /// Sets the display behavior of the wizard page.
        /// </summary>
        /// <typeparam name="T">
        /// The type of the wizard page on which the display behavior is specified.
        /// </typeparam>
        /// <param name="display"> The display behavior. </param>
        public void SetPageDisplay <T>(WizardPageDisplay display)
            where T : WizardPageBase
        {
            var index = this.wizardPages.FindIndex(pred => pred.Item1.GetType() == typeof(T));

            this.SetPageDisplay(index, display);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Sets the display behavior of the wizard page.
        /// </summary>
        /// <param name="pageIndex"> Index of the page on which the display behavior is specified. </param>
        /// <param name="display"> The display behavior. </param>
        public void SetPageDisplay(int pageIndex, WizardPageDisplay display)
        {
            switch (display)
            {
            case WizardPageDisplay.Hide:
                this.wizardPages[pageIndex] = new Tuple <WizardPageBase, bool>(this.wizardPages[pageIndex].Item1, false);
                break;

            case WizardPageDisplay.Show:
                this.wizardPages[pageIndex] = new Tuple <WizardPageBase, bool>(this.wizardPages[pageIndex].Item1, true);
                break;

            default:
                break;
            }
        }