Ejemplo n.º 1
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            if (kinect_active)
            {
                Thread.Sleep(100);
                kinectSensor.Stop();

                foreach (var potentialSensor in KinectSensor.KinectSensors)
                {
                    if (potentialSensor.Status == KinectStatus.Disconnected)
                    {
                        kinectSensor = null;
                        break;
                    }
                }
                this.kinectSensor.SkeletonFrameReady -= this.nui_SkeletonFrameReady;
                this.kinectSensor.SkeletonStream.Disable();

                kinect_active = false;
            }

            for (int i = 0; i < 3; i++)
            {
                if (watek[i])
                {
                    t1.Abort();
                }
            }

            TRYB_TRENINGOWY t = new TRYB_TRENINGOWY();

            TrybKondycyjnyZestawCwiczen a = new TrybKondycyjnyZestawCwiczen();

            a.Wlacz(t, magia);
            a.Show();

            this.Close();
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            if (kinect_active)
            {
                Thread.Sleep(100);
                kinectSensor.Stop();

                foreach (var potentialSensor in KinectSensor.KinectSensors)
                {
                    if (potentialSensor.Status == KinectStatus.Disconnected)
                    {
                        kinectSensor = null;
                        break;
                    }
                }
                this.kinectSensor.SkeletonFrameReady -= this.nui_SkeletonFrameReady;
                this.kinectSensor.SkeletonStream.Disable();

                kinect_active = false;
            }

            for (int i = 0; i < 3; i++)
            {
                if (watek[i])
                {
                    t1.Abort();
                }
            }

            TRYB_TRENINGOWY t = new TRYB_TRENINGOWY();

            TrybKondycyjnyZestawCwiczen a = new TrybKondycyjnyZestawCwiczen();
            a.Wlacz(t, magia);
            a.Show();

            this.Close();
        }