// Start of Program
        private void buttonStart_Click(object sender, EventArgs e)
        {
            // Configure UI
            menuStrip.Enabled   = false;
            buttonStart.Enabled = false;
            buttonStop.Enabled  = true;


            // Reset all components
            manager.DeviceInfo = null;
            manager.Stop       = false;

            manager.DeviceInfo = GetCheckedDevice();
            manager.ActivateSampleReader();
            streams.ConfigureStreams();

            handsRecognition.SetUpHandModule();
            handsRecognition.RegisterHandEvents();

            PopulateGestureList();

            manager.InitSenseManager();


            // Thread for Streaming
            System.Threading.Thread thread1 = new System.Threading.Thread(DoWork);
            thread1.Start();
            System.Threading.Thread.Sleep(5);
        }
Пример #2
0
        // Start of Program
        private void buttonStart_Click(object sender, EventArgs e)
        {
            // Configure UI
            menuStrip.Enabled   = false;
            buttonStart.Enabled = false;
            buttonStop.Enabled  = true;
            ActivateGestureCheckboxes(false);

            // Reset all components
            manager.DeviceInfo = null;
            manager.Stop       = false;

            manager.DeviceInfo = GetCheckedDevice();

            //streams.StreamProfileSet = GetStreamSetConfiguration();
            //streams.EnableStreamsFromSelection();
            //streams.StreamType = GetSelectedStream();

            handsRecognition.ActivatedGestures = GetSelectedGestures();
            handsRecognition.SetUpHandCursorModule();
            handsRecognition.RegisterHandEvents();
            handsRecognition.EnableGesturesFromSelection();

            manager.InitSenseManager();

            //???????????????????
            //manager.SenseManager.CaptureManager.Device.ResetProperties(RS.StreamType.STREAM_TYPE_ANY);

            // Thread for Streaming
            System.Threading.Thread thread1 = new System.Threading.Thread(DoWork);
            thread1.Start();
            System.Threading.Thread.Sleep(5);
        }