client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs
changeset 23 10acb6a11a73
parent 21 253f142174ac
child 24 c031f1132dde
--- a/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs	Mon Dec 14 11:25:01 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs	Mon Dec 14 17:02:03 2009 +0100
@@ -175,48 +175,7 @@
         }
         private void AddSequenceButton_Click(object sender, System.Windows.RoutedEventArgs e)
         {
-            Random rndNumbers = new Random();
-            if (((ProductionTimeLineVM)this.DataContext).SelectedChapter != -1)
-            {
-                if(!((ProductionTimeLineVM)DataContext).IsIndexing)
-                {
-
-                CustomableVideoElement _temp = new CustomableVideoElement()
-                                         {
-                                             DataContext = new CustomableVideoElementVM(new VideoSequence()
-                                             {
-
-                                                 RunTime = new TimeSpan(0, rndNumbers.Next(10, 60), 0),
-                                                 BeginTrim = new TimeSpan(0, 0, 0),
-                                                 EndTrim = new TimeSpan(0, 0, 0),
-
-                                             }) { Chapter = ((ProductionTimeLineVM)this.DataContext).SelectedChapterType},
-                                             // Width = 200
-                                         };
-                
-                _temp.MouseMove += new MouseEventHandler(CustomableVideoElement_MouseMove);
-                _temp.MouseLeftButtonDown += new MouseButtonEventHandler(CustomableVideoElement_MouseLeftButtonDown);
-                _temp.MouseLeftButtonUp += new MouseButtonEventHandler(CustomableVideoElement_MouseLeftButtonUp);
-                
-                   VideoTimeStrip.Children.Add(_temp  );// TODO: Add event handler implementation here.
-                }
-                else
-                {
-                    VideoChapter vc = ((ProductionTimeLineVM)DataContext).SelectedBookChapter;
-                    PolemicElementControl an = new PolemicElementControl() { IsEnabled = false };
-                    an.DataContext = new PolemicElementVM(new SegmentIndex(vc)
-                        {
-                            TimerIn = TimeSpan.Zero,
-                            Duration = new TimeSpan(0, rndNumbers.Next(10, 60), 0),
-                            Chapter = vc,
-                            
-
-                        });
-                  
-                        //((ProductionTimeLineVM)DataContext).SelectedBookChapter);
-                    AnnotationTimeStrip.Children.Add(an);
-                }
-            }
+            AddSequenceButton.Content = ((ProductionTimeLineVM)DataContext).TotalBookDuration;
         }