equal
deleted
inserted
replaced
24 |
24 |
25 TimeStripsPanel.SizeChanged += new SizeChangedEventHandler(TimeStripsPanel_SizeChanged); |
25 TimeStripsPanel.SizeChanged += new SizeChangedEventHandler(TimeStripsPanel_SizeChanged); |
26 BookTimeLineSlider.ThumbDragStarted += new EventHandler<EventArgs>(TimeSlider_ThumbDragCompleted); |
26 BookTimeLineSlider.ThumbDragStarted += new EventHandler<EventArgs>(TimeSlider_ThumbDragCompleted); |
27 BookTimeLineSlider.ThumbDragCompleted += new EventHandler<EventArgs>(TimeSlider_ThumbDragCompleted); |
27 BookTimeLineSlider.ThumbDragCompleted += new EventHandler<EventArgs>(TimeSlider_ThumbDragCompleted); |
28 BookTimeLineSlider.MouseLeftButtonUp += new MouseButtonEventHandler(BookTimeLineSlider_MouseLeftButtonUp); |
28 BookTimeLineSlider.MouseLeftButtonUp += new MouseButtonEventHandler(BookTimeLineSlider_MouseLeftButtonUp); |
29 saveAnnotationsButton.Click += new RoutedEventHandler(saveAnnotationsButton_Click); |
29 //saveAnnotationsButton.Click += new RoutedEventHandler(saveAnnotationsButton_Click); |
30 Commands.AnnotationMaker.NewAnnotationFinished.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(NewAnnotationFinished_Executed); |
30 Commands.AnnotationMaker.NewAnnotationFinished.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(NewAnnotationFinished_Executed); |
31 } |
31 } |
32 |
32 |
33 void saveAnnotationsButton_Click(object sender, RoutedEventArgs e) |
33 void saveAnnotationsButton_Click(object sender, RoutedEventArgs e) |
34 { |
34 { |
90 pol.DataContext = new PolemicElementVM(Index); |
90 pol.DataContext = new PolemicElementVM(Index); |
91 BookTimeLineElementPanel.Children.Add(pol); |
91 BookTimeLineElementPanel.Children.Add(pol); |
92 double timeleft = (double)((Index.TimerIn.TotalMilliseconds / BookTimeLineVM.ratioPixMs) * ScaleTimeLine.Value); |
92 double timeleft = (double)((Index.TimerIn.TotalMilliseconds / BookTimeLineVM.ratioPixMs) * ScaleTimeLine.Value); |
93 Canvas.SetLeft(pol,timeleft); |
93 Canvas.SetLeft(pol,timeleft); |
94 pol.Width = (Index.Duration.TotalMilliseconds / BookTimeLineVM.ratioPixMs) * ScaleTimeLine.Value; |
94 pol.Width = (Index.Duration.TotalMilliseconds / BookTimeLineVM.ratioPixMs) * ScaleTimeLine.Value; |
|
95 pol.MouseLeftButtonUp += new MouseButtonEventHandler(Element_MouseLeftButtonUp); |
95 } |
96 } |
96 } |
97 } |
97 int basi = 0; |
98 int basi = 0; |
98 foreach (List<Annotation> LAnnotation in VM.Annotations) |
99 foreach (List<Annotation> LAnnotation in VM.Annotations) |
99 { |
100 { |
128 |
129 |
129 |
130 |
130 // pol.Width = (Annotation.Duration.TotalMilliseconds * ScaleTimeLine.Value) / VM.TotalDuration; |
131 // pol.Width = (Annotation.Duration.TotalMilliseconds * ScaleTimeLine.Value) / VM.TotalDuration; |
131 pol.Width = (Annotation.Duration.TotalMilliseconds / BookTimeLineVM.ratioPixMs)* ScaleTimeLine.Value; |
132 pol.Width = (Annotation.Duration.TotalMilliseconds / BookTimeLineVM.ratioPixMs)* ScaleTimeLine.Value; |
132 BookTimeLineAnnotationPanel.Children.Add(pol); |
133 BookTimeLineAnnotationPanel.Children.Add(pol); |
|
134 pol.MouseLeftButtonUp += new MouseButtonEventHandler(Element_MouseLeftButtonUp); |
133 basi = 0; |
135 basi = 0; |
134 } |
136 } |
135 } |
137 } |
136 BookTimeLineElementPanel.UpdateLayout(); |
138 BookTimeLineElementPanel.UpdateLayout(); |
|
139 } |
|
140 |
|
141 void Element_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) |
|
142 { |
|
143 PolemicElementVM VMPolemicElement = ((PolemicElementVM)((PolemicElementControl)sender).DataContext); |
|
144 |
|
145 Commands.BookTimeLine.LeftClickOnElement.Execute(VMPolemicElement.TimerIn, VMPolemicElement); |
|
146 |
|
147 |
137 } |
148 } |
138 |
149 |
139 |
150 |
140 |
151 |
141 |
152 |