Update ProductionView
authorMatthieu Totet
Wed, 16 Dec 2009 17:14:38 +0100
changeset 24 c031f1132dde
parent 23 10acb6a11a73
child 25 a9c815025a1b
Update ProductionView
client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml.cs
client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenu.xaml.cs
client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProduction.xaml
client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProduction.xaml.cs
client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml
client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs
client/src/Iri.Modernisation.Controls/View/ProductionView/ProductionView.xaml
client/src/Iri.Modernisation.Controls/View/VideoViewer/VideoViewer.xaml.cs
client/src/Iri.Modernisation.Controls/ViewModel/BookTimeLine/BookTimeLineVM.cs
client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/ProductionTimeLineVM.cs
client/src/Iri.Modernisation.Controls/ViewModel/ProductionView/ProductionViewVM.cs
client/src/Iri.Modernisation.Lang/LangResource.Designer.cs
client/src/Iri.Modernisation.Lang/LangResource.en-US.resx
client/src/Iri.Modernisation.Lang/LangResource.fr-FR.resx
client/src/Iri.Modernisation.Lang/LangResource.resx
client/src/Iri.Modernisation/App.xaml.cs
client/src/Iri.Modernisation/MainPage.xaml.cs
--- a/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml.cs	Mon Dec 14 17:02:03 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml.cs	Wed Dec 16 17:14:38 2009 +0100
@@ -22,7 +22,12 @@
             InitializeComponent();
        
             TimeStripsPanel.SizeChanged += new SizeChangedEventHandler(TimeStripsPanel_SizeChanged);
-            BookTimeLineSlider.MouseLeftButtonUp += Commands.TimeChange.Execute;
+            BookTimeLineSlider.MouseLeftButtonUp += new MouseButtonEventHandler(BookTimeLineSlider_MouseLeftButtonUp); 
+        }
+
+        void BookTimeLineSlider_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
+        {
+            Commands.TimeChange.Execute(BookTimeLineSlider.Value,DataContext);
         }
 		
         void TimeStripsPanel_SizeChanged(object sender, SizeChangedEventArgs e)
