Ejemplo n.º 1
0
        private void ShowNextPage()
        {
            target.SendUpdateTab(this);

            if (currentPageIndex >= (Target.Pages.Count - 1))
            {
                return;
            }

            int  checkPageIndex   = currentPageIndex + 1;
            bool foundVisiblePage = false;

            while (!(checkPageIndex >= (Target.Pages.Count - 1)))
            {
                if (Target.Pages[checkPageIndex].Visible)
                {
                    foundVisiblePage = true;
                    break;
                }
                checkPageIndex++;
            }

            if (!foundVisiblePage)
            {
                return;
            }


            if (currentPage != null)
            {
                if (!currentPage.Save())
                {
                    return;
                }
                this.Controls.Remove(currentPage);
                currentPage.Dispose();
            }

            currentPageIndex = checkPageIndex;

            PropPage page = (PropPage)Activator.CreateInstance(Target.Pages[currentPageIndex].Page);

            page.Top       = this.Contents.Top;
            page.Left      = this.Contents.Left;
            page.Binding   = target;
            StepTitle.Text = Target.Pages[currentPageIndex].Title;
            page.SetData(Target.Data);
            this.Controls.Add(page);

            currentPage = page;

            UpdateButtonStates();
        }
Ejemplo n.º 2
0
        private void ShowTab(WizPropPageElement element)
        {
            if (currentPage != null)
            {
                currentPage.Save();
                this.Controls.Remove(currentPage);
                currentPage.Dispose();
            }


            PropPage page = (PropPage)Activator.CreateInstance(element.Page);

            page.Top     = this.Contents.Top;
            page.Left    = this.Contents.Left;
            page.Binding = target;
            page.SetData(Target.Data);
            this.Controls.Add(page);

            currentPage = page;
            UpdateButtonStates();
        }