equal
deleted
inserted
replaced
50 |
50 |
51 } |
51 } |
52 private bool _saveVideoViewerState { get; set; } |
52 private bool _saveVideoViewerState { get; set; } |
53 private void TimeSlider_ThumbDragCompleted(object sender, EventArgs e) |
53 private void TimeSlider_ThumbDragCompleted(object sender, EventArgs e) |
54 { |
54 { |
|
55 //Commands.TimeChange.Execute(null, DataContext); |
55 if (_saveVideoViewerState) |
56 if (_saveVideoViewerState) |
56 { |
57 { |
57 |
58 |
58 ((BookTimeLineVM)DataContext).ViewModelVideoViewer.Play(); |
59 ((BookTimeLineVM)DataContext).ViewModelVideoViewer.Play(); |
59 |
60 |
107 } |
108 } |
108 int basi = 0; |
109 int basi = 0; |
109 int maxHi = 0; |
110 int maxHi = 0; |
110 foreach (List<Annotation> LAnnotation in VM.Annotations) |
111 foreach (List<Annotation> LAnnotation in VM.Annotations) |
111 { |
112 { |
112 LAnnotation.Sort((a, b) => TimeSpan.Compare( b.Duration,a.Duration)); |
113 List<Annotation> tempList = new List<Annotation>(LAnnotation); |
113 foreach (Annotation Annotation in LAnnotation) |
114 tempList.Sort((a, b) => TimeSpan.Compare(b.Duration, a.Duration)); |
|
115 foreach (Annotation Annotation in tempList) |
114 { |
116 { |
115 PolemicElementControl pol = new PolemicElementControl(); |
117 PolemicElementControl pol = new PolemicElementControl(); |
116 pol.SetValue(Canvas.ZIndexProperty, 10); |
118 pol.SetValue(Canvas.ZIndexProperty, 10); |
117 pol.DataContext = new PolemicElementVM(Annotation); |
119 pol.DataContext = new PolemicElementVM(Annotation); |
118 |
120 |
127 |
129 |
128 ) |
130 ) |
129 { |
131 { |
130 int actualTop = (int)Canvas.GetTop(lockedControl); |
132 int actualTop = (int)Canvas.GetTop(lockedControl); |
131 if (basi <= actualTop) |
133 if (basi <= actualTop) |
132 { |
134 { |
133 basi += 12; |
135 basi += 12; |
134 } |
136 } |
135 |
137 |
136 } |
138 } |
137 } |
139 } |
138 |
140 |
139 Canvas.SetTop(pol, basi); |
141 Canvas.SetTop(pol, basi); |