--- a/client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenu.xaml.cs	Mon Dec 14 17:02:03 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenu.xaml.cs	Wed Dec 16 17:14:38 2009 +0100
@@ -68,6 +68,7 @@
 
         void MenuClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
         {
+           
            Visibility = Visibility.Visible;
            SelectedElement = (PolemicElement)e.Source;
            textBlock.Text = ((PolemicElement)e.Source).Title;
--- a/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProduction.xaml	Mon Dec 14 17:02:03 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProduction.xaml	Wed Dec 16 17:14:38 2009 +0100
@@ -88,6 +88,6 @@
 				</StackPanel>
 			</StackPanel>
 		</StackPanel>
-		<TextBlock  x:Name="InstructionText"  Text="{Binding Instruction, Mode=OneWay}" TextWrapping="Wrap" FontSize="9.333" HorizontalAlignment="Left" Margin="0,40,0,0" Width="240"/>
+		<TextBlock  x:Name="InstructionText"  Text="{Binding Instruction, Mode=OneWay}" TextWrapping="Wrap" FontSize="9.333" HorizontalAlignment="Left" Margin="0,40,0,0" Width="240" Foreground="White"/>
 	</Grid>
 </UserControl>
\ No newline at end of file
--- a/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProduction.xaml.cs	Mon Dec 14 17:02:03 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProduction.xaml.cs	Wed Dec 16 17:14:38 2009 +0100
@@ -10,6 +10,7 @@
 using Iri.Modernisation.BaseMVVM.Commands;
 using Iri.Modernisation.Controls.ViewModel;
 using Iri.Modernisation.Data.Models;
+using System.Globalization;
 namespace Iri.Modernisation.Controls.View
 {
 	public partial class HeaderProduction : UserControl
@@ -17,6 +18,7 @@
 		public HeaderProduction()
 		{
 			// Required to initialize variables
+            
 			InitializeComponent();
             ModernisationEditionController.Active();
             
@@ -71,12 +73,14 @@
 
             OuvertureEditionController.HeaderProductionPartFinished += new EventHandler<HeaderProductionPartControlerEventArgs>(OuvertureEditionController_HeaderProductionPartFinished);
             OuvertureIndexController.HeaderProductionPartFinished += new EventHandler<HeaderProductionPartControlerEventArgs>(OuvertureIndexController_HeaderProductionPartFinished);
+           
         }
 
         void OuvertureIndexController_HeaderProductionPartSelected(object sender, HeaderProductionPartControlerEventArgs e)
         {
             if (SelectedPart != null)
             {
+                InstructionText.Text = Iri.Modernisation.Lang.LangResource.IndexationMessage.Replace("{0}", "Ouverture");
                 SelectedPart(sender, new HeaderProductionEventArgs(VideoChapterType.Ouverture, true));
             }
         }
@@ -85,6 +89,7 @@
         {
             if (SelectedPart != null)
             {
+                InstructionText.Text = Iri.Modernisation.Lang.LangResource.EditionSecondMessage;
                 SelectedPart(sender, new HeaderProductionEventArgs(VideoChapterType.Ouverture, false));
             }
         }
@@ -93,6 +98,7 @@
         {
             if (SelectedPart != null)
             {
+                InstructionText.Text = Iri.Modernisation.Lang.LangResource.IndexationMessage.Replace("{0}", "Post-Modernité");
                 SelectedPart(sender, new HeaderProductionEventArgs(VideoChapterType.Postmodernite, true));
             }
         }
@@ -101,6 +107,7 @@
         {
             if (SelectedPart != null)
             {
+                InstructionText.Text = Iri.Modernisation.Lang.LangResource.EditionSecondMessage;
                 SelectedPart(sender, new HeaderProductionEventArgs(VideoChapterType.Postmodernite, false));
             }
         }
@@ -109,6 +116,7 @@
         {
             if (SelectedPart != null)
             {
+                InstructionText.Text = Iri.Modernisation.Lang.LangResource.IndexationMessage.Replace("{0}", "Modernité");
                 SelectedPart(sender, new HeaderProductionEventArgs(VideoChapterType.Modernite, true));
             }
         }
@@ -117,6 +125,8 @@
         {
               if (SelectedPart!=null)
            {
+               InstructionText.Text = Iri.Modernisation.Lang.LangResource.EditionSecondMessage;
+           
                 SelectedPart(sender,new HeaderProductionEventArgs(VideoChapterType.Modernite,false));
            }
         }
@@ -125,7 +135,15 @@
         {
            if (SelectedPart!=null)
            {
-                SelectedPart(sender,new HeaderProductionEventArgs(VideoChapterType.Modernisation,true));
+               if (MessageBoxResult.OK == MessageBox.Show("Voulez Vous passer à l'indexation ?", "Question", MessageBoxButton.OKCancel))
+               {
+                   InstructionText.Text = Iri.Modernisation.Lang.LangResource.IndexationMessage.Replace("{0}", "Modernisation");
+                   SelectedPart(sender, new HeaderProductionEventArgs(VideoChapterType.Modernisation, true));
+               }
+               else
+               {
+                   UnselectAll();
+               }
            }
         }
 
@@ -133,6 +151,7 @@
         {
             if (SelectedPart!=null)
            {
+               InstructionText.Text = Iri.Modernisation.Lang.LangResource.EditionFirstMessage;
                 SelectedPart(sender,new HeaderProductionEventArgs(VideoChapterType.Modernisation,false));
            }
         }
@@ -206,12 +225,11 @@
                 FinishedPart(sender, new HeaderProductionEventArgs());
             }
         }
-
-        void HeaderProductionPartSelected(object sender, HeaderProductionPartControlerEventArgs e)
+        private void UnselectAll()
         {
             ModernisationEditionController.UnSelect();
             ModernisationIndexController.UnSelect();
-           
+
             ModerniteEditionController.UnSelect();
             ModerniteIndexController.UnSelect();
 
@@ -220,6 +238,10 @@
 
             OuvertureEditionController.UnSelect();
             OuvertureIndexController.UnSelect();
+        }
+        private void HeaderProductionPartSelected(object sender, HeaderProductionPartControlerEventArgs e)
+        {
+            UnselectAll();
             ((HeaderProductionPartControler)sender).Select();
         }
 
--- a/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml	Mon Dec 14 17:02:03 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml	Wed Dec 16 17:14:38 2009 +0100
@@ -21,16 +21,14 @@
 				<Grid.ColumnDefinitions>
 					<ColumnDefinition/>
 				</Grid.ColumnDefinitions>
