# HG changeset patch # User PAMPHILE Jonathan # Date 1258460705 -3600 # Node ID 89813df17ec25293212ed05ca9adfc436aa16763 # Parent 468f3757f1f8a966a5b8a8f9115fee4219bac246# Parent 2948b34324bb039eb4f13fbcc190e8b597d1c424 merge diff -r 468f3757f1f8 -r 89813df17ec2 src/FingersDance.Control.SyncSource/FingersDance.Control.SyncSource.csproj --- a/src/FingersDance.Control.SyncSource/FingersDance.Control.SyncSource.csproj Tue Nov 17 13:22:14 2009 +0100 +++ b/src/FingersDance.Control.SyncSource/FingersDance.Control.SyncSource.csproj Tue Nov 17 13:25:05 2009 +0100 @@ -148,6 +148,10 @@ {EAF384DB-2AE4-4132-839D-60F9DAFDEAD8} FingersDance.Data + + {99A9037F-5431-44DD-BCE9-ED60670DEBC1} + GestureControl + diff -r 468f3757f1f8 -r 89813df17ec2 src/FingersDance.Control.SyncSource/UserControlSyncSource.xaml.cs --- a/src/FingersDance.Control.SyncSource/UserControlSyncSource.xaml.cs Tue Nov 17 13:22:14 2009 +0100 +++ b/src/FingersDance.Control.SyncSource/UserControlSyncSource.xaml.cs Tue Nov 17 13:25:05 2009 +0100 @@ -10,6 +10,7 @@ using FingersDance.Control.TimeLine; using FingersDance.Data; using FingersDance.Factory; +using GestureControl; namespace FingersDance.Control.SyncSource { @@ -35,7 +36,8 @@ this.userControlTimeLine.OnSuccessAnnotation += new EventHandler(userControlTimeLine_OnSuccessAnnotation); this.userControlTimeLine.AnnotationAdded += new EventHandler(userControlTimeLine_AnnotationAdded); this.userControlTimeLine.AnnotationRemoved += new EventHandler(userControlTimeLine_AnnotationRemoved); - this.UserControlPlayer.PlayerStopOrPause +=new EventHandler(UserControlPlayer_PlayerStopOrPause); + this.UserControlPlayer.PlayerStopOrPause += new EventHandler(UserControlPlayer_PlayerStopOrPause); + UserControlPlayer.NewGestureRegognized += new EventHandler(UCTimeLine.UserControlPlayer_NewGestureRegognized); } void userControlTimeLine_AnnotationRemoved(object sender, EventArgs e) diff -r 468f3757f1f8 -r 89813df17ec2 src/FingersDance.Control.TimeLine/FingersDance.Control.TimeLine.csproj --- a/src/FingersDance.Control.TimeLine/FingersDance.Control.TimeLine.csproj Tue Nov 17 13:22:14 2009 +0100 +++ b/src/FingersDance.Control.TimeLine/FingersDance.Control.TimeLine.csproj Tue Nov 17 13:25:05 2009 +0100 @@ -132,6 +132,10 @@ {EAF384DB-2AE4-4132-839D-60F9DAFDEAD8} FingersDance.Data + + {99A9037F-5431-44DD-BCE9-ED60670DEBC1} + GestureControl + {E81BB080-0598-43AC-90CE-54D6570C4E9E} FingersDance.ViewModels diff -r 468f3757f1f8 -r 89813df17ec2 src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs --- a/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs Tue Nov 17 13:22:14 2009 +0100 +++ b/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs Tue Nov 17 13:25:05 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;