src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs
changeset 203 2948b34324bb
parent 196 e738cd9c1b99
child 207 6405d0b7d085
--- a/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs	Mon Nov 16 18:06:15 2009 +0100
+++ b/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs	Tue Nov 17 13:20:22 2009 +0100
@@ -18,6 +18,7 @@
 using FingersDance.ViewModels;
 using FingersDance.Views;
 using FingersDance.Control.Close;
+using GestureControl;
 
 namespace FingersDance.Control.TimeLine
 {
@@ -226,6 +227,7 @@
             else
                 slider.Style = FindResource("SurfaceSliderStylePause") as Style;
         }
+
         public Boolean isAnnotationAccepted(AnnotationViewModel avm)
         {
             Boolean annotOk = true;
@@ -358,6 +360,14 @@
             }
         }
 
+        
+        public void UserControlPlayer_NewGestureRegognized(object sender, EventArgs e)
+        {
+            GestureRoutedEventArgs grea = (GestureRoutedEventArgs)e;
+            Console.WriteLine("Timeline NewGestureRegognized " + grea.Gesture.Name + ", " + grea.Gesture.Start + ", " + grea.Gesture.End);
+            addAnnotation(new AnnotationViewModel(new Annotation("temp",(float)grea.Gesture.Start, (float)(grea.Gesture.End-grea.Gesture.Start + 20), grea.Gesture.Name, CurrentColor), 0));
+        }
+
         private void listview_PreviewContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
         {
             FrameworkElement findSource = e.OriginalSource as FrameworkElement;