diff -r b51a10574e7f -r 594fdedecf7f 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:56:46 2010 +0100 +++ b/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml.cs Thu Feb 11 17:29:23 2010 +0100 @@ -21,13 +21,18 @@ public BookTimeLine() { InitializeComponent(); - + + TimeStripsPanel.SizeChanged += new SizeChangedEventHandler(TimeStripsPanel_SizeChanged); - BookTimeLineSlider.ThumbDragStarted += new EventHandler(TimeSlider_ThumbDragCompleted); - BookTimeLineSlider.ThumbDragCompleted += new EventHandler(TimeSlider_ThumbDragCompleted); + BookTimeLineSlider.MouseLeftButtonUp += new MouseButtonEventHandler(BookTimeLineSlider_MouseLeftButtonUp); //saveAnnotationsButton.Click += new RoutedEventHandler(saveAnnotationsButton_Click); + Commands.AnnotationMaker.NewAnnotationFinished.Executed += new EventHandler(NewAnnotationFinished_Executed); + BookTimeLineSlider.ThumbDragStarted += new EventHandler(TimeSlider_ThumbDragStarted); + BookTimeLineSlider.ThumbDragCompleted += new EventHandler(TimeSlider_ThumbDragCompleted); + + } void saveAnnotationsButton_Click(object sender, RoutedEventArgs e) @@ -49,7 +54,10 @@ { if (_saveVideoViewerState) { + ((BookTimeLineVM)DataContext).ViewModelVideoViewer.Play(); + + } } @@ -67,6 +75,8 @@ private void BookTimeLineSlider_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { Commands.TimeChange.Execute(BookTimeLineSlider.Value,DataContext); + + } private void TimeStripsPanel_SizeChanged(object sender, SizeChangedEventArgs e) @@ -96,8 +106,10 @@ } } int basi = 0; + foreach (List LAnnotation in VM.Annotations) { + LAnnotation.Sort((a, b) => TimeSpan.Compare( b.Duration,a.Duration)); foreach (Annotation Annotation in LAnnotation) { PolemicElementControl pol = new PolemicElementControl(); @@ -118,7 +130,7 @@ int actualTop = (int)Canvas.GetTop(lockedControl); if (basi <= actualTop) { - basi += 10; + basi += 12; } }