client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs
--- a/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs Tue Jan 05 15:53:48 2010 +0100
@@ -20,12 +20,14 @@
public static double ScaleTime
{
get
- {
- return 0.0002;
- }
+ ;
+
+
+ set;
}
public ProductionTimeLine()
{
+ ScaleTime = 0.0002;
// Required to initialize variables
InitializeComponent();
Commands.ProductionTimeLine.EditorPartSelected.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(EditorPartSelected_Executed);
@@ -34,8 +36,17 @@
TimeSlider.MouseLeftButtonUp += new MouseButtonEventHandler(TimeSlider_MouseLeftButtonUp);
//TimeSlider.ValueChanged += new RoutedPropertyChangedEventHandler<double>(TimeSlider_ValueChanged);
TimeSlider.Maximum = TimeSlider.ActualWidth / ProductionTimeLine.ScaleTime;
+
+ ScaleTimeLine.ValueChanged += new RoutedPropertyChangedEventHandler<double>(ScaleTimeLine_ValueChanged);
}
+ void ScaleTimeLine_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
+ {
+ ScaleTime = e.NewValue / 3200000;
+ UpdateElements();
+
+ }
+
void TimeSlider_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
Commands.TimeChange.Execute(TimeSlider.Value,DataContext);
@@ -89,12 +100,12 @@
};
_temp.MouseLeftButtonDown += new MouseButtonEventHandler(CustomableVideoElement_MouseLeftButtonDown);
- if ((VideoChapterType)intChapter == ((ProductionTimeLineVM)this.DataContext).SelectedBookChapter.Type)
- {
+ //if ((VideoChapterType)intChapter == ((ProductionTimeLineVM)this.DataContext).SelectedBookChapter.Type)
+ //{
_temp.MouseMove += new MouseEventHandler(CustomableVideoElement_MouseMove);
_temp.MouseLeftButtonUp += new MouseButtonEventHandler(CustomableVideoElement_MouseLeftButtonUp);
- }
+ //}
VideoTimeStrip.Children.Add(_temp);// TODO: Add event handler implementation here.
_sumOfLengh += _temp.Width;
}