--- a/middleware/src/Tracking/Events/PushListener.cs Fri Mar 23 16:24:36 2012 +0100
+++ b/middleware/src/Tracking/Events/PushListener.cs Mon Mar 26 16:22:51 2012 +0200
@@ -36,10 +36,28 @@
public void ShowOnScreen(object o, PushEventArgs e)
{
//On l'indique dans le debug.
- e.debug.showPush(e);
- //e.debug.ExceptionLbl.Content = "SWIPE";
+ //Lorsqu'il s'agit d'un push/pull de la main gauche/droite/deux deux on envoie le message
+ //correspondant.
+ if (e.direction == Gestures.PushDetector.Direction.PUSH)
+ {
+ if (e.hand == Gestures.PushDetector.Hand.RIGHT)
+ e.debug.showGesture("PUSH-RIGHT");
+ else if (e.hand == Gestures.PushDetector.Hand.LEFT)
+ e.debug.showGesture("PUSH-LEFT");
+ else
+ e.debug.showGesture("PUSH-BOTH");
+ }
+ else
+ {
+ if (e.hand == Gestures.PushDetector.Hand.RIGHT)
+ e.debug.showGesture("PULL-RIGHT");
+ else if (e.hand == Gestures.PushDetector.Hand.LEFT)
+ e.debug.showGesture("PULL-LEFT");
+ else
+ e.debug.showGesture("PULL-BOTH");
+ }
//On notifie le serveur TUIO.
- e.server.Pull(o, e);
+ e.server.Push(o, e);
}
}
}