-				<Slider x:Name="TimeSlider" Value="{Binding Position}" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" SmallChange="0" />
-				<StackPanel x:Name="VideoTimeStrip" Margin="0,21,0,0" Orientation="Horizontal" Height="32" VerticalAlignment="Top">
+				<Slider x:Name="TimeSlider" Value="{Binding Position,Mode=TwoWay}" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" SmallChange="0" />
+				<StackPanel x:Name="VideoTimeStrip" Margin="0,21,0,0" Orientation="Horizontal" Height="32" VerticalAlignment="Top" HorizontalAlignment="Left">
 					<!--<StackPanel Orientation="Horizontal" x:Name="ModenisationVideoTimeStrip"></StackPanel>
 					<StackPanel Orientation="Horizontal" x:Name="ModeniteVideoTimeStrip"></StackPanel>
 					<StackPanel Orientation="Horizontal" x:Name="PostModerniteVideoTimeStrip"></StackPanel>
 					<StackPanel Orientation="Horizontal" x:Name="OuvertureVideoTimeStrip"></StackPanel>-->
 				</StackPanel>
-				<StackPanel x:Name="AnnotationTimeStrip" Margin="0,57,0,53" Orientation="Horizontal" d:LayoutOverrides="VerticalAlignment" >
-				
-				</StackPanel>
+				<StackPanel x:Name="AnnotationTimeStrip" Margin="0,57,0,53" Orientation="Horizontal" d:LayoutOverrides="VerticalAlignment" HorizontalAlignment="Left" />
 			</Grid>
 		</ScrollViewer>
 	</StackPanel>
--- a/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs	Mon Dec 14 17:02:03 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs	Wed Dec 16 17:14:38 2009 +0100
@@ -11,6 +11,7 @@
 using Iri.Modernisation.Data.Models;
 using Iri.Modernisation.Controls.ViewModel;
 using System.Collections.ObjectModel;
+using System.Globalization;
 namespace Iri.Modernisation.Controls.View
 {
   
@@ -20,7 +21,7 @@
         {
             get
             {
-                return 0.0001;
+                return 0.0002;
             }
         }
 		public ProductionTimeLine()
@@ -30,9 +31,22 @@
             Commands.ProductionTimeLine.EditorPartSelected.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(EditorPartSelected_Executed);
             Commands.ProductionView.VideoRecordUpdated.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(VideoRecordUpdated_Executed);
             Commands.Action.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(Action_Executed);
-          
+            TimeSlider.MouseLeftButtonUp += new MouseButtonEventHandler(TimeSlider_MouseLeftButtonUp);
+            //TimeSlider.ValueChanged += new RoutedPropertyChangedEventHandler<double>(TimeSlider_ValueChanged);
+            TimeSlider.Maximum = TimeSlider.ActualWidth / ProductionTimeLine.ScaleTime;
 		}
 
