author | cavaliet |
Wed, 28 Oct 2009 17:07:27 +0100 | |
changeset 182 | 25b49d4f1635 |
parent 160 | e940ca798fe3 |
child 192 | 11083c390ce4 |
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 |
{ |
69 | 11 |
private float _tcBegin; |
12 |
private float _dur; |
|
13 |
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
|
14 |
private Color _color; |
55 | 15 |
|
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
|
16 |
public Annotation(float tcBeginPar, float durPar, string gesturePar, Color colorPar) |
55 | 17 |
{ |
69 | 18 |
this._tcBegin = tcBeginPar; |
19 |
this._dur = durPar; |
|
20 |
this._gestureType = gesturePar; |
|
150
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
21 |
this._color = colorPar; |
69 | 22 |
} |
55 | 23 |
|
69 | 24 |
public float TcBegin |
25 |
{ |
|
26 |
get { return _tcBegin; } |
|
27 |
set |
|
28 |
{ |
|
29 |
if (value == _tcBegin || float.IsNaN(value)) |
|
30 |
return; |
|
31 |
_tcBegin = value; |
|
32 |
} |
|
33 |
} |
|
34 |
public float Dur |
|
35 |
{ |
|
36 |
get { return _dur; } |
|
37 |
set |
|
38 |
{ |
|
39 |
if (value == _dur || float.IsNaN(value)) |
|
40 |
return; |
|
41 |
_dur = value; |
|
42 |
} |
|
43 |
} |
|
44 |
public String GestureType |
|
45 |
{ |
|
46 |
get { return _gestureType; } |
|
47 |
set |
|
48 |
{ |
|
49 |
if (value == _gestureType || String.IsNullOrEmpty(value)) |
|
50 |
return; |
|
51 |
_gestureType = value; |
|
52 |
} |
|
55 | 53 |
} |
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
|
54 |
public Color Color |
150
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
55 |
{ |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
56 |
get { return _color; } |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
57 |
set |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
58 |
{ |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
59 |
if (value == _color) |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
60 |
return; |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
61 |
_color = value; |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
62 |
} |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
63 |
} |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
64 |
|
55 | 65 |
} |
66 |
||
67 |
} |