Beispiel #1
0
        private void win1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                WybierzTryb a = new WybierzTryb();
                a.Show();

                Close();
            }
            if (e.Key == Key.Escape)
            {
                this.Close();
            }
        }
Beispiel #2
0
        private void win1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                WybierzTryb a = new WybierzTryb();
                a.Show();

                Close();
            }
            if (e.Key == Key.Escape)
            {
                this.Close();
            }
        }
Beispiel #3
0
        private void button2_Click(object sender, RoutedEventArgs e)
        {
            if (button_active)
            {
                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();

                    wlacz_kinect = false;
                }

                if (watek)
                {
                    t1.Abort();
                }

                tryb_okno.Close();                 // SPRAWDŹ !!!

                WybierzTryb a = new WybierzTryb();
                a.Wlacz(magia);
                a.Show();

                kinect_active = false;
                this.Close();
            }
        }
        private void button2_Click(object sender, RoutedEventArgs e)
        {
            if (button_active)
            {
                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();

                    wlacz_kinect = false;
                }

                if (watek)
                {
                    t1.Abort();
                }

                tryb_okno.Close(); // SPRAWDŹ !!!

                WybierzTryb a = new WybierzTryb();
                a.Wlacz(magia);
                a.Show();

                kinect_active = false;
                this.Close();
            }
        }