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; |
|
11 |
private float _dur; |
|
12 |
private String _gestureType; |
|
13 |
|
69
|
14 |
public float TcBegin |
55
|
15 |
{ |
|
16 |
get { return this._tcBegin; } |
|
17 |
} |
69
|
18 |
public float Dur |
55
|
19 |
{ |
|
20 |
get { return this._dur; } |
|
21 |
} |
69
|
22 |
public String GestureType |
55
|
23 |
{ |
|
24 |
get { return this._gestureType; } |
|
25 |
} |
|
26 |
|
|
27 |
public AnnotationAddedEventArg(float tcBegin, float dur, String gestureType) { |
|
28 |
|
|
29 |
this._tcBegin = tcBegin; |
|
30 |
this._dur = dur; |
|
31 |
this._gestureType = gestureType; |
|
32 |
|
|
33 |
} |
|
34 |
|
|
35 |
} |
|
36 |
|
69
|
37 |
public class Annotation |
55
|
38 |
{ |
69
|
39 |
private float _tcBegin; |
|
40 |
private float _dur; |
|
41 |
private string _gestureType; |
55
|
42 |
|
69
|
43 |
//public event EventHandler<AnnotationAddedEventArg> AnnotationAdded; |
55
|
44 |
|
|
45 |
public Annotation(float tcBeginPar, float durPar, string gesturePar) |
|
46 |
{ |
69
|
47 |
this._tcBegin = tcBeginPar; |
|
48 |
this._dur = durPar; |
|
49 |
this._gestureType = gesturePar; |
|
50 |
|
|
51 |
//AnnotationAdded(this, new AnnotationAddedEventArg(_tcBegin, _dur, _gestureType)); |
|
52 |
|
|
53 |
} |
55
|
54 |
|
69
|
55 |
public float TcBegin |
|
56 |
{ |
|
57 |
get { return _tcBegin; } |
|
58 |
set |
|
59 |
{ |
|
60 |
if (value == _tcBegin || float.IsNaN(value)) |
|
61 |
return; |
|
62 |
_tcBegin = value; |
|
63 |
} |
|
64 |
} |
|
65 |
public float Dur |
|
66 |
{ |
|
67 |
get { return _dur; } |
|
68 |
set |
|
69 |
{ |
|
70 |
if (value == _dur || float.IsNaN(value)) |
|
71 |
return; |
|
72 |
_dur = value; |
|
73 |
} |
|
74 |
} |
|
75 |
public String GestureType |
|
76 |
{ |
|
77 |
get { return _gestureType; } |
|
78 |
set |
|
79 |
{ |
|
80 |
if (value == _gestureType || String.IsNullOrEmpty(value)) |
|
81 |
return; |
|
82 |
_gestureType = value; |
|
83 |
} |
55
|
84 |
} |
|
85 |
|
|
86 |
} |
|
87 |
|
|
88 |
} |