# HG changeset patch
# User cavaliet
# Date 1258460422 -3600
# Node ID 2948b34324bb039eb4f13fbcc190e8b597d1c424
# Parent e15e7110ef6d9af9aa9664a7bf1ce13243506bba
first step of adding annotation from a recognised gesture.
diff -r e15e7110ef6d -r 2948b34324bb src/FingersDance.Control.SyncSource/FingersDance.Control.SyncSource.csproj
--- a/src/FingersDance.Control.SyncSource/FingersDance.Control.SyncSource.csproj Mon Nov 16 18:06:15 2009 +0100
+++ b/src/FingersDance.Control.SyncSource/FingersDance.Control.SyncSource.csproj Tue Nov 17 13:20:22 2009 +0100
@@ -148,6 +148,10 @@
{EAF384DB-2AE4-4132-839D-60F9DAFDEAD8}
FingersDance.Data
+
+ {99A9037F-5431-44DD-BCE9-ED60670DEBC1}
+ GestureControl
+
diff -r e15e7110ef6d -r 2948b34324bb src/FingersDance.Control.SyncSource/UserControlSyncSource.xaml.cs
--- a/src/FingersDance.Control.SyncSource/UserControlSyncSource.xaml.cs Mon Nov 16 18:06:15 2009 +0100
+++ b/src/FingersDance.Control.SyncSource/UserControlSyncSource.xaml.cs Tue Nov 17 13:20:22 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 e15e7110ef6d -r 2948b34324bb src/FingersDance.Control.TimeLine/FingersDance.Control.TimeLine.csproj
--- a/src/FingersDance.Control.TimeLine/FingersDance.Control.TimeLine.csproj Mon Nov 16 18:06:15 2009 +0100
+++ b/src/FingersDance.Control.TimeLine/FingersDance.Control.TimeLine.csproj Tue Nov 17 13:20:22 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 e15e7110ef6d -r 2948b34324bb src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs
--- 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;