--- 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<EventArgs>(TimeSlider_ThumbDragCompleted);
BookTimeLineSlider.ThumbDragCompleted += new EventHandler<EventArgs>(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<SLExtensions.Input.ExecutedEventArgs>(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);
+
+
+ }
+