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