--- a/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs Mon Oct 05 15:56:27 2009 +0200
+++ b/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs Mon Oct 05 18:23:10 2009 +0200
@@ -37,7 +37,6 @@
private CuttingViewModel CuttingVM;
private Boolean AnnotWaiting = false;
private float AnnotTcBegin;
- private AnnotationViewModel lastAnnotVM;
#region Properties
@@ -211,7 +210,7 @@
// First we check if the new annotation will not cover any
foreach (Annotation a in AnnotList)
{
- Console.WriteLine("a.TcBegin = " + a.TcBegin + ", AnnotTcBegin = " + AnnotTcBegin + ", tcOut = " + (a.TcBegin + a.Dur));
+ //Console.WriteLine("a.TcBegin = " + a.TcBegin + ", AnnotTcBegin = " + AnnotTcBegin + ", tcOut = " + (a.TcBegin + a.Dur));
if (a.TcBegin <= AnnotTcBegin && AnnotTcBegin <= (a.TcBegin + a.Dur))
{
annotOk = false;
@@ -221,19 +220,15 @@
if (annotOk == true)
{
AnnotList.Add(new Annotation(AnnotTcBegin, 0, AnnotList.Count.ToString()));
- //AnnotList.Add(new Annotation(AnnotTcBegin, 0, AnnotList.Count.ToString()));
- //AnnotList.Add(new Annotation(0, 0, AnnotList.Count.ToString()));
-
CuttingVM.setListFromAnnotations(AnnotList, AnnotWidth);
//Console.WriteLine("BEGIN currentTimecode = " + AnnotTcBegin + ", nb = " + AnnotList.Count + ", res = " + (AnnotTcBegin - (AnnotList.Count * AnnotWidth)));
tv.DataContext = null;
tv.DataContext = CuttingVM;
AnnotWaiting = true;
}
-
}
// We close the current opened annotation...
- else if (CuttingVM != null && AnnotWaiting == true && ((float)slider.Value>AnnotTcBegin))
+ else if (CuttingVM != null && AnnotWaiting == true && (((float)slider.Value/1000)>AnnotTcBegin))
{
// ... by setting setting the good beginning and the good duration
float currentTC = (float)slider.Value / 1000;
@@ -242,7 +237,7 @@
// First we check if the new annotation will not cover any (AnnotTcBegin was already checked)
foreach (Annotation a in AnnotList)
{
- Console.WriteLine("a.TcBegin = " + a.TcBegin + ", tcOut = " + (a.TcBegin + a.Dur) + ", AnnotTcBegin = " + AnnotTcBegin + ", currentTC = " + currentTC);
+ //Console.WriteLine("a.TcBegin = " + a.TcBegin + ", tcOut = " + (a.TcBegin + a.Dur) + ", AnnotTcBegin = " + AnnotTcBegin + ", currentTC = " + currentTC);
if (a.TcBegin <= currentTC && currentTC <= (a.TcBegin + a.Dur) || (AnnotTcBegin < a.TcBegin && (a.TcBegin + a.Dur) < currentTC))
{
annotOk = false;
@@ -253,11 +248,6 @@
{
AnnotList.RemoveAt(AnnotList.Count - 1);
AnnotList.Add(new Annotation(AnnotTcBegin, currentDuration, AnnotList.Count.ToString()));
- //AnnotList.Add(new Annotation(AnnotTcBegin - (AnnotList.Count * AnnotWidth), currentDuration, AnnotList.Count.ToString()));
- //AnnotList.Add(new Annotation((AnnotTcBegin / 1000), currentDuration, CuttingVM.AnnotList.Count.ToString()));
- //AnnotList.Add(new Annotation(0, currentDuration, CuttingVM.AnnotList.Count.ToString()));
-
-
CuttingVM.setListFromAnnotations(AnnotList, AnnotWidth);
//Console.WriteLine("currentTimecode = " + AnnotTcBegin + ", curDur = " + currentDuration + ", nb = " + AnnotList.Count + ", res = " + (AnnotTcBegin - (AnnotList.Count * AnnotWidth)));
tv.DataContext = null;