equal
deleted
inserted
replaced
104 pol.Width = (Index.Duration.TotalMilliseconds / BookTimeLineVM.ratioPixMs) * ScaleTimeLine.Value; |
104 pol.Width = (Index.Duration.TotalMilliseconds / BookTimeLineVM.ratioPixMs) * ScaleTimeLine.Value; |
105 pol.MouseLeftButtonUp += new MouseButtonEventHandler(Element_MouseLeftButtonUp); |
105 pol.MouseLeftButtonUp += new MouseButtonEventHandler(Element_MouseLeftButtonUp); |
106 } |
106 } |
107 } |
107 } |
108 int basi = 0; |
108 int basi = 0; |
109 |
109 int maxHi = 0; |
110 foreach (List<Annotation> LAnnotation in VM.Annotations) |
110 foreach (List<Annotation> LAnnotation in VM.Annotations) |
111 { |
111 { |
112 LAnnotation.Sort((a, b) => TimeSpan.Compare( b.Duration,a.Duration)); |
112 LAnnotation.Sort((a, b) => TimeSpan.Compare( b.Duration,a.Duration)); |
113 foreach (Annotation Annotation in LAnnotation) |
113 foreach (Annotation Annotation in LAnnotation) |
114 { |
114 { |
135 |
135 |
136 } |
136 } |
137 } |
137 } |
138 |
138 |
139 Canvas.SetTop(pol, basi); |
139 Canvas.SetTop(pol, basi); |
|
140 if(maxHi<=basi) |
|
141 { |
|
142 maxHi = basi + 24; |
|
143 } |
140 /***********************/ |
144 /***********************/ |
141 |
145 |
142 |
146 |
143 // pol.Width = (Annotation.Duration.TotalMilliseconds * ScaleTimeLine.Value) / VM.TotalDuration; |
147 // pol.Width = (Annotation.Duration.TotalMilliseconds * ScaleTimeLine.Value) / VM.TotalDuration; |
144 pol.Width = (Annotation.Duration.TotalMilliseconds / BookTimeLineVM.ratioPixMs)* ScaleTimeLine.Value; |
148 pol.Width = (Annotation.Duration.TotalMilliseconds / BookTimeLineVM.ratioPixMs)* ScaleTimeLine.Value; |
145 BookTimeLineAnnotationPanel.Children.Add(pol); |
149 BookTimeLineAnnotationPanel.Children.Add(pol); |
146 pol.MouseLeftButtonUp += new MouseButtonEventHandler(Element_MouseLeftButtonUp); |
150 pol.MouseLeftButtonUp += new MouseButtonEventHandler(Element_MouseLeftButtonUp); |
147 basi = 0; |
151 basi = 0; |
148 } |
152 } |
149 } |
153 } |
|
154 BookTimeLineAnnotationPanel.Height = maxHi; |
150 BookTimeLineElementPanel.UpdateLayout(); |
155 BookTimeLineElementPanel.UpdateLayout(); |
151 } |
156 } |
152 |
157 |
153 void Element_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) |
158 void Element_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) |
154 { |
159 { |