--- a/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs Wed Oct 14 14:06:04 2009 +0200
+++ b/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs Wed Oct 14 17:08:43 2009 +0200
@@ -41,6 +41,7 @@
private CuttingViewModel CuttingVM;
private Boolean AnnotWaiting = false;
private float AnnotTcBegin;
+ private UInt32 IntColor;
private AnnotationViewModel canceledAnnotationVM;
@@ -115,7 +116,7 @@
// TEMP FOR DATA BINDING
AnnotList = new List<Annotation>();
- AnnotList.Add(new Annotation(0, 10, "Axe Cam 1"));
+ AnnotList.Add(new Annotation(0, 10, "Axe Cam 1", IntColor));
//AnnotList.Add(new Annotation(100 - (1 * AnnotWidth), 70, "Mvt Cam 2"));
//AnnotList.Add(new Annotation(200 - (2 * AnnotWidth), 50, "Saut 3"));
//AnnotList.Add(new Annotation(100 - (3 * AnnotWidth), 20, "Saut 4"));
@@ -145,11 +146,13 @@
}
#region Timer
- public void initTimer()
+ public void initTimer(UInt32 intColorPar)
{
timer = new DispatcherTimer();
timer.Interval = new TimeSpan(0, 0, 0, 0, 100);
timer.Tick += new EventHandler(timer_Tick);
+
+ IntColor = intColorPar;
}
public void timerStart()
@@ -267,7 +270,7 @@
// If everything's fine, we create the new one
if (annotOk == true)
{
- AnnotList.Add(new Annotation(avm.TcBegin, avm.Dur, avm.GestureType));
+ AnnotList.Add(new Annotation(avm.TcBegin, avm.Dur, avm.GestureType, avm.Color));
CuttingVM.setListFromAnnotations(AnnotList, AnnotWidth);
tv.DataContext = null;
tv.DataContext = CuttingVM;
@@ -298,7 +301,7 @@
// if not, we mark the beginning
if (annotOk == true)
{
- AnnotList.Add(new Annotation(AnnotTcBegin, 0, AnnotList.Count.ToString()));
+ AnnotList.Add(new Annotation(AnnotTcBegin, 0, AnnotList.Count.ToString(), IntColor));
CuttingVM.setListFromAnnotations(AnnotList, AnnotWidth);
//Console.WriteLine("BEGIN currentTimecode = " + AnnotTcBegin + ", nb = " + AnnotList.Count + ", res = " + (AnnotTcBegin - (AnnotList.Count * AnnotWidth)));
tv.DataContext = null;
@@ -326,7 +329,7 @@
if (annotOk == true)
{
AnnotList.RemoveAt(AnnotList.Count - 1);
- AnnotList.Add(new Annotation(AnnotTcBegin, currentDuration, AnnotList.Count.ToString()));
+ AnnotList.Add(new Annotation(AnnotTcBegin, currentDuration, AnnotList.Count.ToString(), IntColor));
CuttingVM.setListFromAnnotations(AnnotList, AnnotWidth);
//Console.WriteLine("currentTimecode = " + AnnotTcBegin + ", curDur = " + currentDuration + ", nb = " + AnnotList.Count + ", res = " + (AnnotTcBegin - (AnnotList.Count * AnnotWidth)));
tv.DataContext = null;