client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/ProductionTimeLineVM.cs
changeset 23 10acb6a11a73
parent 20 c2dd8119a6c1
child 24 c031f1132dde
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/ProductionTimeLineVM.cs	Mon Dec 14 11:25:01 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/ProductionTimeLineVM.cs	Mon Dec 14 17:02:03 2009 +0100
@@ -64,7 +64,21 @@
                 OnPropertyChanged("SelectedVideoSequences");
             }
         }
-    
+        public TimeSpan TotalBookDuration
+        {
+            get
+            {
+                TimeSpan temp = TimeSpan.Zero;
+                foreach (ObservableCollection<VideoSequence> Ocvs in _listVideoSequences)
+                {
+                    foreach (VideoSequence Vs in Ocvs)
+                    {
+                        temp += Vs.Duration;
+                    }
+                }
+                return temp;
+            }
+        }
         public VideoChapter[] Chapters
         {
             get
@@ -97,6 +111,19 @@
         }
 
 
+        private double _position;
+        public double Position
+        {
+            get
+            {
+                return _position;
+            }
+            set
+            {
+                _position = value;
+                OnPropertyChanged("Position");
+            }
+        }
 
         private ObservableCollection<SegmentIndex>[] _listSegmentIndex;
         public ObservableCollection<SegmentIndex>[] ListIndex
@@ -189,6 +216,7 @@
                     TimerOut = dur,
                     Chapter = SelectedBookChapter
                 });
+
             }
  
         }
@@ -196,10 +224,12 @@
         void DelVideoSequence_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
         {
             SelectedVideoSequences.Remove(((CustomableVideoElementVM)e.Parameter).VideoSequence);
+            OnPropertyChanged("TotalBookDuration");
         }
 
         void SelectedVideoSequences_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
         {
+            OnPropertyChanged("TotalBookDuration");
             Commands.ProductionView.VideoRecordUpdated.Execute();
         }
 
@@ -220,5 +250,6 @@
             SelectedChapterType = ((HeaderProductionEventArgs)e.Source).ChapterType ;
             IsIndexing = ((HeaderProductionEventArgs)e.Source).IsIndexPart;
         }
+
     }
 }