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); } }
private int GetPageCount() { WizardPage cursor = m_FirstPage; int index = 0; while (cursor != null) { index++; cursor = cursor.GetNextPage(); } return(index); }
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); }
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"); }