+        void TimeSlider_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
+        {
+            Commands.TimeChange.Execute(TimeSlider.Value,DataContext);
+        }
+
+        void TimeSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
+        {
+            DeleteSequenceButton.Content = TimeSpan.FromMilliseconds(TimeSlider.Value);
+           
+        }
+
         void EditorPartSelected_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
         {
             UpdateElements();
@@ -51,6 +65,7 @@
         private double _sumOfLengh=0;
         public void UpdateElements()
         {
+            TimeSlider.Maximum = TimeSlider.ActualWidth / ProductionTimeLine.ScaleTime;
             if (DataContext != null)
             {
                 if (((ProductionTimeLineVM)this.DataContext).SelectedChapter != -1)
@@ -176,6 +191,8 @@
         private void AddSequenceButton_Click(object sender, System.Windows.RoutedEventArgs e)
         {
             AddSequenceButton.Content = ((ProductionTimeLineVM)DataContext).TotalBookDuration;
+           
+           
         }
 
         
--- a/client/src/Iri.Modernisation.Controls/View/ProductionView/ProductionView.xaml	Mon Dec 14 17:02:03 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionView/ProductionView.xaml	Wed Dec 16 17:14:38 2009 +0100
@@ -16,9 +16,9 @@
     	<View:ProductionTimeLine x:Name="ProductionTimeLineElement" Height="176" VerticalAlignment="Bottom" DataContext="{Binding ViewModelProductionTimeLine}"/>
     	<View:ProductionEditor DataContext="{Binding ViewModelProductionEditor}" Margin="272,115,0,0" HorizontalAlignment="Left" Height="381" VerticalAlignment="Top"/>
     	<View:VideoViewer DataContext="{Binding ViewModelMasterVideoViewer}" HorizontalAlignment="Right" Margin="0,115,8,204" Width="404"/>
-    	<StackPanel x:Name="RecordsPanel" HorizontalAlignment="Left" Margin="8,240,0,216" Width="248">
+    	<StackPanel x:Name="RecordsPanel" HorizontalAlignment="Left" Margin="8,288,0,192" Width="248">
     		<TextBlock Style="{StaticResource CommonTextBlock}" Text="{Binding RecordsLabel, Source={StaticResource LangLabels}}" x:Name="RecordLabel" TextWrapping="Wrap"/>
-    		<ListBox SelectedItem="{Binding SelectedVideoSequence,Mode=TwoWay}" x:Name="RecordsList" ItemsSource="{Binding RecordedVideoSequences}" Height="168">
+    		<ListBox SelectedItem="{Binding SelectedVideoSequence,Mode=TwoWay}" x:Name="RecordsList" ItemsSource="{Binding RecordedVideoSequences}" Height="152">
 				<ListBox.ItemTemplate>
 					<DataTemplate>
 						<StackPanel Orientation="Horizontal">
--- a/client/src/Iri.Modernisation.Controls/View/VideoViewer/VideoViewer.xaml.cs	Mon Dec 14 17:02:03 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/VideoViewer/VideoViewer.xaml.cs	Wed Dec 16 17:14:38 2009 +0100
@@ -50,9 +50,11 @@
 
         void GoToTime_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
         {
-            if(e.Source == DataContext)
+            if (e.Source == DataContext && e.Source != null)
             {
-               VideoScreen.Position = ((TimeSpan)e.Parameter);
+                VideoScreen.Pause();
+               VideoScreen.Position = new TimeSpan(((TimeSpan)e.Parameter).Ticks);
+              
             }
         }
 
--- a/client/src/Iri.Modernisation.Controls/ViewModel/BookTimeLine/BookTimeLineVM.cs	Mon Dec 14 17:02:03 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/BookTimeLine/BookTimeLineVM.cs	Wed Dec 16 17:14:38 2009 +0100
@@ -291,9 +291,11 @@
         void TimeChange_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
         {
           //  Position = ((Slider)e.Parameter).Value;
-           // Commands.VideoViewer.Pause.Execute();
-
-            ViewModelVideoViewer.GoTo(TimeSpan.FromMilliseconds(((Slider)e.Parameter).Value));
+         // Commands.VideoViewer.Pause.Execute();
+            if(e.Source == this)
+            {
+                ViewModelVideoViewer.GoTo(TimeSpan.FromMilliseconds(((double)e.Parameter)));
+            }
             //Commands.GoToTime.Execute(((Slider)e.Parameter).Value);
             
            // Commands.VideoViewer.Play.Execute();
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/ProductionTimeLineVM.cs	Mon Dec 14 17:02:03 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/ProductionTimeLineVM.cs	Wed Dec 16 17:14:38 2009 +0100
@@ -96,6 +96,43 @@
             }
         }
 
+
+        private VideoSequence _actualVideoSequence;
+        public VideoSequence ActualVideoSequence
+        {
+            get
+            {
+                return _actualVideoSequence;
+            }
+            set
+            {
+                _actualVideoSequence = value;
+                OnPropertyChanged("ActualVideoSequence");
+            }
+        }
+
+     
+        public List<VideoSequence> TimeLine
+        {
+            get
+            {
+                List<VideoSequence> _tmp = new List<VideoSequence>();
+                TimeSpan temp = TimeSpan.Zero;
+                foreach (ObservableCollection<VideoSequence> Ocvs in ListVideoSequences)
+                {
+                    foreach (VideoSequence Vs in Ocvs)
+                    {
+
+                        Vs.TimerIn = temp;
+                        _tmp.Add(Vs);
+                        temp += Vs.Duration;
+                    
+                    }
+                }
+                return _tmp;
+            }
+        }
+
         private int _selectedChapter=0;
         public int SelectedChapter
         {
@@ -109,7 +146,19 @@
                 OnPropertyChanged("SelectedChapter");
             }
         }
-
+        private VideoViewerVM _videoViewerVM;
+        public VideoViewerVM ViewModelVideoViewer
+        {
+            get
+            {
+                return _videoViewerVM;
+            }
+            set
+            {
+                _videoViewerVM = value;
+                OnPropertyChanged("ViewModelVideoViewer");
+            }
+        }
 
         private double _position;
         public double Position
@@ -121,6 +170,7 @@
             set
             {
                 _position = value;
+             
                 OnPropertyChanged("Position");
             }
         }
