143 |
143 |
144 CurrentColor = col; |
144 CurrentColor = col; |
145 |
145 |
146 // DATA BINDING from the cutting sent in parameter (initialised before by the userPanel with the global project) |
146 // DATA BINDING from the cutting sent in parameter (initialised before by the userPanel with the global project) |
147 cut = cutPar; |
147 cut = cutPar; |
148 cut.AnnotList = new List<Annotation>(); |
148 //cut.AnnotList = new List<Annotation>(); |
149 cut.AnnotList.Add(new Annotation(0, 10, "Axe Cam 1", CurrentColor)); |
149 //cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), 0, 10, "Axe Cam 1", CurrentColor)); |
150 //cut.AnnotList.Add(new Annotation(100 - (1 * AnnotWidth), 70, "Mvt Cam 2")); |
150 //cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), 100 - (1 * AnnotWidth), 70, "Mvt Cam 2")); |
151 //cut.AnnotList.Add(new Annotation(200 - (2 * AnnotWidth), 50, "Saut 3")); |
151 //cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), 200 - (2 * AnnotWidth), 50, "Saut 3")); |
152 //cut.AnnotList.Add(new Annotation(100 - (3 * AnnotWidth), 20, "Saut 4")); |
152 //cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), 100 - (3 * AnnotWidth), 20, "Saut 4")); |
153 //cut.AnnotList.Add(new Annotation(120 - (4 * AnnotWidth), 50, "Saut 5")); |
153 //cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), 120 - (4 * AnnotWidth), 50, "Saut 5")); |
154 //cut.AnnotList = AnnotList; |
154 |
155 tv.DataContext = new CuttingViewModel(cut, AnnotWidth); |
155 tv.DataContext = new CuttingViewModel(cut, AnnotWidth); |
156 |
156 |
157 } |
157 } |
158 |
158 |
159 public void timerStart() |
159 public void timerStart() |
279 } |
279 } |
280 } |
280 } |
281 // If everything's fine, we create the new one |
281 // If everything's fine, we create the new one |
282 if (annotOk == true) |
282 if (annotOk == true) |
283 { |
283 { |
284 cut.AnnotList.Add(new Annotation(avm.TcBegin, avm.Dur, avm.GestureType, avm.Color)); |
284 cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), avm.TcBegin, avm.Dur, avm.GestureType, avm.Color)); |
285 tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX); |
285 tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX); |
286 AnnotWaiting = false; |
286 AnnotWaiting = false; |
287 } |
287 } |
288 |
288 |
289 } |
289 } |
311 } |
311 } |
312 } |
312 } |
313 // if not, we mark the beginning |
313 // if not, we mark the beginning |
314 if (annotOk == true) |
314 if (annotOk == true) |
315 { |
315 { |
316 cut.AnnotList.Add(new Annotation(AnnotTcBegin, 0, cut.AnnotList.Count.ToString(), CurrentColor)); |
316 cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), AnnotTcBegin, 0, cut.AnnotList.Count.ToString(), CurrentColor)); |
317 tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX); |
317 tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX); |
318 AnnotWaiting = true; |
318 AnnotWaiting = true; |
319 } |
319 } |
320 } |
320 } |
321 // We close the current opened annotation... |
321 // We close the current opened annotation... |
336 } |
336 } |
337 |
337 |
338 if (annotOk == true) |
338 if (annotOk == true) |
339 { |
339 { |
340 cut.AnnotList.RemoveAt(cut.AnnotList.Count - 1); |
340 cut.AnnotList.RemoveAt(cut.AnnotList.Count - 1); |
341 cut.AnnotList.Add(new Annotation(AnnotTcBegin, currentDuration, cut.AnnotList.Count.ToString(), CurrentColor)); |
341 cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), AnnotTcBegin, currentDuration, cut.AnnotList.Count.ToString(), CurrentColor)); |
342 //Console.WriteLine("currentTimecode = " + AnnotTcBegin + ", curDur = " + currentDuration + ", nb = " + cut.AnnotList.Count + ", res = " + (AnnotTcBegin - (cut.AnnotList.Count * AnnotWidth))); |
342 //Console.WriteLine("currentTimecode = " + AnnotTcBegin + ", curDur = " + currentDuration + ", nb = " + cut.AnnotList.Count + ", res = " + (AnnotTcBegin - (cut.AnnotList.Count * AnnotWidth))); |
343 tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX); |
343 tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX); |
344 AnnotWaiting = false; |
344 AnnotWaiting = false; |
345 } |
345 } |
346 //Raise Event to display Annotation in all Openned UserPanels |
346 //Raise Event to display Annotation in all Openned UserPanels |