示例#1
0
        public void PreviousPage(Session aSession, string aPageId)
        {
            Assert.Check(iPageStack.Count > 1);

            while (iPageStack.Count > 0)
            {
                // get page at top of the stack
                PageInstance pageInst = iPageStack[iPageStack.Count - 1];

                if (pageInst.PageId == aPageId)
                {
                    // open this page instance for this session
                    pageInst.Reopen(aSession);
                    return;
                }
                else
                {
                    // remove this page
                    iPageStack.Remove(pageInst);
                }
            }

            // this means aPageId did not exist in the page stack
            Assert.Check(false);
        }
示例#2
0
        public void NextPageNoSave(Session aSession, string aPageId)
        {
            // create a new instance of the specified page
            PageInstance pageInst = PageManager.Instance.CreatePageInstance(aPageId, aSession);

            // open this new page instance for this session
            pageInst.Open(aSession);
        }
示例#3
0
        public void PreviousPage(Session aSession)
        {
            Assert.Check(iPageStack.Count > 1);

            // remove the last page in the stack
            PageInstance pageInst = iPageStack[iPageStack.Count - 1];

            iPageStack.Remove(pageInst);

            // open the previous page instance for this session
            pageInst = iPageStack[iPageStack.Count - 1];
            pageInst.Reopen(aSession);
        }
示例#4
0
        public Session()
            : base()
        {
            // create a page instance for this session for the first page in the wizard
            PageInstance pageInst = PageManager.Instance.CreateFirstPageInstance(this);

            pageInst.Bind(this);

            // create a navigator for this session
            iNavigator = new PageNavigator(pageInst);

            iTracker  = new OpenHome.Xapp.Tracker(ModelInstance.Instance.TrackerId, this);
            iTracking = true;
        }
示例#5
0
        public void NextPage(Session aSession, string aPageId)
        {
            // the user has moved on to the next wizard page so notify the current page that it has been completed
            iPageStack[iPageStack.Count - 1].Completed();

            // create a new instance of the specified page
            PageInstance pageInst = PageManager.Instance.CreatePageInstance(aPageId, aSession);

            // add the new page instance to the stack
            iPageStack.Add(pageInst);

            // open this new page instance for this session
            pageInst.Open(aSession);
        }
示例#6
0
 public PageNavigator(PageInstance aFirstPage)
 {
     iPageStack = new List <PageInstance>();
     iPageStack.Add(aFirstPage);
 }