Пример #1
0
 private void OnQueryInteractionStatus(object sender, QueryInteractionStatusEventArgs queryInteractionStatusEventArgs)
 {
     if (element.Equals(queryInteractionStatusEventArgs.HandPointer.Captured))
     {
         queryInteractionStatusEventArgs.IsInGripInteraction = this.lastGripStatus == GripState.Gripped;
         queryInteractionStatusEventArgs.Handled             = true;
     }
 }
Пример #2
0
 /// <summary>
 /// Tells the KinectRegion what state the control is in.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="queryInteractionStatusEventArgs">The query interaction status event arguments.</param>
 private void OnQueryInteractionStatus(object sender, QueryInteractionStatusEventArgs queryInteractionStatusEventArgs)
 {
     if (this.capturedHandPointer == queryInteractionStatusEventArgs.HandPointer)
     {
         queryInteractionStatusEventArgs.IsInGripInteraction = true;
         queryInteractionStatusEventArgs.Handled             = true;
     }
 }
Пример #3
0
        private void OnQuery(object sender, QueryInteractionStatusEventArgs handPointerEventArgs)
        {
            //If a grip detected change the cursor image to grip
            if (handPointerEventArgs.HandPointer.HandEventType == HandEventType.Grip)
            {
                this.isGrip = true;
                handPointerEventArgs.IsInGripInteraction = true;
            }
            else if (handPointerEventArgs.HandPointer.HandEventType == HandEventType.GripRelease)
            {
                this.isGrip = false;
                handPointerEventArgs.IsInGripInteraction = false;
            }
            else if (handPointerEventArgs.HandPointer.HandEventType == HandEventType.None)
            {
                handPointerEventArgs.IsInGripInteraction = this.isGrip;
            }


            handPointerEventArgs.Handled = true;
        }
Пример #4
0
        private void OnQuery(object sender, QueryInteractionStatusEventArgs handPointerEventArgs)
        {
            //If a grip detected change the cursor image to grip
            if (handPointerEventArgs.HandPointer.HandEventType == HandEventType.Grip)
            {
                isGripinInteraction = true;
                handPointerEventArgs.IsInGripInteraction = true;
            }

            //If Grip Release detected change the cursor image to open
            else if (handPointerEventArgs.HandPointer.HandEventType == HandEventType.GripRelease)
            {
                isGripinInteraction = false;
                handPointerEventArgs.IsInGripInteraction = false;
            }

            //If no change in state do not change the cursor
            else if (handPointerEventArgs.HandPointer.HandEventType == HandEventType.None)
            {
                handPointerEventArgs.IsInGripInteraction = isGripinInteraction;
            }

            handPointerEventArgs.Handled = true;
        }