author | cavaliet |
Thu, 12 Nov 2009 16:15:19 +0100 | |
changeset 192 | 11083c390ce4 |
parent 182 | 25b49d4f1635 |
child 225 | b60e13ed75c8 |
permissions | -rw-r--r-- |
55 | 1 |
using System; |
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
160
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
150
diff
changeset
|
5 |
using System.Windows.Media; |
55 | 6 |
|
7 |
namespace FingersDance.Data |
|
8 |
{ |
|
69 | 9 |
public class Annotation |
55 | 10 |
{ |
192
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
182
diff
changeset
|
11 |
private String _id; |
69 | 12 |
private float _tcBegin; |
13 |
private float _dur; |
|
192
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
182
diff
changeset
|
14 |
private String _gestureType; |
160
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
150
diff
changeset
|
15 |
private Color _color; |
55 | 16 |
|
192
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
182
diff
changeset
|
17 |
public Annotation(String idPar, float tcBeginPar, float durPar, String gesturePar, Color colorPar) |
55 | 18 |
{ |
192
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
182
diff
changeset
|
19 |
this._id = idPar; |
69 | 20 |
this._tcBegin = tcBeginPar; |
21 |
this._dur = durPar; |
|
22 |
this._gestureType = gesturePar; |
|
150
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
23 |
this._color = colorPar; |
69 | 24 |
} |
55 | 25 |
|
192
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
182
diff
changeset
|
26 |
public String Id |
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
182
diff
changeset
|
27 |
{ |
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
182
diff
changeset
|
28 |
get { return _id; } |
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
182
diff
changeset
|
29 |
set |
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
182
diff
changeset
|
30 |
{ |
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
182
diff
changeset
|
31 |
if (value == _id || String.IsNullOrEmpty(value)) |
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
182
diff
changeset
|
32 |
return; |
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
182
diff
changeset
|
33 |
_id = value; |
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
182
diff
changeset
|
34 |
} |
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
182
diff
changeset
|
35 |
} |
69 | 36 |
public float TcBegin |
37 |
{ |
|
38 |
get { return _tcBegin; } |
|
39 |
set |
|
40 |
{ |
|
41 |
if (value == _tcBegin || float.IsNaN(value)) |
|
42 |
return; |
|
43 |
_tcBegin = value; |
|
44 |
} |
|
45 |
} |
|
46 |
public float Dur |
|
47 |
{ |
|
48 |
get { return _dur; } |
|
49 |
set |
|
50 |
{ |
|
51 |
if (value == _dur || float.IsNaN(value)) |
|
52 |
return; |
|
53 |
_dur = value; |
|
54 |
} |
|
55 |
} |
|
56 |
public String GestureType |
|
57 |
{ |
|
58 |
get { return _gestureType; } |
|
59 |
set |
|
60 |
{ |
|
61 |
if (value == _gestureType || String.IsNullOrEmpty(value)) |
|
62 |
return; |
|
63 |
_gestureType = value; |
|
64 |
} |
|
55 | 65 |
} |
160
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
150
diff
changeset
|
66 |
public Color Color |
150
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
67 |
{ |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
68 |
get { return _color; } |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
69 |
set |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
70 |
{ |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
71 |
if (value == _color) |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
72 |
return; |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
73 |
_color = value; |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
74 |
} |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
75 |
} |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
76 |
|
55 | 77 |
} |
78 |
||
79 |
} |