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

            return(null);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
                }
            }
        }