示例#1
0
 public void SetupSettings()
 {
     Settings = new LaunchPage()
     {
         PageNumber = Int32.MaxValue
     };
 }
示例#2
0
        public LaunchPage GetPage(LaunchPage page)
        {
            foreach (LaunchPage lpage in Pages)
            {
                if (lpage.Equals(page))
                {
                    return(lpage);
                }
            }

            return(null);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }
示例#5
0
        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;
                }
            }
        }