Exemple #1
0
 public void Kinect_SkeletonUpdated(object sender, SkeletonEventArgs e)
 {
     if (this.Kinect != null)
     {
         double x = this.Kinect.HandRight.X;
         double y = this.Kinect.HandRight.Y;
         if (IsInBounds(x, y, quitButton))
         {
             if (quitButtonTimer == null)
             {
                 StartTimer_Quit(1.5);
             }
         }
         else
         {
             StopTimer_Quit();
         }
         if (IsInBounds(x, y, startButton))
         {
             if (startButtonTimer == null)
             {
                 StartTimer_Start(1.5);
             }
         }
         else
         {
             StopTimer_Start();
         }
     }
 }
Exemple #2
0
 public void Kinect_SkeletonUpdated(object sender, SkeletonEventArgs e)
 {
     if (this.Kinect != null)
     {
         double x = this.Kinect.HandRight.X;
         double y = this.Kinect.HandRight.Y;
         if (IsInBounds(x, y, sliderMicLevel))
         {
             this.MicLevelFraction = GetFraction(y, sliderMicLevel);
         }
         if (IsInBounds(x, y, sliderBpm))
         {
             this.BpmFraction = GetFraction(y, sliderBpm);
         }
         if (IsInBounds(x, y, backButton))
         {
             if (backButtonTimer == null)
             {
                 StartTimer(1.5);
             }
         }
         else
         {
             StopTimer();
         }
     }
 }
Exemple #3
0
 protected void RaiseSkeletonUpdate(SkeletonEventArgs e)
 {
     if (SkeletonUpdated != null)
     {
         SkeletonUpdated(this, e);
     }
 }