Ejemplo n.º 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);
        }
Ejemplo n.º 2
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);
        }