55
|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
|
69
|
6 |
using FingersDance.Data; |
|
7 |
|
|
8 |
namespace FingersDance.ViewModels |
55
|
9 |
{ |
69
|
10 |
public class CuttingViewModel : ViewModelBase |
55
|
11 |
{ |
|
12 |
private string _title; |
|
13 |
private List<AnnotationViewModel> _annotList = new List<AnnotationViewModel>(); |
69
|
14 |
|
|
15 |
public CuttingViewModel(Cutting c) { |
|
16 |
|
|
17 |
this._title = c.Title; |
|
18 |
this._annotList = new List<AnnotationViewModel>(); |
|
19 |
foreach (Annotation annot in c.AnnotList) |
|
20 |
this._annotList.Add(new AnnotationViewModel(annot)); |
|
21 |
|
|
22 |
} |
|
23 |
|
55
|
24 |
public String Title |
|
25 |
{ |
|
26 |
get { return _title; } |
|
27 |
set |
|
28 |
{ |
|
29 |
if (value == _title || String.IsNullOrEmpty(value)) |
|
30 |
return; |
|
31 |
_title = value; |
|
32 |
base.OnPropertyChanged("Title"); |
|
33 |
} |
|
34 |
} |
|
35 |
public List<AnnotationViewModel> AnnotList |
|
36 |
{ |
|
37 |
get { return _annotList; } |
|
38 |
set |
|
39 |
{ |
|
40 |
_annotList = value; |
|
41 |
base.OnPropertyChanged("AnnotList"); |
|
42 |
} |
|
43 |
} |
|
44 |
} |
|
45 |
} |