# HG changeset patch
# User totetm <>
# Date 1265810206 -3600
# Node ID b51a10574e7ffb0f0712f7825da2da5bc7d42c16
# Parent 581829b5ddd9a9a4469cc827197573990976f322
LeftClick on an element in BookTimeLine set time at begining of the element.
diff -r 581829b5ddd9 -r b51a10574e7f client/src/Iri.Modernisation.BaseMVVM/Commands/Commands.cs
--- a/client/src/Iri.Modernisation.BaseMVVM/Commands/Commands.cs Wed Feb 10 14:09:58 2010 +0100
+++ b/client/src/Iri.Modernisation.BaseMVVM/Commands/Commands.cs Wed Feb 10 14:56:46 2010 +0100
@@ -553,8 +553,14 @@
static BookTimeLine()
{
SaveAnnotations = new Command("SaveAnnotations");
+ LeftClickOnElement = new Command("LeftClickOnElement");
}
+ public static Command LeftClickOnElement
+ {
+ get;
+ private set;
+ }
public static Command SaveAnnotations
{
get;
diff -r 581829b5ddd9 -r b51a10574e7f client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml
--- a/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml Wed Feb 10 14:09:58 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml Wed Feb 10 14:56:46 2010 +0100
@@ -21,7 +21,7 @@
-
+
diff -r 581829b5ddd9 -r b51a10574e7f client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml.cs
--- a/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml.cs Wed Feb 10 14:09:58 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml.cs Wed Feb 10 14:56:46 2010 +0100
@@ -26,7 +26,7 @@
BookTimeLineSlider.ThumbDragStarted += new EventHandler(TimeSlider_ThumbDragCompleted);
BookTimeLineSlider.ThumbDragCompleted += new EventHandler(TimeSlider_ThumbDragCompleted);
BookTimeLineSlider.MouseLeftButtonUp += new MouseButtonEventHandler(BookTimeLineSlider_MouseLeftButtonUp);
- saveAnnotationsButton.Click += new RoutedEventHandler(saveAnnotationsButton_Click);
+ //saveAnnotationsButton.Click += new RoutedEventHandler(saveAnnotationsButton_Click);
Commands.AnnotationMaker.NewAnnotationFinished.Executed += new EventHandler(NewAnnotationFinished_Executed);
}
@@ -92,6 +92,7 @@
double timeleft = (double)((Index.TimerIn.TotalMilliseconds / BookTimeLineVM.ratioPixMs) * ScaleTimeLine.Value);
Canvas.SetLeft(pol,timeleft);
pol.Width = (Index.Duration.TotalMilliseconds / BookTimeLineVM.ratioPixMs) * ScaleTimeLine.Value;
+ pol.MouseLeftButtonUp += new MouseButtonEventHandler(Element_MouseLeftButtonUp);
}
}
int basi = 0;
@@ -130,12 +131,22 @@
// pol.Width = (Annotation.Duration.TotalMilliseconds * ScaleTimeLine.Value) / VM.TotalDuration;
pol.Width = (Annotation.Duration.TotalMilliseconds / BookTimeLineVM.ratioPixMs)* ScaleTimeLine.Value;
BookTimeLineAnnotationPanel.Children.Add(pol);
+ pol.MouseLeftButtonUp += new MouseButtonEventHandler(Element_MouseLeftButtonUp);
basi = 0;
}
}
BookTimeLineElementPanel.UpdateLayout();
}
+ void Element_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
+ {
+ PolemicElementVM VMPolemicElement = ((PolemicElementVM)((PolemicElementControl)sender).DataContext);
+
+ Commands.BookTimeLine.LeftClickOnElement.Execute(VMPolemicElement.TimerIn, VMPolemicElement);
+
+
+ }
+
diff -r 581829b5ddd9 -r b51a10574e7f client/src/Iri.Modernisation.Controls/ViewModel/ConsultationView/ConsultationViewVM.cs
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ConsultationView/ConsultationViewVM.cs Wed Feb 10 14:09:58 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ConsultationView/ConsultationViewVM.cs Wed Feb 10 14:56:46 2010 +0100
@@ -120,6 +120,17 @@
Commands.ConsultMenu.ClickBook.Executed += new EventHandler(ClickBook_Executed);
Commands.PolemicElement.SelectPolemicElement.Executed += new EventHandler(SelectPolemicElement_Executed);
Commands.AnnotationMaker.NewAnnotationFinished.Executed += new EventHandler(NewAnnotationFinished_Executed);
+ Commands.BookTimeLine.LeftClickOnElement.Executed += new EventHandler(LeftClickOnElement_Executed);
+ }
+
+ void LeftClickOnElement_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ {
+ TimeSpan TimeToGo = (TimeSpan)e.Parameter;
+ PolemicElementVM ClickedElement = (PolemicElementVM)e.Source;
+ if(ConsultationBookViewContextMenu.SelectedBook == ClickedElement.Chapter.Book)
+ {
+ ConsultationBookViewContextMenu.ActualVideoSourceVM.GoTo(TimeToGo);
+ }
}
void NewAnnotationFinished_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
diff -r 581829b5ddd9 -r b51a10574e7f client/test/FranceCulture/FranceCulture/FranceCulture.Web/Content/FranceInterENMI29.ldt
--- a/client/test/FranceCulture/FranceCulture/FranceCulture.Web/Content/FranceInterENMI29.ldt Wed Feb 10 14:09:58 2010 +0100
+++ b/client/test/FranceCulture/FranceCulture/FranceCulture.Web/Content/FranceInterENMI29.ldt Wed Feb 10 14:56:46 2010 +0100
@@ -4,12 +4,12 @@
-
-
+
+
Emission France Culture
-
+
A
A
@@ -20,11 +20,11 @@
-
+
Emission France Culture
-
+
B
B
@@ -35,6 +35,51 @@
+
+ Emission France Culture
+
+
+
+ aa
+ aaa
+
+
+
+ aa
+
+
+
+
+
+ Emission France Culture
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Emission France Culture
+
+
+
+ aa
+ aaa
+
+
+
+ aaa
+
+
+
+
@@ -42,6 +87,9 @@
+
+
+
\ No newline at end of file