client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/ProductionTimeLineVM.cs
changeset 17 0e4e63f6f567
parent 0 249d70e7b32d
child 18 66911d0f0eb6
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/ProductionTimeLineVM.cs	Thu Dec 03 16:05:43 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/ProductionTimeLineVM.cs	Thu Dec 03 16:05:57 2009 +0100
@@ -11,13 +11,27 @@
 using Iri.Modernisation.Data.Models;
 using Iri.Modernisation.BaseMVVM.Commands;
 using Iri.Modernisation.BaseMVVM.ViewModel;
+using Iri.Modernisation.Controls.View;
 using System.Collections.Generic;
 namespace Iri.Modernisation.Controls.ViewModel
 {
     public class ProductionTimeLineVM : BaseMVVM.ViewModel.ViewModel
     {
 
-     
+
+        private bool _isIndexing;
+        public bool IsIndexing
+        {
+            get
+            {
+                return _isIndexing;
+            }
+            set
+            {
+                _isIndexing = value;
+                OnPropertyChanged("IsIndexing");
+            }
+        }
 
         private VideoBook _newBook;
         private List<VideoSequence>[] _listVideoSequences = new List<VideoSequence>[4];
@@ -34,6 +48,24 @@
                 OnPropertyChanged("SelectedVideoSequences");
             }
         }
+    
+        public VideoChapter[] Chapters
+        {
+            get
+            {
+                return _newBook.Chapters;
+            }
+          
+        
+        }
+        public VideoChapter SelectedBookChapter
+        {
+            get
+            {
+                return _newBook.Chapters[SelectedChapter];
+            }
+        }
+
         private int _selectedChapter=0;
         public int SelectedChapter
         {
@@ -65,9 +97,34 @@
             }
         }
 
+        private VideoChapterType _selectedChapterType;
+        public VideoChapterType SelectedChapterType
+        {
+            get
+            {
+                return _selectedChapterType;
+            }
+            set
+            {
+                _selectedChapterType = value;
+                OnPropertyChanged("SelectedChapterType");
+            }
+        }
+ 
+      
         public ProductionTimeLineVM()
         {
             _newBook = new VideoBook();
+            
+            
+            Commands.ProductionTimeLine.EditorPartSelected.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(EditorPartSelected_Executed);
+       
+            }
+
+        void EditorPartSelected_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+        {
+            SelectedChapterType = ((HeaderProductionEventArgs)e.Source).ChapterType ;
+            IsIndexing = ((HeaderProductionEventArgs)e.Source).IsIndexPart;
         }
     }
 }