equal
deleted
inserted
replaced
300 if (annotOk) |
300 if (annotOk) |
301 OnSuccessAnnotation(this, new EventArgs()); |
301 OnSuccessAnnotation(this, new EventArgs()); |
302 |
302 |
303 } |
303 } |
304 |
304 |
305 public void addAnnotation(float start, float dur, String gestureType) |
305 public void addAnnotation(float start, float dur, List<String> gestureType) |
306 { |
306 { |
307 addAnnotation(new AnnotationViewModel(new Annotation("temp", start, dur, gestureType, CurrentColor), 0)); |
307 addAnnotation(new AnnotationViewModel(new Annotation("temp", start, dur, gestureType, CurrentColor), 0)); |
308 } |
308 } |
309 |
309 |
310 public void startOrEndAnnotation(String gestureType) |
310 public void startOrEndAnnotation(String gestureType) |
325 } |
325 } |
326 } |
326 } |
327 // if not, we mark the beginning |
327 // if not, we mark the beginning |
328 if (annotOk == true) |
328 if (annotOk == true) |
329 { |
329 { |
330 Annotation annotation = new Annotation("s_" + System.Guid.NewGuid(), AnnotTcBegin, 0, gestureType, CurrentColor); |
330 List<String> ls = new List<String>(); |
|
331 ls.Add(gestureType); |
|
332 Annotation annotation = new Annotation("s_" + System.Guid.NewGuid(), AnnotTcBegin, 0, ls, CurrentColor); |
331 cut.AnnotList.Add(annotation); |
333 cut.AnnotList.Add(annotation); |
332 tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX); |
334 tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX); |
333 AnnotWaiting = true; |
335 AnnotWaiting = true; |
334 } |
336 } |
335 } |
337 } |
351 } |
353 } |
352 |
354 |
353 if (annotOk == true) |
355 if (annotOk == true) |
354 { |
356 { |
355 cut.AnnotList.RemoveAt(cut.AnnotList.Count - 1); |
357 cut.AnnotList.RemoveAt(cut.AnnotList.Count - 1); |
356 Annotation annotation = new Annotation("s_" + System.Guid.NewGuid(), AnnotTcBegin, currentDuration, gestureType, CurrentColor); |
358 List<String> ls = new List<String>(); |
|
359 ls.Add(gestureType); |
|
360 Annotation annotation = new Annotation("s_" + System.Guid.NewGuid(), AnnotTcBegin, currentDuration, ls, CurrentColor); |
357 cut.AnnotList.Add(annotation); |
361 cut.AnnotList.Add(annotation); |
358 //Console.WriteLine("currentTimecode = " + AnnotTcBegin + ", curDur = " + currentDuration + ", nb = " + cut.AnnotList.Count + ", res = " + (AnnotTcBegin - (cut.AnnotList.Count * AnnotWidth))); |
362 //Console.WriteLine("currentTimecode = " + AnnotTcBegin + ", curDur = " + currentDuration + ", nb = " + cut.AnnotList.Count + ", res = " + (AnnotTcBegin - (cut.AnnotList.Count * AnnotWidth))); |
359 tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX); |
363 tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX); |
360 AnnotWaiting = false; |
364 AnnotWaiting = false; |
361 if (AnnotationAdded != null) |
365 if (AnnotationAdded != null) |