@@ -178,6 +228,7 @@
             Commands.ProductionTimeLine.EditorPartSelected.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(EditorPartSelected_Executed);
             Commands.ProductionTimeLine.EditorPartFinished.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(EditorPartFinished_Executed);
             Commands.ProductionView.ClickAddIndex.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(ClickAddIndex_Executed);
+            Commands.TimeChange.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(TimeChange_Executed);
             _listVideoSequences[0].CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(SelectedVideoSequences_CollectionChanged);
             _listVideoSequences[1].CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(SelectedVideoSequences_CollectionChanged);
             _listVideoSequences[2].CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(SelectedVideoSequences_CollectionChanged);
@@ -196,6 +247,31 @@
             _listSegmentIndex[3].CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(SelectedVideoSequences_CollectionChanged);
         }
 
+        void TimeChange_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+        {
+            double newValue = ((double)e.Parameter);
+            if(e.Source == this)
+            {
+                if (ActualVideoSequence.TimerIn.TotalMilliseconds > newValue || ActualVideoSequence.TimerOut.TotalMilliseconds < newValue)
+                {
+                    foreach (VideoSequence Vs in TimeLine)
+                    {
+                        if (Vs.TimerIn.TotalMilliseconds <= newValue && Vs.TimerOut.TotalMilliseconds > newValue)
+                        {
+                            ActualVideoSequence = Vs;
+                            ViewModelVideoViewer.GoTo(TimeSpan.FromMilliseconds(newValue) - Vs.TimerIn +Vs.BeginTrim);
+                        }
+                    }
+                }
+                else
+                {
+                    ViewModelVideoViewer.GoTo(TimeSpan.FromMilliseconds(newValue) - ActualVideoSequence.TimerIn);
+                }
+                
+               
+            }
+        }
+
         void ClickAddIndex_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
         {
             if(IsIndexing)
@@ -229,6 +305,7 @@
 
         void SelectedVideoSequences_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
         {
+            
             OnPropertyChanged("TotalBookDuration");
             Commands.ProductionView.VideoRecordUpdated.Execute();
         }
@@ -251,5 +328,17 @@
             IsIndexing = ((HeaderProductionEventArgs)e.Source).IsIndexPart;
         }
 
+        public event EventHandler<ProductionTimeLineVMEventArgs> SwitchVideo;
+
+    }
+    public class ProductionTimeLineVMEventArgs : EventArgs
+    {
+        public VideoSequence VideoSequence{get;set;}
+        public TimeSpan BeginAt{get;set;}
+        public ProductionTimeLineVMEventArgs(VideoSequence videoSequence,TimeSpan beginAt)
+        {
+            VideoSequence = videoSequence;
+            BeginAt = beginAt;
+        }
     }
 }
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ProductionView/ProductionViewVM.cs	Mon Dec 14 17:02:03 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ProductionView/ProductionViewVM.cs	Wed Dec 16 17:14:38 2009 +0100
@@ -104,6 +104,7 @@
                 OnPropertyChanged("ViewModelMasterVideoViewer");
             }
         }
+        
         //SelectedChapter
         public ProductionViewVM()
         {
@@ -112,6 +113,9 @@
             ViewModelProductionTimeLine = new ProductionTimeLineVM();
             ViewModelProductionEditor = new ProductionEditorVM();
             ViewModelMasterVideoViewer = new VideoViewerVM(true, false);
+           // ViewModelMasterVideoViewer.Source = Application.Current.Host.Source.Host.ToString() + "/video.mp4";
+            
+            ViewModelProductionTimeLine.ViewModelVideoViewer = ViewModelMasterVideoViewer;
             Commands.ProductionView.ClickAddSelectedRecord.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(ClickAddSelectedRecord_Executed);
             Random rndNumbers = new Random();
             for (int i = 0; i < 10; i++)
@@ -125,13 +129,27 @@
                     EndTrim = new TimeSpan(0, 0, 0),
                 });
             }
+            ViewModelProductionTimeLine.SwitchVideo += new EventHandler<ProductionTimeLineVMEventArgs>(ViewModelProductionTimeLine_SwitchVideo);   
             ViewModelMasterVideoViewer.Tick += new EventHandler<VideoViewerVMEventArgs>(ViewModelMasterVideoViewer_Tick);
            
         }
 
