author | ARIAS Santiago |
Tue, 24 Nov 2009 07:50:17 +0100 | |
changeset 224 | 874de6d84a2e |
parent 216 | 45d2dff788f2 |
child 225 | b60e13ed75c8 |
permissions | -rw-r--r-- |
10 | 1 |
using System; |
69 | 2 |
using System.Collections.Generic; |
10 | 3 |
using System.IO; |
4 |
using System.Net; |
|
5 |
using System.Windows; |
|
6 |
using System.Windows.Controls; |
|
7 |
using System.Windows.Data; |
|
143 | 8 |
using System.Windows.Input; |
10 | 9 |
using System.Windows.Media; |
10 |
using System.Windows.Media.Animation; |
|
11 |
using System.Windows.Navigation; |
|
34 | 12 |
using System.Windows.Controls.Primitives; |
140
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
13 |
using Microsoft.Surface.Presentation; |
34 | 14 |
using Microsoft.Surface.Presentation.Controls; |
15 |
using System.Windows.Threading; |
|
10 | 16 |
|
69 | 17 |
using FingersDance.Data; |
18 |
using FingersDance.ViewModels; |
|
143 | 19 |
using FingersDance.Views; |
140
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
20 |
using FingersDance.Control.Close; |
203
2948b34324bb
first step of adding annotation from a recognised gesture.
cavaliet
parents:
196
diff
changeset
|
21 |
using GestureControl; |
69 | 22 |
|
10 | 23 |
namespace FingersDance.Control.TimeLine |
24 |
{ |
|
25 |
public partial class UserControlTimeLine |
|
34 | 26 |
{ |
27 |
||
28 |
#region Variables |
|
29 |
private DispatcherTimer timer; |
|
30 |
private bool isDragging = false; |
|
31 |
private bool finishedDragging = false; |
|
32 |
#endregion |
|
140
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
33 |
|
34 | 34 |
public event EventHandler DragStarted; |
35 |
public event EventHandler DragCompleted; |
|
36 |
public event EventHandler TimerTick; |
|
195
48b3139bb182
Dictionnaire de données
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
194
diff
changeset
|
37 |
public event EventHandler AnnotationAdded; |
48b3139bb182
Dictionnaire de données
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
194
diff
changeset
|
38 |
public event EventHandler AnnotationRemoved; |
216
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
39 |
public event EventHandler<NewGestureRecognizedEventArg> NewGestureRecognized; |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
40 |
//SAR |
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
41 |
public event EventHandler OnSuccessAnnotation; |
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
42 |
//ENDSAR |
34 | 43 |
|
124 | 44 |
private double totalmilliseconds; |
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
|
45 |
|
166
33c2e634df13
update drag and drop for dragged annotation to be well displayed and avoid DnD problems
cavaliet
parents:
162
diff
changeset
|
46 |
private float AnnotWidth = 850 + 15; // The surfaceListBox adds 15 pixels between each item |
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
47 |
private Cutting cut; |
143 | 48 |
private Boolean AnnotWaiting = false; |
49 |
private float AnnotTcBegin; |
|
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
|
50 |
private Color CurrentColor; |
74
7ce946833eae
First step of data binding where we can add an annotation by clicking on the timeline
cavaliet
parents:
69
diff
changeset
|
51 |
|
140
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
52 |
private AnnotationViewModel canceledAnnotationVM; |
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
53 |
|
34 | 54 |
#region Properties |
55 |
||
56 |
public SurfaceSlider Slider |
|
10 | 57 |
{ |
34 | 58 |
get |
59 |
{ |
|
60 |
return slider; |
|
10 | 61 |
} |
34 | 62 |
set |
63 |
{ |
|
64 |
slider = value; |
|
10 | 65 |
} |
66 |
} |
|
67 |
|
|
34 | 68 |
public bool IsDragging |
69 |
{ |
|
70 |
get |
|
71 |
{ |
|
72 |
return isDragging; |
|
73 |
} |
|
74 |
set |
|
75 |
{ |
|
76 |
isDragging = value; |
|
77 |
} |
|
78 |
} |
|
79 |
||
80 |
public bool FinishedDragging |
|
81 |
{ |
|
82 |
get |
|
83 |
{ |
|
84 |
return finishedDragging; |
|
85 |
} |
|
86 |
set |
|
87 |
{ |
|
88 |
finishedDragging = value; |
|
89 |
} |
|
90 |
} |
|
91 |
||
92 |
public DispatcherTimer Timer |
|
93 |
{ |
|
94 |
get |
|
95 |
{ |
|
96 |
return timer; |
|
97 |
} |
|
98 |
set |
|
99 |
{ |
|
100 |
timer = value; |
|
101 |
} |
|
102 |
} |
|
103 |
#endregion |
|
104 |
||
105 |
||
168
d70ee2002f75
Thumb Timeline Rotation and Debug Closing Panels
ARIAS Santiago
parents:
162
diff
changeset
|
106 |
#region Constructors |
d70ee2002f75
Thumb Timeline Rotation and Debug Closing Panels
ARIAS Santiago
parents:
162
diff
changeset
|
107 |
|
d70ee2002f75
Thumb Timeline Rotation and Debug Closing Panels
ARIAS Santiago
parents:
162
diff
changeset
|
108 |
public UserControlTimeLine() |
143 | 109 |
{ |
10 | 110 |
this.InitializeComponent(); |
140
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
111 |
|
10 | 112 |
// Insert code required on object creation below this point. |
168
d70ee2002f75
Thumb Timeline Rotation and Debug Closing Panels
ARIAS Santiago
parents:
162
diff
changeset
|
113 |
|
d70ee2002f75
Thumb Timeline Rotation and Debug Closing Panels
ARIAS Santiago
parents:
162
diff
changeset
|
114 |
} |
d70ee2002f75
Thumb Timeline Rotation and Debug Closing Panels
ARIAS Santiago
parents:
162
diff
changeset
|
115 |
#endregion |
10 | 116 |
|
124 | 117 |
public void initslider(double totalmillisecondsPar) |
34 | 118 |
{ |
124 | 119 |
totalmilliseconds = totalmillisecondsPar; |
34 | 120 |
slider.Maximum = totalmilliseconds; |
124 | 121 |
// When the timeline is resized, we catch the resize event to define TimelineView's good scale |
122 |
this.SizeChanged += new SizeChangedEventHandler(UserControlTimeLine_SizeChanged); |
|
167
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
166
diff
changeset
|
123 |
|
143 | 124 |
tv.listview.PreviewContactDown += listview_PreviewContactDown; |
125 |
SurfaceDragDrop.AddDragCanceledHandler(tv.listview, onDragCanceled); |
|
126 |
||
127 |
UserControlTimeLine_SizeChanged(null, null); |
|
128 |
||
129 |
slider_ContactTapGesture(this, null); |
|
130 |
||
34 | 131 |
} |
132 |
||
124 | 133 |
void UserControlTimeLine_SizeChanged(object sender, SizeChangedEventArgs e) |
134 |
{ |
|
135 |
// When scaleX = 1, 1 second = 1 pixel. To calculate the new scale, we take the real width in account. |
|
167
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
166
diff
changeset
|
136 |
tv.ScaleX = (this.ActualWidth-30) / (totalmilliseconds / 1000); |
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
|
137 |
//tv.Width = this.ActualWidth - 30; |
124 | 138 |
|
139 |
} |
|
140 |
||
34 | 141 |
#region Timer |
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
142 |
public void initTimer(Color col, Cutting cutPar) |
34 | 143 |
{ |
144 |
timer = new DispatcherTimer(); |
|
145 |
timer.Interval = new TimeSpan(0, 0, 0, 0, 100); |
|
146 |
timer.Tick += new EventHandler(timer_Tick); |
|
150
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
146
diff
changeset
|
147 |
|
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
|
148 |
CurrentColor = col; |
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
149 |
|
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
|
150 |
// DATA BINDING from the cutting sent in parameter (initialised before by the userPanel with the global project) |
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
151 |
cut = cutPar; |
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:
190
diff
changeset
|
152 |
//cut.AnnotList = new List<Annotation>(); |
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:
190
diff
changeset
|
153 |
//cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), 0, 10, "Axe Cam 1", CurrentColor)); |
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:
190
diff
changeset
|
154 |
//cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), 100 - (1 * AnnotWidth), 70, "Mvt Cam 2")); |
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:
190
diff
changeset
|
155 |
//cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), 200 - (2 * AnnotWidth), 50, "Saut 3")); |
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:
190
diff
changeset
|
156 |
//cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), 100 - (3 * AnnotWidth), 20, "Saut 4")); |
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:
190
diff
changeset
|
157 |
//cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), 120 - (4 * AnnotWidth), 50, "Saut 5")); |
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:
190
diff
changeset
|
158 |
|
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
207
diff
changeset
|
159 |
if(cut!=null) |
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
207
diff
changeset
|
160 |
tv.DataContext = new CuttingViewModel(cut, AnnotWidth); |
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
|
161 |
|
34 | 162 |
} |
163 |
||
164 |
public void timerStart() |
|
165 |
{ |
|
166 |
if (timer != null) |
|
167 |
timer.Start(); |
|
168 |
} |
|
169 |
void timer_Tick(object sender, EventArgs e) |
|
10 | 170 |
{ |
34 | 171 |
OnTimerTick(); |
172 |
if (!isDragging) |
|
173 |
{ |
|
174 |
//slider.Value = media.Position.TotalMilliseconds; |
|
175 |
} |
|
176 |
if (finishedDragging) |
|
177 |
{ |
|
178 |
//int SliderValue = (int)slider.Value; |
|
179 |
//TimeSpan ts = new TimeSpan(0, 0, 0, 0, SliderValue); |
|
180 |
// media.Position = ts; |
|
181 |
// media.Play(); |
|
182 |
// isDragging = false; |
|
183 |
//finishedDragging = false; |
|
184 |
} |
|
185 |
} |
|
186 |
protected virtual void OnTimerTick() |
|
187 |
{ |
|
188 |
if (TimerTick != null) |
|
189 |
TimerTick(this, new EventArgs()); |
|
10 | 190 |
} |
34 | 191 |
|
192 |
#endregion |
|
193 |
||
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
|
194 |
#region SliderDrag |
143 | 195 |
private void sliderPosition_DragStarted(object sender, DragStartedEventArgs e) |
34 | 196 |
{ |
197 |
isDragging = true; |
|
198 |
OnDragStarted(); |
|
199 |
// media.Pause(); |
|
200 |
} |
|
201 |
protected virtual void OnDragStarted() |
|
202 |
{ |
|
203 |
if (DragStarted != null) |
|
204 |
DragStarted(this, new EventArgs()); |
|
205 |
} |
|
206 |
||
143 | 207 |
private void sliderPosition_DragCompleted(object sender, DragCompletedEventArgs e) |
34 | 208 |
{ |
209 |
finishedDragging = true; |
|
210 |
OnDragCompleted(); |
|
211 |
} |
|
212 |
protected virtual void OnDragCompleted() |
|
213 |
{ |
|
214 |
if (DragCompleted != null) |
|
215 |
DragCompleted(this, new EventArgs()); |
|
216 |
} |
|
217 |
||
74
7ce946833eae
First step of data binding where we can add an annotation by clicking on the timeline
cavaliet
parents:
69
diff
changeset
|
218 |
private void slider_ContactTapGesture(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
7ce946833eae
First step of data binding where we can add an annotation by clicking on the timeline
cavaliet
parents:
69
diff
changeset
|
219 |
{ |
143 | 220 |
//startOrEndAnnotation(); |
221 |
} |
|
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
|
222 |
#endregion |
143 | 223 |
|
168
d70ee2002f75
Thumb Timeline Rotation and Debug Closing Panels
ARIAS Santiago
parents:
162
diff
changeset
|
224 |
public void thumbRotation(bool isplaying) |
d70ee2002f75
Thumb Timeline Rotation and Debug Closing Panels
ARIAS Santiago
parents:
162
diff
changeset
|
225 |
{ |
d70ee2002f75
Thumb Timeline Rotation and Debug Closing Panels
ARIAS Santiago
parents:
162
diff
changeset
|
226 |
//Templateslider.Style.Setters["Template"] |
d70ee2002f75
Thumb Timeline Rotation and Debug Closing Panels
ARIAS Santiago
parents:
162
diff
changeset
|
227 |
if(isplaying) |
d70ee2002f75
Thumb Timeline Rotation and Debug Closing Panels
ARIAS Santiago
parents:
162
diff
changeset
|
228 |
slider.Style = FindResource("FingersDance.Control.Slider") as Style; |
d70ee2002f75
Thumb Timeline Rotation and Debug Closing Panels
ARIAS Santiago
parents:
162
diff
changeset
|
229 |
else |
d70ee2002f75
Thumb Timeline Rotation and Debug Closing Panels
ARIAS Santiago
parents:
162
diff
changeset
|
230 |
slider.Style = FindResource("SurfaceSliderStylePause") as Style; |
d70ee2002f75
Thumb Timeline Rotation and Debug Closing Panels
ARIAS Santiago
parents:
162
diff
changeset
|
231 |
} |
203
2948b34324bb
first step of adding annotation from a recognised gesture.
cavaliet
parents:
196
diff
changeset
|
232 |
|
143 | 233 |
public Boolean isAnnotationAccepted(AnnotationViewModel avm) |
234 |
{ |
|
235 |
Boolean annotOk = true; |
|
236 |
// We check if the annotation's begin and end timecodes allow a new annotation creation |
|
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
237 |
if (cut != null && AnnotWaiting == false) |
143 | 238 |
{ |
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
239 |
foreach (Annotation a in cut.AnnotList) |
143 | 240 |
{ |
241 |
//Console.WriteLine("a.TcBegin = " + a.TcBegin + ", avm.TcBegin = " + avm.TcBegin + ", tcOut = " + (a.TcBegin + a.Dur)); |
|
242 |
// Check begin TC |
|
243 |
if (a.TcBegin <= avm.TcBegin && avm.TcBegin <= (a.TcBegin + a.Dur)) |
|
244 |
{ |
|
245 |
annotOk = false; |
|
246 |
} |
|
247 |
// Check end tc and if the new annotation will not cover any other |
|
248 |
float endTC = avm.TcBegin + avm.Dur; |
|
249 |
//Console.WriteLine("a.TcBegin = " + a.TcBegin + ", tcOut = " + (a.TcBegin + a.Dur) + ", AnnotTcBegin = " + AnnotTcBegin + ", currentTC = " + currentTC); |
|
250 |
if (a.TcBegin <= endTC && endTC <= (a.TcBegin + a.Dur) || (avm.TcBegin < a.TcBegin && (a.TcBegin + a.Dur) < endTC)) |
|
251 |
{ |
|
252 |
annotOk = false; |
|
253 |
} |
|
254 |
} |
|
255 |
} |
|
256 |
else |
|
257 |
{ |
|
258 |
annotOk = false; |
|
259 |
} |
|
260 |
return annotOk; |
|
261 |
||
75
99d003723474
data binding second step. we can add annotation by clicking on menu buttons or timeline.
cavaliet
parents:
74
diff
changeset
|
262 |
} |
74
7ce946833eae
First step of data binding where we can add an annotation by clicking on the timeline
cavaliet
parents:
69
diff
changeset
|
263 |
|
143 | 264 |
public void addAnnotation(AnnotationViewModel avm) |
75
99d003723474
data binding second step. we can add annotation by clicking on menu buttons or timeline.
cavaliet
parents:
74
diff
changeset
|
265 |
{ |
143 | 266 |
//Console.WriteLine("addAnnotation = " + avm.TcBegin + ", " + avm.Dur + ", " + avm.GestureType); |
267 |
Boolean annotOk = true; |
|
268 |
// We check if the annotation's begin and end timecodes allow a new annotation creation |
|
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
269 |
if (cut != null && AnnotWaiting == false) |
143 | 270 |
{ |
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
271 |
foreach (Annotation a in cut.AnnotList) |
143 | 272 |
{ |
273 |
//Console.WriteLine("a.TcBegin = " + a.TcBegin + ", avm.TcBegin = " + avm.TcBegin + ", tcOut = " + (a.TcBegin + a.Dur)); |
|
274 |
// Check begin TC |
|
275 |
if (a.TcBegin <= avm.TcBegin && avm.TcBegin <= (a.TcBegin + a.Dur)) |
|
276 |
{ |
|
277 |
annotOk = false; |
|
278 |
} |
|
279 |
// Check end tc and if the new annotation will not cover any other |
|
280 |
float endTC = avm.TcBegin + avm.Dur; |
|
281 |
//Console.WriteLine("a.TcBegin = " + a.TcBegin + ", tcOut = " + (a.TcBegin + a.Dur) + ", AnnotTcBegin = " + AnnotTcBegin + ", currentTC = " + currentTC); |
|
282 |
if (a.TcBegin <= endTC && endTC <= (a.TcBegin + a.Dur) || (avm.TcBegin < a.TcBegin && (a.TcBegin + a.Dur) < endTC)) |
|
283 |
{ |
|
284 |
annotOk = false; |
|
285 |
} |
|
286 |
} |
|
287 |
// If everything's fine, we create the new one |
|
288 |
if (annotOk == true) |
|
289 |
{ |
|
195
48b3139bb182
Dictionnaire de données
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
194
diff
changeset
|
290 |
Annotation annotation = new Annotation("s_" + System.Guid.NewGuid(), avm.TcBegin, avm.Dur, avm.GestureType, avm.Color); |
48b3139bb182
Dictionnaire de données
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
194
diff
changeset
|
291 |
cut.AnnotList.Add(annotation); |
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
292 |
tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX); |
195
48b3139bb182
Dictionnaire de données
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
194
diff
changeset
|
293 |
if (AnnotationAdded != null) |
48b3139bb182
Dictionnaire de données
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
194
diff
changeset
|
294 |
AnnotationAdded(annotation, null); |
143 | 295 |
AnnotWaiting = false; |
296 |
} |
|
297 |
||
298 |
} |
|
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
299 |
//Raise Event to display Annotation in all Openned UserPanels |
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
300 |
if (annotOk) |
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
301 |
OnSuccessAnnotation(this, new EventArgs()); |
143 | 302 |
|
303 |
} |
|
304 |
||
216
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
305 |
public void addAnnotation(float start, float dur, String gestureType) |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
306 |
{ |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
307 |
addAnnotation(new AnnotationViewModel(new Annotation("temp", start, dur, gestureType, CurrentColor), 0)); |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
308 |
} |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
309 |
|
194 | 310 |
public void startOrEndAnnotation(String gestureType) |
143 | 311 |
{ |
312 |
Boolean annotOk = true; |
|
313 |
// We open a new annotation |
|
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
314 |
if (cut != null && AnnotWaiting == false) |
124 | 315 |
{ |
143 | 316 |
AnnotTcBegin = (float)slider.Value / 1000; |
317 |
||
318 |
// First we check if the new annotation will not cover any |
|
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
319 |
foreach (Annotation a in cut.AnnotList) |
143 | 320 |
{ |
321 |
//Console.WriteLine("a.TcBegin = " + a.TcBegin + ", AnnotTcBegin = " + AnnotTcBegin + ", tcOut = " + (a.TcBegin + a.Dur)); |
|
322 |
if (a.TcBegin <= AnnotTcBegin && AnnotTcBegin <= (a.TcBegin + a.Dur)) |
|
323 |
{ |
|
324 |
annotOk = false; |
|
325 |
} |
|
326 |
} |
|
327 |
// if not, we mark the beginning |
|
328 |
if (annotOk == true) |
|
329 |
{ |
|
196
e738cd9c1b99
Dictionnaire de données
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
195
diff
changeset
|
330 |
Annotation annotation = new Annotation("s_" + System.Guid.NewGuid(), AnnotTcBegin, 0, gestureType, CurrentColor); |
195
48b3139bb182
Dictionnaire de données
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
194
diff
changeset
|
331 |
cut.AnnotList.Add(annotation); |
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
332 |
tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX); |
143 | 333 |
AnnotWaiting = true; |
334 |
} |
|
335 |
} |
|
336 |
// We close the current opened annotation... |
|
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
337 |
else if (cut != null && AnnotWaiting == true && (((float)slider.Value/1000)>AnnotTcBegin)) |
143 | 338 |
{ |
339 |
// ... by setting setting the good beginning and the good duration |
|
340 |
float currentTC = (float)slider.Value / 1000; |
|
341 |
float currentDuration = currentTC - AnnotTcBegin; |
|
342 |
||
343 |
// First we check if the new annotation will not cover any (AnnotTcBegin was already checked) |
|
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
344 |
foreach (Annotation a in cut.AnnotList) |
143 | 345 |
{ |
346 |
//Console.WriteLine("a.TcBegin = " + a.TcBegin + ", tcOut = " + (a.TcBegin + a.Dur) + ", AnnotTcBegin = " + AnnotTcBegin + ", currentTC = " + currentTC); |
|
347 |
if (a.TcBegin <= currentTC && currentTC <= (a.TcBegin + a.Dur) || (AnnotTcBegin < a.TcBegin && (a.TcBegin + a.Dur) < currentTC)) |
|
348 |
{ |
|
349 |
annotOk = false; |
|
350 |
} |
|
351 |
} |
|
352 |
||
353 |
if (annotOk == true) |
|
354 |
{ |
|
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
355 |
cut.AnnotList.RemoveAt(cut.AnnotList.Count - 1); |
195
48b3139bb182
Dictionnaire de données
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
194
diff
changeset
|
356 |
Annotation annotation = new Annotation("s_" + System.Guid.NewGuid(), AnnotTcBegin, currentDuration, gestureType, CurrentColor); |
48b3139bb182
Dictionnaire de données
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
194
diff
changeset
|
357 |
cut.AnnotList.Add(annotation); |
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
358 |
//Console.WriteLine("currentTimecode = " + AnnotTcBegin + ", curDur = " + currentDuration + ", nb = " + cut.AnnotList.Count + ", res = " + (AnnotTcBegin - (cut.AnnotList.Count * AnnotWidth))); |
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
359 |
tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX); |
143 | 360 |
AnnotWaiting = false; |
195
48b3139bb182
Dictionnaire de données
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
194
diff
changeset
|
361 |
if (AnnotationAdded != null) |
48b3139bb182
Dictionnaire de données
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
194
diff
changeset
|
362 |
AnnotationAdded(annotation, null); |
143 | 363 |
} |
167
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
166
diff
changeset
|
364 |
//Raise Event to display Annotation in all Openned UserPanels |
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
166
diff
changeset
|
365 |
if (annotOk) |
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
166
diff
changeset
|
366 |
OnSuccessAnnotation(this, new EventArgs()); |
124 | 367 |
} |
74
7ce946833eae
First step of data binding where we can add an annotation by clicking on the timeline
cavaliet
parents:
69
diff
changeset
|
368 |
} |
7ce946833eae
First step of data binding where we can add an annotation by clicking on the timeline
cavaliet
parents:
69
diff
changeset
|
369 |
|
143 | 370 |
private void listview_PreviewContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
371 |
{ |
|
372 |
FrameworkElement findSource = e.OriginalSource as FrameworkElement; |
|
373 |
SurfaceListBoxItem draggedElement = null; |
|
374 |
||
375 |
// Find the touched SurfaceListBoxItem object. |
|
376 |
while (draggedElement == null && findSource != null) |
|
377 |
{ |
|
378 |
if ((draggedElement = findSource as SurfaceListBoxItem) == null) |
|
379 |
{ |
|
380 |
findSource = VisualTreeHelper.GetParent(findSource) as FrameworkElement; |
|
381 |
} |
|
382 |
} |
|
383 |
||
384 |
if (draggedElement == null) |
|
385 |
{ |
|
386 |
return; |
|
387 |
} |
|
388 |
||
389 |
// Create the cursor visual. |
|
390 |
ContentControl cursorVisual = new ContentControl() |
|
391 |
{ |
|
392 |
Content = new TimelineAnnotationView() |
|
393 |
{ |
|
394 |
DataContext = findSource.DataContext |
|
395 |
} |
|
396 |
}; |
|
397 |
||
398 |
// We apply the current scale to the dragged annotation |
|
166
33c2e634df13
update drag and drop for dragged annotation to be well displayed and avoid DnD problems
cavaliet
parents:
162
diff
changeset
|
399 |
((TimelineAnnotationView)cursorVisual.Content).RenderTransform = new TransformGroup(); |
33c2e634df13
update drag and drop for dragged annotation to be well displayed and avoid DnD problems
cavaliet
parents:
162
diff
changeset
|
400 |
((TransformGroup)((TimelineAnnotationView)cursorVisual.Content).RenderTransform).Children.Add(tv.listview.RenderTransform); |
167
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
166
diff
changeset
|
401 |
// We apply a translate transform to place correctly the dragged annotation |
166
33c2e634df13
update drag and drop for dragged annotation to be well displayed and avoid DnD problems
cavaliet
parents:
162
diff
changeset
|
402 |
((TransformGroup)((TimelineAnnotationView)cursorVisual.Content).RenderTransform).Children.Add(new TranslateTransform((AnnotWidth / 2) * (1 - ((ScaleTransform)tv.listview.RenderTransform).ScaleX), 0)); |
33c2e634df13
update drag and drop for dragged annotation to be well displayed and avoid DnD problems
cavaliet
parents:
162
diff
changeset
|
403 |
|
143 | 404 |
// Add a handler. This will enable the application to change the visual cues. (NOT USEFUL IN FINGERSDANCE CASE) |
405 |
//SurfaceDragDrop.AddTargetChangedHandler(cursorVisual, OnTargetChanged); |
|
406 |
||
407 |
// Create a list of input devices. Add the contacts that |
|
408 |
// are currently captured within the dragged element and |
|
409 |
// the current contact (if it isn't already in the list). |
|
410 |
List<InputDevice> devices = new List<InputDevice>(); |
|
411 |
devices.Add(e.Contact); |
|
412 |
foreach (Contact contact in draggedElement.ContactsCapturedWithin) |
|
413 |
{ |
|
414 |
if (contact != e.Contact) |
|
415 |
{ |
|
416 |
devices.Add(contact); |
|
417 |
} |
|
418 |
} |
|
419 |
||
420 |
// Get the drag source object |
|
421 |
ItemsControl dragSource = ItemsControl.ItemsControlFromItemContainer(draggedElement); |
|
422 |
||
423 |
bool startDragOkay = |
|
424 |
SurfaceDragDrop.BeginDragDrop( |
|
425 |
dragSource, // The SurfaceListBox object that the cursor is dragged out from. |
|
426 |
draggedElement, // The SurfaceListBoxItem object that is dragged from the drag source. |
|
427 |
cursorVisual, // The visual element of the cursor. |
|
428 |
draggedElement.DataContext, // The data associated with the cursor. |
|
429 |
devices, // The input devices that start dragging the cursor. |
|
430 |
DragDropEffects.Move); // The allowed drag-and-drop effects of the operation. |
|
431 |
||
432 |
// If the drag began successfully, set e.Handled to true. |
|
433 |
// Otherwise SurfaceListBoxItem captures the contact |
|
434 |
// and causes the drag operation to fail. |
|
435 |
e.Handled = startDragOkay; |
|
436 |
} |
|
437 |
||
438 |
private void onDragCanceled(Object sender, SurfaceDragDropEventArgs e) |
|
439 |
{ |
|
440 |
// We check if the annotation is well one of the current annotations |
|
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
441 |
if (cut != null) |
143 | 442 |
{ |
140
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
443 |
// e.Cursor.Visual is the ContentControl, so its Content is the dragged TimelineAnnotationView |
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
444 |
canceledAnnotationVM = (AnnotationViewModel)((TimelineAnnotationView)((ContentControl)e.Cursor.Visual).Content).DataContext; |
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
445 |
confirmCancelPopup.Visibility = Visibility.Visible; |
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
446 |
} |
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
447 |
} |
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
448 |
|
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
449 |
private void confirmCancelPopup_ConfirmYesOrNo(object sender, ConfirmEventArgs e) |
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
450 |
{ |
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
451 |
// We check if the annotation is well one of the current annotations |
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
452 |
if (cut != null && canceledAnnotationVM != null && e.Confirmed == true) |
140
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
453 |
{ |
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
454 |
foreach (Annotation a in cut.AnnotList) |
143 | 455 |
{ |
140
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
456 |
// Check begin TcBegin, duration and gesture type |
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
457 |
if (a.TcBegin == canceledAnnotationVM.TcBegin && a.Dur == canceledAnnotationVM.Dur && a.GestureType == canceledAnnotationVM.GestureType) |
143 | 458 |
{ |
140
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
459 |
// We found the good annotation so we can remove it |
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
460 |
cut.AnnotList.Remove(a); |
143 | 461 |
// We redisplay the timeline |
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
462 |
//CuttingVM.setListFromAnnotations(cut.AnnotList, AnnotWidth, tv.ScaleX); |
143 | 463 |
tv.DataContext = null; |
190
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
464 |
tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX); |
619ca3ae13c7
MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents:
186
diff
changeset
|
465 |
// We close the popup and return as soon as we removed the annotation to avoid an error on cut.AnnotList, which is just modified |
140
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
466 |
confirmCancelPopup.Visibility = Visibility.Hidden; |
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
467 |
canceledAnnotationVM = null; |
195
48b3139bb182
Dictionnaire de données
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
194
diff
changeset
|
468 |
if (AnnotationRemoved != null) |
48b3139bb182
Dictionnaire de données
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
194
diff
changeset
|
469 |
AnnotationRemoved(a, null); |
143 | 470 |
return; |
471 |
} |
|
472 |
} |
|
473 |
} |
|
140
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
474 |
confirmCancelPopup.Visibility = Visibility.Hidden; |
fc7c12f9da30
Add a confirm dialog box before deleting an annotation by drag and drop. Now the UserControlClose is a generic confirm dialog box sending a ConfirmYesOrNo Event.
cavaliet
parents:
136
diff
changeset
|
475 |
canceledAnnotationVM = null; |
143 | 476 |
} |
477 |
||
216
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
478 |
// |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
479 |
// Is search mode, function of the search gesture, we have to be able to update frequently the current list of annotation |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
480 |
// |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
481 |
public void updateAnnotationList(List<Annotation> la) |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
482 |
{ |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
483 |
tv.DataContext = new CuttingViewModel(new Cutting("temp", "search", la), AnnotWidth, tv.ScaleX); |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
484 |
} |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
485 |
|
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
486 |
// |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
487 |
// Is search mode, we need the timeline to send the NewGestureEvent |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
488 |
// |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
489 |
public void sendNewGesture(String gestureName) |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
490 |
{ |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
491 |
NewGestureRecognized(this, new NewGestureRecognizedEventArg(gestureName)); |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
492 |
} |
224 | 493 |
} |
216
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
494 |
|
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
495 |
|
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
496 |
/// <summary> |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
497 |
/// AnnotationOrSearchEventArg |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
498 |
/// </summary> |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
499 |
public class NewGestureRecognizedEventArg : EventArgs |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
500 |
{ |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
501 |
public String GestureName |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
502 |
{ |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
503 |
get; |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
504 |
set; |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
505 |
} |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
506 |
|
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
507 |
public NewGestureRecognizedEventArg(String gestureName) |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
508 |
{ |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
509 |
|
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
510 |
GestureName = gestureName; |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
511 |
|
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
512 |
} |
45d2dff788f2
almost last step of search : menu is active and we listen to the recognised event from the player.
cavaliet
parents:
215
diff
changeset
|
513 |
} |
10 | 514 |
} |