author | sarias |
Fri, 16 Oct 2009 11:42:18 +0200 | |
changeset 158 | 6731e300ec85 |
parent 150 | 569925b65604 |
child 160 | e940ca798fe3 |
permissions | -rw-r--r-- |
55 | 1 |
using System; |
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
||
6 |
namespace FingersDance.Data |
|
7 |
{ |
|
69 | 8 |
public class AnnotationAddedEventArg : EventArgs |
55 | 9 |
{ |
10 |
private float _tcBegin; |
|
150
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
11 |
private float _dur; |
55 | 12 |
private String _gestureType; |
13 |
||
69 | 14 |
public float TcBegin |
55 | 15 |
{ |
16 |
get { return this._tcBegin; } |
|
17 |
} |
|
69 | 18 |
public float Dur |
150
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
19 |
{ |
55 | 20 |
get { return this._dur; } |
150
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
21 |
} |
69 | 22 |
public String GestureType |
150
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
23 |
{ |
55 | 24 |
get { return this._gestureType; } |
25 |
} |
|
26 |
||
150
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
27 |
public AnnotationAddedEventArg(float tcBegin, float dur, String gestureType) |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
28 |
{ |
55 | 29 |
|
30 |
this._tcBegin = tcBegin; |
|
31 |
this._dur = dur; |
|
32 |
this._gestureType = gestureType; |
|
150
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
33 |
|
55 | 34 |
} |
35 |
||
36 |
} |
|
37 |
||
69 | 38 |
public class Annotation |
55 | 39 |
{ |
69 | 40 |
private float _tcBegin; |
41 |
private float _dur; |
|
42 |
private string _gestureType; |
|
150
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
43 |
private UInt32 _color; |
55 | 44 |
|
69 | 45 |
//public event EventHandler<AnnotationAddedEventArg> AnnotationAdded; |
55 | 46 |
|
150
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
47 |
public Annotation(float tcBeginPar, float durPar, string gesturePar, UInt32 colorPar) |
55 | 48 |
{ |
69 | 49 |
this._tcBegin = tcBeginPar; |
50 |
this._dur = durPar; |
|
51 |
this._gestureType = gesturePar; |
|
150
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
52 |
this._color = colorPar; |
69 | 53 |
|
54 |
//AnnotationAdded(this, new AnnotationAddedEventArg(_tcBegin, _dur, _gestureType)); |
|
55 |
||
56 |
} |
|
55 | 57 |
|
69 | 58 |
public float TcBegin |
59 |
{ |
|
60 |
get { return _tcBegin; } |
|
61 |
set |
|
62 |
{ |
|
63 |
if (value == _tcBegin || float.IsNaN(value)) |
|
64 |
return; |
|
65 |
_tcBegin = value; |
|
66 |
} |
|
67 |
} |
|
68 |
public float Dur |
|
69 |
{ |
|
70 |
get { return _dur; } |
|
71 |
set |
|
72 |
{ |
|
73 |
if (value == _dur || float.IsNaN(value)) |
|
74 |
return; |
|
75 |
_dur = value; |
|
76 |
} |
|
77 |
} |
|
78 |
public String GestureType |
|
79 |
{ |
|
80 |
get { return _gestureType; } |
|
81 |
set |
|
82 |
{ |
|
83 |
if (value == _gestureType || String.IsNullOrEmpty(value)) |
|
84 |
return; |
|
85 |
_gestureType = value; |
|
86 |
} |
|
55 | 87 |
} |
150
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
88 |
public UInt32 Color |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
89 |
{ |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
90 |
get { return _color; } |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
91 |
set |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
92 |
{ |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
93 |
if (value == _color) |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
94 |
return; |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
95 |
_color = value; |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
96 |
} |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
97 |
} |
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
69
diff
changeset
|
98 |
|
55 | 99 |
} |
100 |
||
101 |
} |