Esempio n. 1
0
        /// <summary>
        /// Current gesture part was sucessful. Continue with next.</summary>
        /// <param name="src">
        /// The checked condition</param>
        /// <param name="e">
        /// Details about the success</param>
        private void ConditionComplete(Object src, GesturesEventArgs e)
        {
            Condition previous = index.Current;
            Boolean hasNext = index.MoveNext();
            Condition next = index.Current;

            if (hasNext) // no further gesture parts -> success!
            {
                previous.Disable();
                next.Enable();
            }
            else
            {
                Reset();
                FireSucessful(this, e);
            }
        }
Esempio n. 2
0
 protected virtual void FireSucessful(Object sender, GesturesEventArgs e)
 {
     if (Successful != null)
     {
         Successful(this, e);
     }
 }
 /// <summary>
 /// Callback when a gesture checker detect a posture
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnPosture(object sender, GesturesEventArgs e)
 {
     // Posture detect in first time
     if(PropertiesPluginKinect.Instance.SavePosturerecognize != e.Posture)
     {
         RaiseUserGestureDetected(ConvertPostureEnum(e.Posture));
     }
     m_refPostureRecognized = e.Posture;
     PropertiesPluginKinect.Instance.SavePosturerecognize = e.Posture;
     m_refAuthorizedGesture = false;
     ResetTimerPosture();
 }
Esempio n. 4
0
 /// <summary>
 /// Indicate a call to registered Success Eventhandlers</summary>
 /// <param name="sender">
 /// Probably an implementation of the GestureChecker class</param>
 /// <param name="e">
 /// Detailed arguments for a gesture part</param>
 protected void FireSucceeded(object sender, GesturesEventArgs e)
 {
     if (Succeeded != null)
     {
         Succeeded(sender, e);
     }
 }
 /// <summary>
 /// Callback when a gestures checker detect a gesture
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnGestureDetected(object sender, GesturesEventArgs e)
 {
     if (m_refAuthorizedGesture)
     {
         // Add event in buffer
         m_refGestureRecognized.Add(e.Gesture);
         ResetTimerGesture();
     }
 }