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 AnnotationViewModel : ViewModelBase |
55
|
11 |
{ |
|
12 |
private float _tcBegin; |
|
13 |
private float _dur; |
|
14 |
private String _gestureType; |
|
15 |
|
69
|
16 |
public AnnotationViewModel(Annotation a) { |
|
17 |
this._tcBegin = a.TcBegin; |
|
18 |
this._dur = a.Dur; |
|
19 |
this._gestureType = a.GestureType; |
|
20 |
} |
|
21 |
|
|
22 |
public float TcBegin |
55
|
23 |
{ |
|
24 |
get { return _tcBegin; } |
|
25 |
set { |
|
26 |
if (value == _tcBegin || float.IsNaN(value)) |
|
27 |
return; |
|
28 |
_tcBegin = value; |
|
29 |
base.OnPropertyChanged("TcBegin"); |
|
30 |
} |
|
31 |
} |
69
|
32 |
public float Dur |
55
|
33 |
{ |
|
34 |
get { return _dur; } |
|
35 |
set |
|
36 |
{ |
|
37 |
if (value == _dur || float.IsNaN(value)) |
|
38 |
return; |
|
39 |
_dur = value; |
|
40 |
base.OnPropertyChanged("Dur"); |
|
41 |
} |
|
42 |
} |
69
|
43 |
public String GestureType |
55
|
44 |
{ |
|
45 |
get { return _gestureType; } |
|
46 |
set |
|
47 |
{ |
|
48 |
if (value == _gestureType || String.IsNullOrEmpty(value)) |
|
49 |
return; |
|
50 |
_gestureType = value; |
|
51 |
base.OnPropertyChanged("GestureType"); |
|
52 |
} |
|
53 |
} |
|
54 |
|
|
55 |
} |
|
56 |
} |