diff -r 253f142174ac -r 69a2910ec6f9 client/src/Iri.Modernisation.Controls/ViewModel/ConsultationBookView/ConsultationBookViewVM.cs --- a/client/src/Iri.Modernisation.Controls/ViewModel/ConsultationBookView/ConsultationBookViewVM.cs Mon Dec 14 09:56:55 2009 +0100 +++ b/client/src/Iri.Modernisation.Controls/ViewModel/ConsultationBookView/ConsultationBookViewVM.cs Mon Dec 14 11:25:01 2009 +0100 @@ -284,30 +284,25 @@ } private void InitializeCommands() { - - Commands.VideoViewer.SendPosition.Executed += new EventHandler(SendPosition_Executed); - } + ActualVideoSourceVM.Tick += new EventHandler(ActualVideoSourceVM_Tick); + } - - - void SendPosition_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e) + void ActualVideoSourceVM_Tick(object sender, VideoViewerVMEventArgs e) { - TimeSpan Pos = ((TimeSpan)e.Parameter); + TimeSpan Pos = e.Position; SelectedBookVM.Position = Pos.TotalMilliseconds; if (SelectedIndex.TimerOut < Pos || SelectedIndex.TimerIn > Pos) { - foreach(SegmentIndex Index in SelectedIndex.Chapter.Index) - { - if(Index.TimerIn <= Pos && Index.TimerOut>= Pos) - { - SelectedIndex = Index; - } - - } + foreach (SegmentIndex Index in SelectedIndex.Chapter.Index) + { + if (Index.TimerIn <= Pos && Index.TimerOut >= Pos) + { + SelectedIndex = Index; + } + + } } } - - } }