+        void ViewModelProductionTimeLine_SwitchVideo(object sender, ProductionTimeLineVMEventArgs e)
+        {
+            ViewModelMasterVideoViewer.Source = (e.VideoSequence.Path);
+            ViewModelMasterVideoViewer.GoTo(e.BeginAt);
+        }
+
         void ViewModelMasterVideoViewer_Tick(object sender, VideoViewerVMEventArgs e)
         {
-            ViewModelProductionTimeLine.Position = e.Position.TotalMilliseconds;
+            double newPos = ViewModelProductionTimeLine.ActualVideoSequence.TimerIn.TotalMilliseconds+e.Position.TotalMilliseconds;
+            if (ViewModelProductionTimeLine.ActualVideoSequence.TimerOut.TotalMilliseconds <= newPos)
+            {
+                ViewModelProductionTimeLine.ActualVideoSequence = ViewModelProductionTimeLine.TimeLine[ViewModelProductionTimeLine.TimeLine.IndexOf(ViewModelProductionTimeLine.ActualVideoSequence) + 1];
+                ViewModelMasterVideoViewer.Source = ViewModelProductionTimeLine.ActualVideoSequence.Path;
+                ViewModelMasterVideoViewer.GoTo(TimeSpan.Zero);
+            }
+            ViewModelProductionTimeLine.Position = newPos;
         }
 
         void ClickAddSelectedRecord_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
@@ -140,8 +158,15 @@
             {
                 if (!ViewModelProductionTimeLine.IsIndexing)
                 {
-                    if(SelectedVideoSequence!=null)
-                    ViewModelProductionTimeLine.SelectedVideoSequences.Add(new VideoSequence(SelectedVideoSequence));
+                    if (SelectedVideoSequence != null)
+                    {
+                        ViewModelMasterVideoViewer.Source = SelectedVideoSequence.Path;
+
+                        VideoSequence newVideo = new VideoSequence(SelectedVideoSequence);
+                        ViewModelProductionTimeLine.ActualVideoSequence = newVideo;
+                            ViewModelProductionTimeLine.SelectedVideoSequences.Add(newVideo);
+                            ViewModelProductionTimeLine.Position = ViewModelProductionTimeLine.TimeLine[ViewModelProductionTimeLine.TimeLine.Count - 1].TimerIn.TotalMilliseconds;
+                    }
                 }
                
             }
