예제 #1
0
 public void InsertPage(int index, IWizardPageInfo page)
 {
     if (page != null && GetPageIndex(page.PageName) == -1)
     {
         Pages.Insert(index, page);
     }
 }
예제 #2
0
        public void RemovePage(IWizardPageInfo pageInfo)
        {
            int pageIndex = IndexOf(pageInfo);

            if (pageIndex != -1)
            {
                Pages[pageIndex].PageStatusChanged   -= OnPageStatusChanged;
                Pages[pageIndex].PagePropertyChanged -= OnPagePropertyChanged;

                Pages.RemoveAt(pageIndex);

                // If the page about to be removed is the current page, navigate to previous one
                if (_currentIndex == pageIndex)
                {
                    GoToPage(_currentIndex - 1);
                }
            }
        }
예제 #3
0
        public void AddPage(IWizardPageInfo page, IWizardPageNotificationObject notificationObject = null)
        {
            if (page != null)
            {
                if (GetPageIndex(page.PageName) == -1)
                {
                    Pages.Add(page);

                    page.PageStatusChanged   += OnPageStatusChanged;
                    page.PagePropertyChanged += OnPagePropertyChanged;

                    if (notificationObject != null)
                    {
                        page.NotificationObject = notificationObject;
                    }

                    // If this is first page we insert, navigate to it
                    if (_currentIndex == -1)
                    {
                        GoToPage(0);
                    }
                }
            }
        }
예제 #4
0
 private void NotifyPageStatusChanged(IWizardPageInfo page, WizardPageStatus newStatus)
 {
     page.NotificationObject?.OnPageStatusChanged(newStatus);
 }
예제 #5
0
 public int IndexOf(IWizardPageInfo pageInfo)
 {
     return(Pages.IndexOf(pageInfo));
 }