Exemplo n.º 1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            kinectSensorChooserPrincipal.KinectSensorChanged += new DependencyPropertyChangedEventHandler(kinectSensorChooser1_KinectSensorChanged);

            selectionTimer = new System.Windows.Threading.DispatcherTimer();
            selectionTimer.Tick += new EventHandler(OnSelectEvent);
            selectionTimer.Interval = new TimeSpan(1000000);
            selectionTimer.Start();

            loader = new Image[] { this.loader0, this.loader1, this.loader2, this.loader3, this.loader4, this.loader5, this.loader6, this.loader7, this.loader8, this.loader9, this.loader10, this.loader11, this.loader12 };

            mw = new Puzzle();
            slide = new MainWindow();
        }
Exemplo n.º 2
0
 private void ProcessGesture()
 {
     if (!mw.IsVisible & !slide.IsVisible)
     {
         if (rightHandOnImage(this.image1))
         {
             if (!loading)
             {
                 startSelectionTime = DateTime.Now;
                 startLoadingAnimation();
             }
             if (selectionFinished)
             {
                 //selectionTimer.Stop();
                 mw.Close();
                 mw = new Puzzle();
                 mw.Show();
                 selectionFinished = false;
             }
         }
         else
         {
             if (rightHandOnImage(this.image2))
             {
                 if (!loading)
                 {
                     startSelectionTime = DateTime.Now;
                     startLoadingAnimation();
                 }
                 if (selectionFinished)
                 {
                     //selectionTimer.Stop();
                     slide.Close();
                     slide = new MainWindow();
                     slide.Show();
                     selectionFinished = false;
                 }
             }
             else
             {
                 stopLoadingAnimation();
             }
         }
     }
 }