client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs
equal
deleted
inserted
replaced
17 |
17 |
18 public partial class ProductionTimeLine : UserControl |
18 public partial class ProductionTimeLine : UserControl |
19 { |
19 { |
20 public static double ScaleTime |
20 public static double ScaleTime |
21 { |
21 { |
22 get |
22 get; |
23 ; |
|
24 |
|
25 |
|
26 set; |
23 set; |
27 } |
24 } |
28 public ProductionTimeLine() |
25 public ProductionTimeLine() |
29 { |
26 { |
30 ScaleTime = 0.0002; |
27 ScaleTime = 0.0002; |
31 // Required to initialize variables |
28 // Required to initialize variables |
32 InitializeComponent(); |
29 InitializeComponent(); |
33 Commands.ProductionTimeLine.EditorPartSelected.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(EditorPartSelected_Executed); |
30 Commands.ProductionTimeLine.EditorPartSelected.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(EditorPartSelected_Executed); |
34 Commands.ProductionView.VideoRecordUpdated.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(VideoRecordUpdated_Executed); |
31 Commands.ProductionView.VideoRecordUpdated.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(VideoRecordUpdated_Executed); |
35 Commands.Action.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(Action_Executed); |
|
36 TimeSlider.MouseLeftButtonUp += new MouseButtonEventHandler(TimeSlider_MouseLeftButtonUp); |
32 TimeSlider.MouseLeftButtonUp += new MouseButtonEventHandler(TimeSlider_MouseLeftButtonUp); |
37 //TimeSlider.ValueChanged += new RoutedPropertyChangedEventHandler<double>(TimeSlider_ValueChanged); |
33 //TimeSlider.ValueChanged += new RoutedPropertyChangedEventHandler<double>(TimeSlider_ValueChanged); |
38 TimeSlider.Maximum = TimeSlider.ActualWidth / ProductionTimeLine.ScaleTime; |
34 TimeSlider.Maximum = TimeSlider.ActualWidth / ProductionTimeLine.ScaleTime; |
39 |
35 |
40 ScaleTimeLine.ValueChanged += new RoutedPropertyChangedEventHandler<double>(ScaleTimeLine_ValueChanged); |
36 ScaleTimeLine.ValueChanged += new RoutedPropertyChangedEventHandler<double>(ScaleTimeLine_ValueChanged); |
65 |
61 |
66 void VideoRecordUpdated_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e) |
62 void VideoRecordUpdated_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e) |
67 { |
63 { |
68 UpdateElements(); |
64 UpdateElements(); |
69 } |
65 } |
70 |
|
71 |
|
72 void Action_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e) |
|
73 { |
|
74 AddSequenceButton.Content = ((MouseEventArgs)e.Parameter).GetPosition(this).X; |
|
75 } |
|
76 private double _sumOfLengh=0; |
66 private double _sumOfLengh=0; |
|
67 |
77 public void UpdateElements() |
68 public void UpdateElements() |
78 { |
69 { |
79 TimeSlider.Maximum = TimeSlider.ActualWidth / ProductionTimeLine.ScaleTime; |
70 TimeSlider.Maximum = TimeSlider.ActualWidth / ProductionTimeLine.ScaleTime; |
80 if (DataContext != null) |
71 if (DataContext != null) |
81 { |
72 { |