// 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.ConfigureStreams(); handsRecognition.ActivatedGestures = GetSelectedGestures(); handsRecognition.SetUpHandCursorModule(); handsRecognition.RegisterHandEvents(); handsRecognition.EnableGesturesFromSelection(); manager.InitSenseManager(); // Thread for Streaming System.Threading.Thread thread1 = new System.Threading.Thread(DoWork); thread1.Start(); System.Threading.Thread.Sleep(5); }
private void gestureListBox_ItemCheck(object sender, ItemCheckEventArgs e) { // Workaround to include currently selsected item into condsidderation this.BeginInvoke(new Action(() => { handsRecognition.EnableGesturesFromSelection(); })); }