Exemplo n.º 1
0
 void playListTransition(transitionCode direction=transitionCode.normal)
 {
     if (direction == transitionCode.normal)
     {
         if (positionInPlaylist == -1 || positionInPlaylist==(playListVideos.Count -1))
         {
             return;//not here doing stuff
         }
         curPage = pageName.videoAndPractice;
         currentCom = pageComponents[curPage];
         positionInPlaylist++;
         poseVideoTextBlock.Visibility = Visibility.Collapsed;
         moviePageLoaded(null);//should work?
     }
     else//going back
     {
         if (positionInPlaylist == -1 || positionInPlaylist == 0)//at first pose or doingother stuff
         {
             return;//not here doing stuff
         }
         curPage = pageName.videoAndPractice;
         currentCom = pageComponents[curPage];
         positionInPlaylist--;
         poseVideoTextBlock.Visibility = Visibility.Collapsed;
         moviePageLoaded(null);//should work?
     }
     
 }
Exemplo n.º 2
0
        /*This will be called when click gesture is recognized and handle control logic
         * Will call something
         * 
         * 
         */

        void transition(transitionCode code)
        {
            UIElement selected = null;
            pageName target;
            if (code == transitionCode.back)
            {
                if (curPage == pageName.videoAndPractice)
                {
                    poseVideoPlayer.Stop();
                    ignoreData = false;
                    gestureTracking = true;
                }
                target = prevPage[curPage];
                curPage = target;
                hideElements(currentCom);
                currentCom = pageComponents[curPage];
                unHideElements(currentCom);
                focusedElementBorder.Visibility = Visibility.Hidden;
                focusedElement = null;
                return;
            }
            foreach (UIElement e in currentCom)
            {
                if (((int)e.GetValue(Grid.ColumnProperty) == 1) && ((int)e.GetValue(Grid.RowProperty) == 1)) selected = e;
            }
            if (selected == null) return;//nothing selected in practice this should never happen
            target = nextPage[selected];

            if (target == pageName.main)
            {
                transitionTimer.Start();
                poseTracking = false;
                gestureTracking = false;
                return;
            }
            foreach (UIElement e in currentCom)
            {
                e.Visibility = Visibility.Hidden;
            }

            displayCorrectStuff(target);
        }//rewrite this