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); }
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); }
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); }
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; }
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); }
public PageNavigator(PageInstance aFirstPage) { iPageStack = new List <PageInstance>(); iPageStack.Add(aFirstPage); }