merge
authorPAMPHILE Jonathan <pamphile@efrei.fr>
Tue, 17 Nov 2009 13:25:05 +0100
changeset 206 89813df17ec2
parent 205 468f3757f1f8 (current diff)
parent 203 2948b34324bb (diff)
child 207 6405d0b7d085
merge
src/FingersDance.Control.SyncSource/UserControlSyncSource.xaml.cs
--- 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 @@
       <Project>{EAF384DB-2AE4-4132-839D-60F9DAFDEAD8}</Project>
       <Name>FingersDance.Data</Name>
     </ProjectReference>
+    <ProjectReference Include="..\FingersDance.GestureControl\GestureControl.csproj">
+      <Project>{99A9037F-5431-44DD-BCE9-ED60670DEBC1}</Project>
+      <Name>GestureControl</Name>
+    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
     <WCFMetadata Include="Service References\" />
--- 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)
--- 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 @@
       <Project>{EAF384DB-2AE4-4132-839D-60F9DAFDEAD8}</Project>
       <Name>FingersDance.Data</Name>
     </ProjectReference>
+    <ProjectReference Include="..\FingersDance.GestureControl\GestureControl.csproj">
+      <Project>{99A9037F-5431-44DD-BCE9-ED60670DEBC1}</Project>
+      <Name>GestureControl</Name>
+    </ProjectReference>
     <ProjectReference Include="..\FingersDance.ViewModel\FingersDance.ViewModels.csproj">
       <Project>{E81BB080-0598-43AC-90CE-54D6570C4E9E}</Project>
       <Name>FingersDance.ViewModels</Name>
--- 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;