diff -r 11083c390ce4 -r 96374d03e714 src/FingersDance.Control.Player/UserControlPlayer.xaml.cs --- a/src/FingersDance.Control.Player/UserControlPlayer.xaml.cs Thu Nov 12 16:15:19 2009 +0100 +++ b/src/FingersDance.Control.Player/UserControlPlayer.xaml.cs Thu Nov 12 23:50:31 2009 +0100 @@ -32,6 +32,12 @@ public event EventHandler PlayerOpened; public event EventHandler PlayerStopOrPause; + public double Time + { + get { return gestureControl.time; } + set { gestureControl.time = value; } + } + #region constructors public UserControlPlayer() { @@ -118,8 +124,15 @@ public void GestureDetected(object sender, GestureControl.GestureRoutedEventArgs e) { - Console.WriteLine("gesture detected: " + e.Gesture); - switch (e.Gesture) + + /* + * e.Gesture.Name = Nom de la gesture + * e.Gesture.Start = Valeur de la timeline au début de l'annotation + * e.Gesture.End = Valeur de la timeline à la fin de l'annotation + * + */ + + switch (e.Gesture.Name) { case "TRIGGER": @@ -178,7 +191,6 @@ ButtonPlayPause_ContactDown(null, null); break; default: - //this.TxtGesture.Text = e.Gesture; break; } } @@ -212,6 +224,8 @@ } + /* + private void ButtonPlayPause_Click(object sender, RoutedEventArgs e) { if (!isPlaying)//Play @@ -278,6 +292,8 @@ MediaElementVideo.Position = MediaElementVideo.Position.Add(new TimeSpan(0, 0, 0, -5)); } } + + */ #endregion @@ -308,20 +324,20 @@ { // e.Cursor.Visual is the ContentControl, so its Content is the dragged TimelineAnnotationView AnnotationViewModel annotationDataVM = (AnnotationViewModel)((TimelineAnnotationView)((ContentControl)e.Cursor.Visual).Content).DataContext; - Play_Pause_area.Background = tl.isAnnotationAccepted(annotationDataVM) ? new SolidColorBrush(Colors.Green) : new SolidColorBrush(Colors.Red); + //Play_Pause_area.Background = tl.isAnnotationAccepted(annotationDataVM) ? new SolidColorBrush(Colors.Green) : new SolidColorBrush(Colors.Red); } else { - Play_Pause_area.Background = new SolidColorBrush(Colors.White); + //Play_Pause_area.Background = new SolidColorBrush(Colors.White); } - Play_Pause_area.Opacity = 0.3; + //Play_Pause_area.Opacity = 0.3; } private void Play_Pause_area_DragLeave(object sender, SurfaceDragDropEventArgs e) { //Console.WriteLine("Leave"); - Play_Pause_area.Opacity = 0; + //Play_Pause_area.Opacity = 0; } private void Play_Pause_area_DragOver(object sender, SurfaceDragDropEventArgs e) @@ -332,7 +348,7 @@ private void Play_Pause_area_Drop(object sender, SurfaceDragDropEventArgs e) { //Console.WriteLine("Drop"); - Play_Pause_area.Opacity = 0; + //Play_Pause_area.Opacity = 0; // e.Cursor.Visual is the ContentControl, so its Content is the dragged TimelineAnnotationView AnnotationViewModel annotationDataVM = (AnnotationViewModel)((TimelineAnnotationView)((ContentControl)e.Cursor.Visual).Content).DataContext; int nbSeconds = (int)annotationDataVM.TcBegin;