--- a/src/FingersDance.ViewModel/CuttingViewModel.cs Tue Oct 13 19:09:46 2009 +0200
+++ b/src/FingersDance.ViewModel/CuttingViewModel.cs Tue Oct 13 19:33:13 2009 +0200
@@ -12,16 +12,20 @@
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++;
+ }
}
- public String Title
+ public String Title
{
get { return _title; }
set
@@ -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++;
+ }
+
+ }
}
}