コード例 #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);
 }