--- a/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs Tue Nov 10 13:47:58 2009 +0100
+++ b/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs Thu Nov 12 16:15:19 2009 +0100
@@ -145,13 +145,13 @@
// DATA BINDING from the cutting sent in parameter (initialised before by the userPanel with the global project)
cut = cutPar;
- cut.AnnotList = new List<Annotation>();
- cut.AnnotList.Add(new Annotation(0, 10, "Axe Cam 1", CurrentColor));
- //cut.AnnotList.Add(new Annotation(100 - (1 * AnnotWidth), 70, "Mvt Cam 2"));
- //cut.AnnotList.Add(new Annotation(200 - (2 * AnnotWidth), 50, "Saut 3"));
- //cut.AnnotList.Add(new Annotation(100 - (3 * AnnotWidth), 20, "Saut 4"));
- //cut.AnnotList.Add(new Annotation(120 - (4 * AnnotWidth), 50, "Saut 5"));
- //cut.AnnotList = AnnotList;
+ //cut.AnnotList = new List<Annotation>();
+ //cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), 0, 10, "Axe Cam 1", CurrentColor));
+ //cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), 100 - (1 * AnnotWidth), 70, "Mvt Cam 2"));
+ //cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), 200 - (2 * AnnotWidth), 50, "Saut 3"));
+ //cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), 100 - (3 * AnnotWidth), 20, "Saut 4"));
+ //cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), 120 - (4 * AnnotWidth), 50, "Saut 5"));
+
tv.DataContext = new CuttingViewModel(cut, AnnotWidth);
}
@@ -281,7 +281,7 @@
// If everything's fine, we create the new one
if (annotOk == true)
{
- cut.AnnotList.Add(new Annotation(avm.TcBegin, avm.Dur, avm.GestureType, avm.Color));
+ cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), avm.TcBegin, avm.Dur, avm.GestureType, avm.Color));
tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX);
AnnotWaiting = false;
}
@@ -313,7 +313,7 @@
// if not, we mark the beginning
if (annotOk == true)
{
- cut.AnnotList.Add(new Annotation(AnnotTcBegin, 0, cut.AnnotList.Count.ToString(), CurrentColor));
+ cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), AnnotTcBegin, 0, cut.AnnotList.Count.ToString(), CurrentColor));
tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX);
AnnotWaiting = true;
}
@@ -338,7 +338,7 @@
if (annotOk == true)
{
cut.AnnotList.RemoveAt(cut.AnnotList.Count - 1);
- cut.AnnotList.Add(new Annotation(AnnotTcBegin, currentDuration, cut.AnnotList.Count.ToString(), CurrentColor));
+ cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), AnnotTcBegin, currentDuration, cut.AnnotList.Count.ToString(), CurrentColor));
//Console.WriteLine("currentTimecode = " + AnnotTcBegin + ", curDur = " + currentDuration + ", nb = " + cut.AnnotList.Count + ", res = " + (AnnotTcBegin - (cut.AnnotList.Count * AnnotWidth)));
tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX);
AnnotWaiting = false;