示例#1
0
        public PageD(NavigationPage navPage, StateMachineData stateMachineData, EventHandler HandleSequenceEnd, EventHandler HandleCancel)
            : base(navPage, stateMachineData, HandleSequenceEnd, HandleCancel)
        {
            System.Diagnostics.Debug.WriteLine ("PageD.ctor()");

            InitializeComponent ();
        }
示例#2
0
        public static StateMachinePage CreatePage(PageType pageType, NavigationPage navPage, StateMachineData stateMachineData, EventHandler HandleSequenceEnd, EventHandler HandleCancel)
        {
            StateMachinePage page=null;
            switch (pageType) {
            case PageType.ePageA:
                page = new PageA (navPage, stateMachineData, HandleSequenceEnd, HandleCancel);
                break;
            case PageType.ePageB:
                page = new PageB (navPage, stateMachineData, HandleSequenceEnd, HandleCancel);
                break;
            case PageType.ePageC:
                page = new PageC (navPage, stateMachineData, HandleSequenceEnd, HandleCancel);
                break;
            case PageType.ePageD:
                page = new PageD (navPage, stateMachineData, HandleSequenceEnd, HandleCancel);
                break;
            case PageType.ePageE:
                page = new PageE (navPage, stateMachineData, HandleSequenceEnd, HandleCancel);
                break;
            case PageType.ePageF:
                page = new PageF (navPage, stateMachineData, HandleSequenceEnd, HandleCancel);
                break;
            case PageType.eInvalid:
            default:
                System.Diagnostics.Debug.WriteLine ("PageFactory.CreatePage() - Error: invalid page type - {0} ", pageType);
                break;
            }

            return page;
        }
示例#3
0
        public StateMachinePage(NavigationPage navPage, StateMachineData stateMachineData, 
								 EventHandler HandleSequenceEnd, EventHandler HandleCancel)
        {
            navigationPage = navPage;
            _stateMachineData = stateMachineData;
            BindingContext = _stateMachineData;

            CancelHandler += HandleCancel;
            EndHandler += HandleSequenceEnd;
        }
示例#4
0
        // recurse over the tree of pages, creating the next page, adding it to the the current page,
        // and then passing in the next page to be used as the current
        public void CreatePages( StateMachinePage currPage, NavigationPage navPage, StateMachineData stateMachineData, EventHandler HandleSequenceEnd, EventHandler HandleCancel )
        {
            System.Diagnostics.Debug.WriteLine ("Node.CreatePages( {0} )", currPage.Title);

            // iter over the list of next pages (usually only 1, but sometimes more)
            foreach (Node node in _nextPages) {
                System.Diagnostics.Debug.WriteLine ("foreach {0}", node.pageType);

                StateMachinePage nextPage = PageFactory.CreatePage (node.pageType, navPage, stateMachineData, HandleSequenceEnd, HandleCancel);		// create page
                currPage.AddNext (nextPage);														// add to current pages nextpages list

                node.CreatePages (nextPage, navPage, stateMachineData, HandleSequenceEnd, HandleCancel);												// recurse to next level, and repeat
            }

            System.Diagnostics.Debug.WriteLine ("Node.CreatePages( {0} ) Fin", currPage.Title);
        }