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); + + + } +