--- a/src/FingersDance.ViewModel/CuttingViewModel.cs Fri Oct 02 18:49:07 2009 +0200
+++ b/src/FingersDance.ViewModel/CuttingViewModel.cs Mon Oct 05 15:56:27 2009 +0200
@@ -12,12 +12,16 @@
private string _title;
private List<AnnotationViewModel> _annotList = new List<AnnotationViewModel>();
- public CuttingViewModel(Cutting c) {
+ public CuttingViewModel(Cutting c, float annotWidth) {
this._title = c.Title;
this._annotList = new List<AnnotationViewModel>();
+ int i = 0;
foreach (Annotation annot in c.AnnotList)
- this._annotList.Add(new AnnotationViewModel(annot));
+ {
+ this._annotList.Add(new AnnotationViewModel(annot, annot.TcBegin - (i * annotWidth)));
+ i++;
+ }
}
@@ -41,5 +45,18 @@
base.OnPropertyChanged("AnnotList");
}
}
+
+ public void setListFromAnnotations(List<Annotation> annotList, float annotWidth)
+ {
+
+ this._annotList = new List<AnnotationViewModel>();
+ int i = 0;
+ foreach (Annotation annot in annotList)
+ {
+ this._annotList.Add(new AnnotationViewModel(annot, annot.TcBegin - (i * annotWidth)));
+ i++;
+ }
+
+ }
}
}