public void SetupSettings() { Settings = new LaunchPage() { PageNumber = Int32.MaxValue }; }
public LaunchPage GetPage(LaunchPage page) { foreach (LaunchPage lpage in Pages) { if (lpage.Equals(page)) { return(lpage); } } return(null); }
public int PreviousPage() { if (CurPage.PageNumber - 1 > 0) { LaunchPage prevPage = GetPage(CurPage.PageNumber - 1); CurPage = prevPage; LaunchUtils.SetPadFromPage(prevPage); return(prevPage.PageNumber); } return(CurPage.PageNumber); }
public int NextPage() { if (CurPage.PageNumber + 1 <= TotalPages) { LaunchPage nextPage = GetPage(CurPage.PageNumber + 1); CurPage = nextPage; LaunchUtils.SetPadFromPage(nextPage); return(nextPage.PageNumber); } return(CurPage.PageNumber); }
public void AddPage(LaunchPage page) { LaunchPage p = GetPage(page); if (p == null) { Pages.Add(page); TotalPages = Pages.Count(); page.PageNumber = TotalPages; if (TotalPages == 1) { CurPage = page; } } }