コード例 #1
0
 private void CompleteMoveToNextPage()
 {
     if (m_CurrentPage.GetNextPage() == null)
     {
         m_FinishAction.Invoke();
     }
     else
     {
         m_PreviousPages.Push(m_CurrentPage);
         m_CurrentPage = m_CurrentPage.GetNextPage();
         UpdateViewWithNewPage(m_CurrentPage);
     }
 }
コード例 #2
0
        private int GetPageCount()
        {
            WizardPage cursor = m_FirstPage;
            int        index  = 0;

            while (cursor != null)
            {
                index++;
                cursor = cursor.GetNextPage();
            }
            return(index);
        }
コード例 #3
0
        private List <PageNameAndCurrent> ConstructPageList()
        {
            var        pages  = new List <PageNameAndCurrent>();
            WizardPage cursor = m_FirstPage;

            while (cursor != null)
            {
                pages.Add(new PageNameAndCurrent {
                    CurrentPage = (cursor == m_CurrentPage), Name = cursor.getName()
                });
                cursor = cursor.GetNextPage();
            }
            return(pages);
        }
コード例 #4
0
        private int GetCurrentPageIndexCount()
        {
            WizardPage cursor = m_FirstPage;
            int        index  = 0;

            while (cursor != null)
            {
                index++;
                if (cursor == m_CurrentPage)
                {
                    return(index);
                }
                cursor = cursor.GetNextPage();
            }
            throw new Exception("Didn't find current page in list of pages");
        }