--- a/client/src/Iri.Modernisation.Lang/LangResource.Designer.cs	Mon Dec 14 17:02:03 2009 +0100
+++ b/client/src/Iri.Modernisation.Lang/LangResource.Designer.cs	Wed Dec 16 17:14:38 2009 +0100
@@ -29,7 +29,8 @@
         private static global::System.Globalization.CultureInfo resourceCulture;
         
         [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        public LangResource() {
+        public LangResource()
+        {
         }
         
         /// <summary>
@@ -133,6 +134,24 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to EditionFirstMessage.
+        /// </summary>
+        public static string EditionFirstMessage {
+            get {
+                return ResourceManager.GetString("EditionFirstMessage", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to EditionSecondMessage.
+        /// </summary>
+        public static string EditionSecondMessage {
+            get {
+                return ResourceManager.GetString("EditionSecondMessage", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to EnrichementLabel.
         /// </summary>
         public static string EnrichmentLabel {
@@ -142,6 +161,24 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to EnrichmentMessage.
+        /// </summary>
+        public static string EnrichmentMessage {
+            get {
+                return ResourceManager.GetString("EnrichmentMessage", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to IndexationMessage.
+        /// </summary>
+        public static string IndexationMessage {
+            get {
+                return ResourceManager.GetString("IndexationMessage", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to IndexingLabel.
         /// </summary>
         public static string IndexingLabel {
@@ -223,6 +260,15 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to OpenProductionMessage.
+        /// </summary>
+        public static string OpenProductionMessage {
+            get {
+                return ResourceManager.GetString("OpenProductionMessage", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to PersonalChutierTitle.
         /// </summary>
         public static string PersonalChutierTitle {
@@ -268,6 +314,15 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to PublicationValidMessage.
+        /// </summary>
+        public static string PublicationValidMessage {
+            get {
+                return ResourceManager.GetString("PublicationValidMessage", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to RecordsLabel.
         /// </summary>
         public static string RecordsLabel {
--- a/client/src/Iri.Modernisation.Lang/LangResource.en-US.resx	Mon Dec 14 17:02:03 2009 +0100
+++ b/client/src/Iri.Modernisation.Lang/LangResource.en-US.resx	Wed Dec 16 17:14:38 2009 +0100
@@ -141,9 +141,21 @@
   <data name="EditingLabel" xml:space="preserve">
     <value>Editing</value>
   </data>
+  <data name="EditionFirstMessage" xml:space="preserve">
+    <value>EditionFirstMessageEN</value>
+  </data>
+  <data name="EditionSecondMessage" xml:space="preserve">
+    <value>EditionSecondMessageEN</value>
+  </data>
   <data name="EnrichmentLabel" xml:space="preserve">
     <value>Enrichment</value>
   </data>
+  <data name="EnrichmentMessage" xml:space="preserve">
+    <value>EnrichmentMessageEN</value>
+  </data>
+  <data name="IndexationMessage" xml:space="preserve">
+    <value>IndexationMessageEN</value>
+  </data>
   <data name="IndexingLabel" xml:space="preserve">
     <value>Indexing</value>
   </data>
@@ -171,6 +183,9 @@
   <data name="OkLabel" xml:space="preserve">
     <value>Ok</value>
   </data>
+  <data name="OpenProductionMessage" xml:space="preserve">
+    <value>OpenProductionMessageEN</value>
+  </data>
   <data name="PersonalChutierTitle" xml:space="preserve">
     <value>My Chutier</value>
   </data>
@@ -186,6 +201,9 @@
   <data name="ProductionMenuUpdateLabel" xml:space="preserve">
     <value>Update</value>
   </data>
+  <data name="PublicationValidMessage" xml:space="preserve">
+    <value>PublicationValidMessageEN</value>
+  </data>
   <data name="RecordsLabel" xml:space="preserve">
     <value>Records</value>
   </data>
--- a/client/src/Iri.Modernisation.Lang/LangResource.fr-FR.resx	Mon Dec 14 17:02:03 2009 +0100
+++ b/client/src/Iri.Modernisation.Lang/LangResource.fr-FR.resx	Wed Dec 16 17:14:38 2009 +0100
@@ -141,9 +141,27 @@
   <data name="EditingLabel" xml:space="preserve">
     <value>Edition</value>
   </data>
+  <data name="EditionFirstMessage" xml:space="preserve">
+    <value>Le contenu vidéo s'élabore chapitre par chapitre. Vous pourrez passer au chapitre suivant seulement lorsque vous aurez terminé la production du premier chapitre. Ci-dessous, vous pouvez vous enregistrer et ajouter à votre chapitre les annotations vidéo quoi se trouvent dans votre chutier personnel.
+
+Lorsque vous êtes satisfait de votre chapitre, passez à son indexation ou passez à la production du chapitre suivant. Attention: vous ne pourrez plus modifier le contenu vidéo du chapitre une fois celui-ci validé. Indexer ce chapitre / Chapitre suivant</value>
+  </data>
+  <data name="EditionSecondMessage" xml:space="preserve">
+    <value>Lorsque vous êtes satisfait de votre chapitre, passez à son indexation  ou passez à la production du chapitre suivant. Attention: vous ne pourrez plus modifier le contenu vidéo du chapitre une fois celui-ci validé. Indexer ce chapitre / Chapitre suivant</value>
+  </data>
   <data name="EnrichmentLabel" xml:space="preserve">
     <value>Enrichissement</value>
   </data>
+  <data name="EnrichmentMessage" xml:space="preserve">
+    <value>Le chapitre Modernité est maintenant indexé. Vous avez la possibilité de créer des liens polémiques vers des contenus existants, que ce soient d'autres séquences du corpus, ou des annotations de contributeurs.
+
+La publication de votre vidéo-livre validera cette étape. Vous pouvez à tout moment passer au chapitre suivant et revenir à cette étape de contextualisation.</value>
+  </data>
+  <data name="IndexationMessage" xml:space="preserve">
+    <value>L’entretien du chapitre {0} est maintenant prêt à être indexé. C’est une étape nécessaire à la publication de votre vidéo-livre qui consiste à le rendre visible parmi le corpus des entretiens et accessible par le moteur de recherche. L'indexation de votre entretien consiste à segmenter votre discours, à poser des marqueurs et à attribuer aux segments et marqueurs un titre, une description et des mots-clés. Votre indexation peut être descriptive ou interprétative, c’est un espace supplémentaire pour annoter votre entretien, le justifier, le référencer.
+
+Vous pouvez à tout moment passer au chapitre suivant et revenir à cette étape d'indexation. Pour démarrer l'indexation, cliquez ici.</value>
+  </data>
   <data name="IndexingLabel" xml:space="preserve">
     <value>Indexation</value>
   </data>
@@ -171,6 +189,9 @@
   <data name="OkLabel" xml:space="preserve">
     <value>Ok</value>
   </data>
+  <data name="OpenProductionMessage" xml:space="preserve">
+    <value>Vous êtes sur l'interface de production de votre vidéo-livre. Un vidéo-livre est composé des quatre chapitres Modernité Modernisation Postmodernité et Ouverture. Le processus de production pour chaque chapitre est le même : éditez le contenu vidéo, indexez le chapitre et enrichissez vos séquences. Pour commencer cliquez sur suivant.</value>
+  </data>
   <data name="PersonalChutierTitle" xml:space="preserve">
     <value>Mes Annotations</value>
   </data>
@@ -186,6 +207,9 @@
   <data name="ProductionMenuUpdateLabel" xml:space="preserve">
     <value>Modifier</value>
   </data>
+  <data name="PublicationValidMessage" xml:space="preserve">
+    <value>Etes vous sûr de vouloir publiez votre vidéo-livre ? Aucune modification ne sera possible ultérieurement. Confirmer / Annuler</value>
+  </data>
   <data name="RecordsLabel" xml:space="preserve">
     <value>Enregistrements</value>
   </data>
--- a/client/src/Iri.Modernisation.Lang/LangResource.resx	Mon Dec 14 17:02:03 2009 +0100
+++ b/client/src/Iri.Modernisation.Lang/LangResource.resx	Wed Dec 16 17:14:38 2009 +0100
@@ -141,9 +141,21 @@
   <data name="EditingLabel" xml:space="preserve">
     <value>EditingLabel</value>
   </data>
+  <data name="EditionFirstMessage" xml:space="preserve">
+    <value>EditionFirstMessage</value>
+  </data>
+  <data name="EditionSecondMessage" xml:space="preserve">
+    <value>EditionSecondMessage</value>
+  </data>
   <data name="EnrichmentLabel" xml:space="preserve">
     <value>EnrichementLabel</value>
   </data>
+  <data name="EnrichmentMessage" xml:space="preserve">
+    <value>EnrichmentMessage</value>
+  </data>
+  <data name="IndexationMessage" xml:space="preserve">
+    <value>IndexationMessage</value>
+  </data>
   <data name="IndexingLabel" xml:space="preserve">
     <value>IndexingLabel</value>
   </data>
@@ -171,6 +183,9 @@
   <data name="OkLabel" xml:space="preserve">
     <value>OkLabel</value>
   </data>
+  <data name="OpenProductionMessage" xml:space="preserve">
+    <value>OpenProductionMessage</value>
+  </data>
   <data name="PersonalChutierTitle" xml:space="preserve">
     <value>PersonalChutierTitle</value>
   </data>
@@ -186,6 +201,9 @@
   <data name="ProductionMenuUpdateLabel" xml:space="preserve">
     <value>ProductionMenuUpdateLabel</value>
   </data>
+  <data name="PublicationValidMessage" xml:space="preserve">
+    <value>PublicationValidMessage</value>
+  </data>
   <data name="RecordsLabel" xml:space="preserve">
     <value>RecordsLabel</value>
   </data>
--- a/client/src/Iri.Modernisation/App.xaml.cs	Mon Dec 14 17:02:03 2009 +0100
+++ b/client/src/Iri.Modernisation/App.xaml.cs	Wed Dec 16 17:14:38 2009 +0100
@@ -29,9 +29,7 @@
 
         void FlipView_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
         {
-            CultureInfo culture = new CultureInfo("en-US");
-            Thread.CurrentThread.CurrentCulture = culture;
-            Thread.CurrentThread.CurrentUICulture = culture;
+         
            
             this.RootVisual = new MainPage();
         }
--- a/client/src/Iri.Modernisation/MainPage.xaml.cs	Mon Dec 14 17:02:03 2009 +0100
+++ b/client/src/Iri.Modernisation/MainPage.xaml.cs	Wed Dec 16 17:14:38 2009 +0100
@@ -26,7 +26,7 @@
         {
             Commands.Initialize();
             InitializeComponent();
-    
+       
            MainElement.DataContext = new MainVM(new List<VideoBook>());
            
         }