public void DisplayGestures(PXCMGesture.Gesture[] gestures) { if (!Gesture.Checked) { return; } Gesture1.Invoke(new DisplayGesturesDelegate(delegate(PXCMGesture.Gesture[] data) { if (data != null) { if (data[0].label > 0) { Gesture1.Image = (Bitmap)pictures[data[0].label]; Gesture1.Invalidate(); timer.Start(); } } }), new object[] { gestures }); Gesture2.Invoke(new DisplayGesturesDelegate(delegate(PXCMGesture.Gesture[] data) { if (data != null) { if (data[1].label > 0) { Gesture2.Image = (Bitmap)pictures[data[1].label]; Gesture2.Invalidate(); timer.Start(); } } }), new object[] { gestures }); }
private void timer_Tick(object sender, EventArgs e) { Gesture1.Image = Gesture2.Image = null; Gesture1.Invalidate(); Gesture2.Invalidate(); }