author | cavaliet |
Mon, 05 Oct 2009 15:56:27 +0200 | |
changeset 129 | 1f37ef03ebee |
parent 69 | a4c44555f205 |
child 136 | 8b513df1b446 |
permissions | -rw-r--r-- |
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 |
||
129
1f37ef03ebee
scale change improved and now annotations can not recover any of them.
cavaliet
parents:
69
diff
changeset
|
16 |
private float _marginLeft; |
1f37ef03ebee
scale change improved and now annotations can not recover any of them.
cavaliet
parents:
69
diff
changeset
|
17 |
|
1f37ef03ebee
scale change improved and now annotations can not recover any of them.
cavaliet
parents:
69
diff
changeset
|
18 |
public AnnotationViewModel(Annotation a, float marginLeft) { |
69 | 19 |
this._tcBegin = a.TcBegin; |
20 |
this._dur = a.Dur; |
|
21 |
this._gestureType = a.GestureType; |
|
129
1f37ef03ebee
scale change improved and now annotations can not recover any of them.
cavaliet
parents:
69
diff
changeset
|
22 |
this._marginLeft = marginLeft; |
1f37ef03ebee
scale change improved and now annotations can not recover any of them.
cavaliet
parents:
69
diff
changeset
|
23 |
|
1f37ef03ebee
scale change improved and now annotations can not recover any of them.
cavaliet
parents:
69
diff
changeset
|
24 |
Console.WriteLine("_tcBegin = " + _tcBegin + ", _marginLeft = " + _marginLeft); |
69 | 25 |
} |
26 |
||
27 |
public float TcBegin |
|
55 | 28 |
{ |
29 |
get { return _tcBegin; } |
|
30 |
set { |
|
31 |
if (value == _tcBegin || float.IsNaN(value)) |
|
32 |
return; |
|
33 |
_tcBegin = value; |
|
34 |
base.OnPropertyChanged("TcBegin"); |
|
35 |
} |
|
36 |
} |
|
69 | 37 |
public float Dur |
55 | 38 |
{ |
39 |
get { return _dur; } |
|
40 |
set |
|
41 |
{ |
|
42 |
if (value == _dur || float.IsNaN(value)) |
|
43 |
return; |
|
44 |
_dur = value; |
|
45 |
base.OnPropertyChanged("Dur"); |
|
46 |
} |
|
47 |
} |
|
69 | 48 |
public String GestureType |
55 | 49 |
{ |
50 |
get { return _gestureType; } |
|
51 |
set |
|
52 |
{ |
|
53 |
if (value == _gestureType || String.IsNullOrEmpty(value)) |
|
54 |
return; |
|
55 |
_gestureType = value; |
|
56 |
base.OnPropertyChanged("GestureType"); |
|
57 |
} |
|
58 |
} |
|
129
1f37ef03ebee
scale change improved and now annotations can not recover any of them.
cavaliet
parents:
69
diff
changeset
|
59 |
public float MarginLeft |
1f37ef03ebee
scale change improved and now annotations can not recover any of them.
cavaliet
parents:
69
diff
changeset
|
60 |
{ |
1f37ef03ebee
scale change improved and now annotations can not recover any of them.
cavaliet
parents:
69
diff
changeset
|
61 |
get { return _marginLeft; } |
1f37ef03ebee
scale change improved and now annotations can not recover any of them.
cavaliet
parents:
69
diff
changeset
|
62 |
set |
1f37ef03ebee
scale change improved and now annotations can not recover any of them.
cavaliet
parents:
69
diff
changeset
|
63 |
{ |
1f37ef03ebee
scale change improved and now annotations can not recover any of them.
cavaliet
parents:
69
diff
changeset
|
64 |
if (value == _marginLeft || float.IsNaN(value)) |
1f37ef03ebee
scale change improved and now annotations can not recover any of them.
cavaliet
parents:
69
diff
changeset
|
65 |
return; |
1f37ef03ebee
scale change improved and now annotations can not recover any of them.
cavaliet
parents:
69
diff
changeset
|
66 |
_marginLeft = value; |
1f37ef03ebee
scale change improved and now annotations can not recover any of them.
cavaliet
parents:
69
diff
changeset
|
67 |
base.OnPropertyChanged("MarginLeft"); |
1f37ef03ebee
scale change improved and now annotations can not recover any of them.
cavaliet
parents:
69
diff
changeset
|
68 |
} |
1f37ef03ebee
scale change improved and now annotations can not recover any of them.
cavaliet
parents:
69
diff
changeset
|
69 |
} |
55 | 70 |
|
71 |
} |
|
72 |
} |