author | cavaliet |
Tue, 24 Nov 2009 22:08:57 +0100 | |
changeset 229 | 05aba5def1fc |
parent 225 | b60e13ed75c8 |
child 230 | 010a2af88bb7 |
permissions | -rw-r--r-- |
45 | 1 |
using System; |
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
191
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
4 |
using System.Xml; |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
5 |
using System.Xml.Linq; |
45 | 6 |
using System.Text; |
7 |
using System.Windows; |
|
8 |
using System.Windows.Controls; |
|
9 |
using System.Windows.Data; |
|
10 |
using System.Windows.Documents; |
|
11 |
using System.Windows.Input; |
|
12 |
using System.Windows.Media; |
|
13 |
using System.Windows.Media.Imaging; |
|
14 |
using System.Windows.Shapes; |
|
15 |
using System.Windows.Threading; |
|
16 |
using Microsoft.Surface; |
|
17 |
using Microsoft.Surface.Presentation; |
|
18 |
using Microsoft.Surface.Presentation.Controls; |
|
19 |
||
60 | 20 |
using FingersDance.Control.UserPanel; |
82 | 21 |
using FingersDance.Control.Screen; |
143 | 22 |
using FingersDance.Control.Close; |
23 |
using FingersDance.ViewModels; |
|
24 |
using FingersDance.Data; |
|
156
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
152
diff
changeset
|
25 |
using FingersDance.Factory; |
60 | 26 |
|
45 | 27 |
namespace FingersDance |
28 |
{ |
|
29 |
/// <summary> |
|
30 |
/// Interaction logic for SurfaceWindow1.xaml |
|
31 |
/// </summary> |
|
32 |
public partial class SurfaceWindow1 : SurfaceWindow |
|
33 |
{ |
|
34 |
/// <summary> |
|
35 |
/// Default constructor. |
|
36 |
/// </summary> |
|
54
c724ac229181
Singleton de la factory
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
45
diff
changeset
|
37 |
/// |
60 | 38 |
#region Variables |
143 | 39 |
|
112 | 40 |
private UserControlUserPanel Panel1 = null; |
41 |
private UserControlUserPanel Panel2 = null; |
|
42 |
private UserControlUserPanel Panel3 = null; |
|
43 |
private UserControlUserPanel Panel4 = null; |
|
156
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
152
diff
changeset
|
44 |
ActionGenerator _Factory = (new ActionFactory()).GetGenerator(); |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
45 |
private MainViewModel _mainviewmodel = new MainViewModel(); |
60 | 46 |
#endregion |
54
c724ac229181
Singleton de la factory
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
45
diff
changeset
|
47 |
|
c724ac229181
Singleton de la factory
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
45
diff
changeset
|
48 |
|
143 | 49 |
#region Constructor |
45 | 50 |
public SurfaceWindow1() |
51 |
{ |
|
52 |
InitializeComponent(); |
|
60 | 53 |
//Permet d'initialiser l'inertie du Pivot une fois relach�. |
54 |
InitPivotInertia(); |
|
58
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
55 |
//Permet d'initialiser les quand Grid � la position initiale du pivot |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
56 |
InitGridPositions(); |
45 | 57 |
// Add handlers for Application activation events |
58 |
AddActivationHandlers(); |
|
217 | 59 |
// Add credit text |
60 |
CreditsText1.Text = CreditsText2.Text = CreditsText3.Text = CreditsText4.Text = |
|
225
b60e13ed75c8
Now an annotation has a list of gesture string and not simple gesture string. These are saved into and loaded from the ldt xml file.
cavaliet
parents:
224
diff
changeset
|
61 |
"MICROSOFT :\nPierre-Louis Xech\n\nEFREI :\nSantiago Arias\nRiley Ikni\nJonathan Pamphile\n\nSTRATE COLLEGE :\nAnnabelle Eug�nia\nHuieun Kim\nBaptiste Lanne\nIoana Ocnarescu\nVanessa Reiser\nDominique Sciamma\n\nINSTITUT DE RECHERCHE ET D'INNOVATION\nThibaut Cavali�\nYves-Marie Haussonne\nVincent Puig"; |
45 | 62 |
} |
143 | 63 |
#endregion |
64 |
||
65 |
#region Initialization |
|
45 | 66 |
|
60 | 67 |
private void InitPivotInertia() |
68 |
{ |
|
69 |
try |
|
70 |
{ |
|
77 | 71 |
ScatterViewItem item = (ScatterViewItem)scaterview.Items.GetItemAt(0); |
60 | 72 |
item.DecelerationRate = double.NaN; |
73 |
} |
|
74 |
catch (Exception ex) { } |
|
75 |
} |
|
76 |
||
58
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
77 |
private void InitGridPositions() |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
78 |
{ |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
79 |
//Initialise les 4 Grids � la positions initiale du Pivot. |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
80 |
try |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
81 |
{ |
77 | 82 |
ScatterViewItem item = (ScatterViewItem)scaterview.Items.GetItemAt(0); |
58
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
83 |
Grid1.Width =item.Center.X; |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
84 |
Grid1.Height = item.Center.Y; |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
85 |
|
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
86 |
Grid2.Width = item.Center.X; |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
87 |
Grid2.Height = 768 - item.Center.Y; |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
88 |
|
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
89 |
Grid3.Width = 1024 - item.Center.X; |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
90 |
Grid3.Height = 768 - item.Center.Y; |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
91 |
|
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
92 |
Grid4.Width = 1024 - item.Center.X; |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
93 |
Grid4.Height = item.Center.Y; |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
94 |
} |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
95 |
catch (Exception ex) { } |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
96 |
} |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
97 |
|
143 | 98 |
#endregion |
45 | 99 |
|
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
100 |
#region Application Default Functions |
45 | 101 |
/// <summary> |
102 |
/// Occurs when the window is about to close. |
|
103 |
/// </summary> |
|
104 |
/// <param name="e"></param> |
|
105 |
protected override void OnClosed(EventArgs e) |
|
106 |
{ |
|
107 |
base.OnClosed(e); |
|
108 |
||
109 |
// Remove handlers for Application activation events |
|
110 |
RemoveActivationHandlers(); |
|
111 |
} |
|
112 |
||
113 |
/// <summary> |
|
114 |
/// Adds handlers for Application activation events. |
|
115 |
/// </summary> |
|
116 |
private void AddActivationHandlers() |
|
117 |
{ |
|
118 |
// Subscribe to surface application activation events |
|
119 |
ApplicationLauncher.ApplicationActivated += OnApplicationActivated; |
|
120 |
ApplicationLauncher.ApplicationPreviewed += OnApplicationPreviewed; |
|
121 |
ApplicationLauncher.ApplicationDeactivated += OnApplicationDeactivated; |
|
122 |
} |
|
123 |
||
124 |
/// <summary> |
|
125 |
/// Removes handlers for Application activation events. |
|
126 |
/// </summary> |
|
127 |
private void RemoveActivationHandlers() |
|
128 |
{ |
|
129 |
// Unsubscribe from surface application activation events |
|
130 |
ApplicationLauncher.ApplicationActivated -= OnApplicationActivated; |
|
131 |
ApplicationLauncher.ApplicationPreviewed -= OnApplicationPreviewed; |
|
132 |
ApplicationLauncher.ApplicationDeactivated -= OnApplicationDeactivated; |
|
133 |
} |
|
134 |
||
135 |
/// <summary> |
|
136 |
/// This is called when application has been activated. |
|
137 |
/// </summary> |
|
138 |
/// <param name="sender"></param> |
|
139 |
/// <param name="e"></param> |
|
140 |
private void OnApplicationActivated(object sender, EventArgs e) |
|
141 |
{ |
|
142 |
//TODO: enable audio, animations here |
|
143 | 143 |
|
45 | 144 |
} |
145 |
||
146 |
/// <summary> |
|
147 |
/// This is called when application is in preview mode. |
|
148 |
/// </summary> |
|
149 |
/// <param name="sender"></param> |
|
150 |
/// <param name="e"></param> |
|
151 |
private void OnApplicationPreviewed(object sender, EventArgs e) |
|
152 |
{ |
|
153 |
//TODO: Disable audio here if it is enabled |
|
154 |
||
155 |
//TODO: optionally enable animations here |
|
156 |
} |
|
157 |
||
158 |
/// <summary> |
|
159 |
/// This is called when application has been deactivated. |
|
160 |
/// </summary> |
|
161 |
/// <param name="sender"></param> |
|
162 |
/// <param name="e"></param> |
|
163 |
private void OnApplicationDeactivated(object sender, EventArgs e) |
|
164 |
{ |
|
165 |
//TODO: disable audio, animations here |
|
166 |
} |
|
167 |
||
143 | 168 |
/// <summary> |
169 |
/// This is called when application has been loaded, we change the orientation |
|
170 |
/// of the application |
|
171 |
/// </summary> |
|
172 |
/// <param name="sender"></param> |
|
173 |
/// <param name="e"></param> |
|
174 |
private void mainSurfaceWindow_Loaded(object sender, RoutedEventArgs e) |
|
175 |
{ |
|
176 |
||
177 |
if (ApplicationLauncher.InitialOrientation == UserOrientation.Top) |
|
178 |
{ |
|
179 |
// Rotate the main canvas by 180 degrees. |
|
180 |
this.MainGrid.LayoutTransform = new RotateTransform(180.0); |
|
181 |
} |
|
182 |
else |
|
183 |
{ |
|
184 |
// Remove the rotate transform on the main canvas. |
|
185 |
this.MainGrid.LayoutTransform = null; |
|
186 |
} |
|
187 |
// Dismiss the loading screen. |
|
188 |
ApplicationLauncher.SignalApplicationLoadComplete(); |
|
189 |
} |
|
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
190 |
#endregion |
143 | 191 |
|
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
192 |
|
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
193 |
|
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
194 |
|
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
195 |
#region Pivot Actions |
77 | 196 |
private void scaterview_ContactChanged(object sender, ContactEventArgs e) |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
197 |
{ } |
77 | 198 |
private void ScatterViewItemPivot_ContactChanged(object sender, ContactEventArgs e) |
45 | 199 |
{ |
58
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
200 |
//Permet la MAJ des 4 Grids � la position du pivot |
45 | 201 |
try |
202 |
{ |
|
203 |
Grid1.Width = e.GetPosition(mainSurfaceWindow).X; |
|
204 |
Grid1.Height = e.GetPosition(mainSurfaceWindow).Y; |
|
205 |
||
60 | 206 |
Grid3.Width = e.GetPosition(mainSurfaceWindow).X; |
45 | 207 |
Grid3.Height = 768 - e.GetPosition(mainSurfaceWindow).Y; |
208 |
||
209 |
Grid4.Width = 1024 - e.GetPosition(mainSurfaceWindow).X; |
|
60 | 210 |
Grid4.Height = 768 - e.GetPosition(mainSurfaceWindow).Y; |
211 |
||
212 |
Grid2.Width = 1024 - e.GetPosition(mainSurfaceWindow).X; |
|
213 |
Grid2.Height = e.GetPosition(mainSurfaceWindow).Y; |
|
89 | 214 |
|
91 | 215 |
//GRISAGE |
216 |
//Grid1 |
|
217 |
if (Grid1.Width < (1024 / 4) || Grid2.Height < (768 / 4)) |
|
89 | 218 |
{ |
91 | 219 |
try |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
220 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
221 |
if (Panel1 != null) |
224 | 222 |
{ |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
223 |
Panel1.PlayerPause(); |
224 | 224 |
Panel1.PanelVisibility(Visibility.Hidden); |
225 |
} |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
226 |
Grid1.Children[1].Visibility = Visibility.Hidden; |
224 | 227 |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
228 |
} |
91 | 229 |
catch (Exception) { } |
89 | 230 |
} |
91 | 231 |
else |
232 |
{ |
|
233 |
try |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
234 |
{ |
224 | 235 |
Grid1.Children[1].Visibility = Visibility.Visible; |
236 |
if (Panel1 != null) |
|
237 |
{ |
|
238 |
Panel1.PanelVisibility(Visibility.Visible); |
|
239 |
} |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
240 |
} |
91 | 241 |
catch (Exception) { } |
242 |
} |
|
243 |
//Grid2 |
|
244 |
if (Grid2.Width < (1024 / 4) || Grid2.Height < (768 / 4)) |
|
89 | 245 |
{ |
91 | 246 |
try |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
247 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
248 |
if (Panel2 != null) |
224 | 249 |
{ |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
250 |
Panel2.PlayerPause(); |
224 | 251 |
Panel2.PanelVisibility(Visibility.Hidden); |
252 |
} |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
253 |
Grid2.Children[1].Visibility = Visibility.Hidden; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
254 |
} |
91 | 255 |
catch (Exception) { } |
256 |
} |
|
257 |
else |
|
258 |
{ |
|
259 |
try |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
260 |
{ |
224 | 261 |
Grid2.Children[1].Visibility = Visibility.Visible; |
262 |
if (Panel2 != null) |
|
263 |
{ |
|
264 |
Panel2.PanelVisibility(Visibility.Visible); |
|
265 |
} |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
266 |
} |
91 | 267 |
catch (Exception) { } |
89 | 268 |
} |
91 | 269 |
//Grid3 |
270 |
if (Grid3.Width < (1024 / 4) || Grid3.Height < (768 / 4)) |
|
89 | 271 |
{ |
91 | 272 |
try |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
273 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
274 |
if (Panel3 != null) |
224 | 275 |
{ |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
276 |
Panel3.PlayerPause(); |
224 | 277 |
Panel3.PanelVisibility(Visibility.Hidden); |
278 |
} |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
279 |
Grid3.Children[1].Visibility = Visibility.Hidden; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
280 |
} |
91 | 281 |
catch (Exception) { } |
282 |
} |
|
283 |
else |
|
284 |
{ |
|
285 |
try |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
286 |
{ |
224 | 287 |
Grid3.Children[1].Visibility = Visibility.Visible; |
288 |
if (Panel3 != null) |
|
289 |
{ |
|
290 |
Panel3.PanelVisibility(Visibility.Visible); |
|
291 |
} |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
292 |
} |
91 | 293 |
catch (Exception) { } |
89 | 294 |
} |
91 | 295 |
//Grid4 |
296 |
if (Grid4.Width < (1024 / 4) || Grid4.Height < (768 / 4)) |
|
89 | 297 |
{ |
91 | 298 |
try |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
299 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
300 |
if (Panel4 != null) |
224 | 301 |
{ |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
302 |
Panel4.PlayerPause(); |
224 | 303 |
Panel4.PanelVisibility(Visibility.Hidden); |
304 |
} |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
305 |
Grid4.Children[1].Visibility = Visibility.Hidden; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
306 |
} |
91 | 307 |
catch (Exception) { } |
89 | 308 |
} |
91 | 309 |
else |
310 |
{ |
|
311 |
try |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
312 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
313 |
Grid4.Children[1].Visibility = Visibility.Visible; |
224 | 314 |
if (Panel4 != null) |
315 |
{ |
|
316 |
Panel4.PanelVisibility(Visibility.Visible); |
|
317 |
} |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
318 |
} |
91 | 319 |
catch (Exception) { } |
320 |
} |
|
45 | 321 |
} |
91 | 322 |
catch (Exception) { } |
45 | 323 |
} |
60 | 324 |
|
224 | 325 |
//SAR |
326 |
private void ScatterViewItemPivot_ContactLeave(object sender, ContactEventArgs e) |
|
327 |
{ |
|
328 |
//Permet la MAJ des 4 Grids � la position du pivot |
|
329 |
try |
|
330 |
{ |
|
331 |
Grid1.Width = e.GetPosition(mainSurfaceWindow).X; |
|
332 |
Grid1.Height = e.GetPosition(mainSurfaceWindow).Y; |
|
333 |
||
334 |
Grid3.Width = e.GetPosition(mainSurfaceWindow).X; |
|
335 |
Grid3.Height = 768 - e.GetPosition(mainSurfaceWindow).Y; |
|
336 |
||
337 |
Grid4.Width = 1024 - e.GetPosition(mainSurfaceWindow).X; |
|
338 |
Grid4.Height = 768 - e.GetPosition(mainSurfaceWindow).Y; |
|
339 |
||
340 |
Grid2.Width = 1024 - e.GetPosition(mainSurfaceWindow).X; |
|
341 |
Grid2.Height = e.GetPosition(mainSurfaceWindow).Y; |
|
342 |
((ScatterViewItem)sender).Center = new Point(e.GetPosition(mainSurfaceWindow).X,e.GetPosition(mainSurfaceWindow).Y); |
|
343 |
} |
|
344 |
catch (Exception) { } |
|
345 |
} |
|
346 |
||
112 | 347 |
private void UserControlPivot_EH_SurfaceButtonPlayer_ContactDown(object sender, EventArgs e) |
60 | 348 |
{ |
143 | 349 |
// Traitement du contact down sur le pivot (Cr�ation d'un screen ou suppression d'un panel |
112 | 350 |
switch ((int)sender) |
60 | 351 |
{ |
112 | 352 |
case 1: |
217 | 353 |
if (Panel1 == null && Grid1.Children.Count == 3) |
112 | 354 |
{ |
355 |
//1-Creation du control Screen |
|
143 | 356 |
UserControlScreen Screen = new UserControlScreen(1, _mainviewmodel); |
112 | 357 |
Screen.Name = "Screen1"; |
358 |
Screen.contexteGrid = Grid1.Name.ToString(); |
|
359 |
//2-Rajout du screen dans la grid correspondante |
|
360 |
Grid1.Children.Add(Screen); |
|
361 |
||
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:
188
diff
changeset
|
362 |
Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
112 | 363 |
} |
143 | 364 |
else //Affichage du message de confirmation |
365 |
{ |
|
217 | 366 |
if (Panel1 != null && Grid1.Children.Count == 4) |
143 | 367 |
{ |
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:
139
diff
changeset
|
368 |
UserControlClose UCclose = new UserControlClose(1, "�tes-vous s�r de vouloir quitter ?"); |
143 | 369 |
UCclose.Name = "CloseAlert1"; |
370 |
Grid1.Children.Add(UCclose); |
|
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:
139
diff
changeset
|
371 |
UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
143 | 372 |
} |
373 |
} |
|
112 | 374 |
break; |
375 |
case 2: |
|
217 | 376 |
if (Panel2 == null && Grid2.Children.Count == 3) |
112 | 377 |
{ |
378 |
//1-Creation du control Screen |
|
143 | 379 |
UserControlScreen Screen = new UserControlScreen(2, _mainviewmodel); |
112 | 380 |
Screen.Name = "Screen2"; |
381 |
Screen.contexteGrid = Grid2.Name.ToString(); |
|
382 |
//2-Rajout du screen dans la grid correspondante |
|
383 |
Grid2.Children.Add(Screen); |
|
72
f1ca0958c992
Travail sur le control List Video et comunication entre ListVideo et FingersDance
sarias
parents:
60
diff
changeset
|
384 |
|
182
25b49d4f1635
First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents:
168
diff
changeset
|
385 |
Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
112 | 386 |
} |
143 | 387 |
else //Affichage du message de confirmation |
388 |
{ |
|
217 | 389 |
if (Panel2 != null && Grid2.Children.Count == 4) |
143 | 390 |
{ |
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:
139
diff
changeset
|
391 |
UserControlClose UCclose = new UserControlClose(2, "�tes-vous s�r de vouloir quitter ?"); |
143 | 392 |
UCclose.Name = "CloseAlert2"; |
393 |
Grid2.Children.Add(UCclose); |
|
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:
139
diff
changeset
|
394 |
UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
143 | 395 |
} |
396 |
} |
|
112 | 397 |
break; |
398 |
case 3: |
|
217 | 399 |
if (Panel3 == null && Grid3.Children.Count == 3) |
112 | 400 |
{ |
401 |
//1-Creation du control Screen |
|
143 | 402 |
UserControlScreen Screen = new UserControlScreen(3, _mainviewmodel); |
112 | 403 |
Screen.Name = "Screen3"; |
404 |
Screen.contexteGrid = Grid3.Name.ToString(); |
|
405 |
//2-Rajout du screen dans la grid correspondante |
|
406 |
Grid3.Children.Add(Screen); |
|
72
f1ca0958c992
Travail sur le control List Video et comunication entre ListVideo et FingersDance
sarias
parents:
60
diff
changeset
|
407 |
|
182
25b49d4f1635
First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents:
168
diff
changeset
|
408 |
Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
112 | 409 |
} |
143 | 410 |
else //Affichage du message de confirmation |
411 |
{ |
|
217 | 412 |
if (Panel3 != null && Grid3.Children.Count == 4) |
143 | 413 |
{ |
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:
139
diff
changeset
|
414 |
UserControlClose UCclose = new UserControlClose(3, "�tes-vous s�r de vouloir quitter ?"); |
143 | 415 |
UCclose.Name = "CloseAlert3"; |
416 |
Grid3.Children.Add(UCclose); |
|
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:
139
diff
changeset
|
417 |
UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
143 | 418 |
} |
419 |
} |
|
112 | 420 |
break; |
421 |
case 4: |
|
217 | 422 |
if (Panel4 == null && Grid4.Children.Count == 3) |
112 | 423 |
{ |
424 |
//1-Creation du control Screen |
|
143 | 425 |
UserControlScreen Screen = new UserControlScreen(4, _mainviewmodel); |
112 | 426 |
Screen.Name = "Screen4"; |
427 |
Screen.contexteGrid = Grid4.Name.ToString(); |
|
428 |
//2-Rajout du screen dans la grid correspondante |
|
429 |
Grid4.Children.Add(Screen); |
|
430 |
||
182
25b49d4f1635
First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents:
168
diff
changeset
|
431 |
Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
112 | 432 |
} |
143 | 433 |
else //Affichage du message de confirmation |
434 |
{ |
|
217 | 435 |
if (Panel4 != null && Grid4.Children.Count == 4) |
143 | 436 |
{ |
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:
139
diff
changeset
|
437 |
UserControlClose UCclose = new UserControlClose(4, "�tes-vous s�r de vouloir quitter ?"); |
143 | 438 |
UCclose.Name = "CloseAlert4"; |
439 |
Grid4.Children.Add(UCclose); |
|
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:
139
diff
changeset
|
440 |
UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
143 | 441 |
} |
442 |
} |
|
112 | 443 |
break; |
444 |
} |
|
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
445 |
|
73 | 446 |
} |
72
f1ca0958c992
Travail sur le control List Video et comunication entre ListVideo et FingersDance
sarias
parents:
60
diff
changeset
|
447 |
|
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
448 |
#endregion |
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
449 |
|
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
450 |
|
73 | 451 |
//Button Submit du control SessionInput |
452 |
private void SessionInput_EH_SurfaceButtonSubmit_ContactDown(object sender, EventArgs e) |
|
453 |
{ |
|
454 |
try |
|
455 |
{ |
|
191
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
456 |
// We get UserControlScreen's instance and content |
104 | 457 |
Grid root = (Grid)(((UserControlScreen)sender).Parent); |
191
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
458 |
// We remove the UserControlScreen's instance |
104 | 459 |
root.Children.Remove(((UserControlScreen)sender)); |
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
460 |
|
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
461 |
if ((((UserControlScreen)sender).Cutting != null && ((UserControlScreen)sender).AnnotationOrSearchMode == "Annotation") || (((UserControlScreen)sender).AnnotationOrSearchMode == "Search")) |
112 | 462 |
{ |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
463 |
//2-Creation du User Panel |
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:
188
diff
changeset
|
464 |
Cutting newCutting = ((UserControlScreen)sender).Cutting; |
229
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
465 |
uint UintIdColor = 0; |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
466 |
|
186
83615722dbab
Debug data management for others panels to redisplay.
cavaliet
parents:
182
diff
changeset
|
467 |
// We test if each Panel does not already own the sent cuttingVM |
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
468 |
if (((UserControlScreen)sender).Cutting != null && ((UserControlScreen)sender).AnnotationOrSearchMode == "Annotation") |
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
469 |
{ |
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
470 |
if (Panel1 != null) |
214
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
211
diff
changeset
|
471 |
if (Panel1.Cutting != null) |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
211
diff
changeset
|
472 |
if (Panel1.Cutting.Title==newCutting.Title) |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
211
diff
changeset
|
473 |
return; |
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
474 |
if (Panel2 != null) |
214
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
211
diff
changeset
|
475 |
if (Panel2.Cutting != null) |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
211
diff
changeset
|
476 |
if (Panel2.Cutting.Title == newCutting.Title) |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
211
diff
changeset
|
477 |
return; |
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
478 |
if (Panel3 != null) |
214
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
211
diff
changeset
|
479 |
if (Panel3.Cutting != null) |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
211
diff
changeset
|
480 |
if (Panel3.Cutting.Title == newCutting.Title) |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
211
diff
changeset
|
481 |
return; |
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
482 |
if (Panel4 != null) |
214
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
211
diff
changeset
|
483 |
if (Panel4.Cutting != null) |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
211
diff
changeset
|
484 |
if (Panel4.Cutting.Title == newCutting.Title) |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
211
diff
changeset
|
485 |
return; |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
486 |
|
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
487 |
// We add the new cutting to the _mainviewmodel's datas IF THE CUTTING IS NEW (if not it means that it is from a loaded project) |
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
488 |
if (!_mainviewmodel.Project.CuttingsDict.ContainsKey(newCutting.Title)) |
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
489 |
{ |
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
490 |
_mainviewmodel.Project.Cuttings.Add(newCutting); |
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
491 |
_mainviewmodel.Project.CuttingsDict.Add(newCutting.Title, newCutting); |
229
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
492 |
// In this case, we have to find a new color in the available ones. |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
493 |
KeyValuePair<uint,Color> kvp = ColorFactory.getAvailablePairUintColor(); |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
494 |
newCutting.Color = kvp.Value; |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
495 |
UintIdColor = kvp.Key; |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
496 |
// Now we can take off this new color from the available colors |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
497 |
ColorFactory.TakeOffColor(kvp.Value); |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
498 |
} |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
499 |
else{ |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
500 |
// If the color |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
501 |
UintIdColor = ColorFactory.getId(newCutting.Color); |
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
502 |
} |
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:
191
diff
changeset
|
503 |
} |
186
83615722dbab
Debug data management for others panels to redisplay.
cavaliet
parents:
182
diff
changeset
|
504 |
// And now we build the new UserPanel |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
505 |
switch (((UserControlScreen)sender).id) |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
506 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
507 |
case 1: |
229
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
508 |
UserControlPivot.ApplyColor(1, UintIdColor); |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
509 |
Panel1 = new UserControlUserPanel(1, newCutting, _mainviewmodel.Project.VideoPath, ((UserControlScreen)sender).AnnotationOrSearchMode, ((UserControlScreen)sender).SearchedProject); |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
510 |
Panel1.Name = "UserPanel1"; |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
511 |
Panel1.OnSuccessAnnotation += new EventHandler(Panel_OnSuccessAnnotation); |
188
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
512 |
Panel1.OnTagVisualisation += new EventHandler(Panel_OnTagVisualisation); |
229
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
513 |
Panel1.idcolor = UintIdColor; |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
514 |
//3-Rajout sur la Grid Root |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
515 |
root.Children.Add(Panel1); |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
516 |
break; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
517 |
case 2: |
229
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
518 |
UserControlPivot.ApplyColor(2, UintIdColor); |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
519 |
Panel2 = new UserControlUserPanel(2, newCutting, _mainviewmodel.Project.VideoPath, ((UserControlScreen)sender).AnnotationOrSearchMode, ((UserControlScreen)sender).SearchedProject); |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
520 |
Panel2.Name = "UserPanel2"; |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
521 |
Panel2.OnSuccessAnnotation += new EventHandler(Panel_OnSuccessAnnotation); |
188
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
522 |
Panel2.OnTagVisualisation += new EventHandler(Panel_OnTagVisualisation); |
229
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
523 |
Panel2.idcolor = UintIdColor; |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
524 |
//3-Rajout sur la Grid Root |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
525 |
root.Children.Add(Panel2); |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
526 |
break; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
527 |
case 3: |
229
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
528 |
UserControlPivot.ApplyColor(3, UintIdColor); |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
529 |
Panel3 = new UserControlUserPanel(3, newCutting, _mainviewmodel.Project.VideoPath, ((UserControlScreen)sender).AnnotationOrSearchMode, ((UserControlScreen)sender).SearchedProject); |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
530 |
Panel3.Name = "UserPanel3"; |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
531 |
Panel3.OnSuccessAnnotation += new EventHandler(Panel_OnSuccessAnnotation); |
188
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
532 |
Panel3.OnTagVisualisation += new EventHandler(Panel_OnTagVisualisation); |
229
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
533 |
Panel3.idcolor = UintIdColor; |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
534 |
//3-Rajout sur la Grid Root |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
535 |
root.Children.Add(Panel3); |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
536 |
break; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
537 |
case 4: |
229
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
538 |
UserControlPivot.ApplyColor(4, UintIdColor); |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
539 |
Panel4 = new UserControlUserPanel(4, newCutting, _mainviewmodel.Project.VideoPath, ((UserControlScreen)sender).AnnotationOrSearchMode, ((UserControlScreen)sender).SearchedProject); |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
540 |
Panel4.Name = "UserPanel4"; |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
541 |
Panel4.OnSuccessAnnotation += new EventHandler(Panel_OnSuccessAnnotation); |
188
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
542 |
Panel4.OnTagVisualisation += new EventHandler(Panel_OnTagVisualisation); |
229
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
543 |
Panel4.idcolor = UintIdColor; |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
544 |
//3-Rajout sur la Grid Root |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
545 |
root.Children.Add(Panel4); |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
546 |
break; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
547 |
} |
112 | 548 |
} |
73 | 549 |
} |
550 |
catch (Exception ex) { } |
|
72
f1ca0958c992
Travail sur le control List Video et comunication entre ListVideo et FingersDance
sarias
parents:
60
diff
changeset
|
551 |
} |
73 | 552 |
|
143 | 553 |
//Actions du boutton Alert selon l'action close OK ou NON |
141
923687896770
UserControlClose more readable and MainSurfaceWindow now uses the ConfirmYesOrNo event.
cavaliet
parents:
140
diff
changeset
|
554 |
private void CloseAlert_EH_SurfaceButton_ContactDown(object sender, ConfirmEventArgs e) |
143 | 555 |
{ |
556 |
Grid root = (Grid)(((UserControlClose)sender).Parent); |
|
141
923687896770
UserControlClose more readable and MainSurfaceWindow now uses the ConfirmYesOrNo event.
cavaliet
parents:
140
diff
changeset
|
557 |
if(e.Confirmed==true) |
143 | 558 |
{ |
141
923687896770
UserControlClose more readable and MainSurfaceWindow now uses the ConfirmYesOrNo event.
cavaliet
parents:
140
diff
changeset
|
559 |
switch(e.PanelNumber) |
143 | 560 |
{ |
561 |
case 1: |
|
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:
156
diff
changeset
|
562 |
UserControlPivot.ApplyColor(1, 0); |
143 | 563 |
root.Children.Remove(Panel1); |
224 | 564 |
Panel1.PanelClose(); |
143 | 565 |
Panel1 = null; |
566 |
break; |
|
567 |
case 2: |
|
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:
156
diff
changeset
|
568 |
UserControlPivot.ApplyColor(2, 0); |
143 | 569 |
root.Children.Remove(Panel2); |
224 | 570 |
Panel2.PanelClose(); |
143 | 571 |
Panel2 = null; |
572 |
break; |
|
573 |
case 3: |
|
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:
156
diff
changeset
|
574 |
UserControlPivot.ApplyColor(3, 0); |
143 | 575 |
root.Children.Remove(Panel3); |
224 | 576 |
Panel3.PanelClose(); |
143 | 577 |
Panel3 = null; |
578 |
break; |
|
579 |
case 4: |
|
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:
156
diff
changeset
|
580 |
UserControlPivot.ApplyColor(4, 0); |
143 | 581 |
root.Children.Remove(Panel4); |
224 | 582 |
Panel4.PanelClose(); |
143 | 583 |
Panel4 = null; |
584 |
break; |
|
585 |
} |
|
586 |
} |
|
587 |
root.Children.Remove(((UserControlClose)sender)); |
|
168
d70ee2002f75
Thumb Timeline Rotation and Debug Closing Panels
ARIAS Santiago
parents:
162
diff
changeset
|
588 |
if (Panel1 == null && Panel2 == null && Panel3 == null && Panel4 == null) |
182
25b49d4f1635
First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents:
168
diff
changeset
|
589 |
_mainviewmodel.CloseProject(); |
143 | 590 |
} |
77 | 591 |
|
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
592 |
|
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
593 |
//On success annotation we save the update datas |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
594 |
private void Panel_OnSuccessAnnotation(object sender, EventArgs e) |
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
595 |
{ |
191
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
596 |
// We save datas |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
597 |
saveDatas(); |
188
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
598 |
} |
191
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
599 |
|
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
600 |
// |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
601 |
// Enable to save datas in a xml file with LDT format |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
602 |
// |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
603 |
private void saveDatas() |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
604 |
{ |
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:
191
diff
changeset
|
605 |
// We build the xml to be saved, with the ldt format |
191
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
606 |
XDocument d = new XDocument( |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
607 |
new XElement("iri", |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
608 |
new XElement("project", |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
609 |
new XAttribute("id", "1"), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
610 |
new XAttribute("user", "IRI-Strate-EFREI"), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
611 |
new XAttribute("title", _mainviewmodel.Project.Name), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
612 |
new XAttribute("abstract", _mainviewmodel.Project.Description) |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
613 |
), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
614 |
new XElement("medias", |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
615 |
new XElement("media", |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
616 |
new XAttribute("id","for_oneflat"), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
617 |
new XAttribute("src","srcIri"), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
618 |
new XAttribute("video",""), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
619 |
new XAttribute("extra",""), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
620 |
new XAttribute("pict","") |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
621 |
) |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
622 |
), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
623 |
new XElement("annotations", |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
624 |
new XElement("content", |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
625 |
new XAttribute("id", "for_oneflat"), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
626 |
new XAttribute("title", "D�c. personnels"), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
627 |
new XAttribute("author", "perso"), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
628 |
new XAttribute("abstract", "Ensemble de d�coupages d�finis par un utilisateur") |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
629 |
) |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
630 |
), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
631 |
new XElement("displays"), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
632 |
new XElement("edits") |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
633 |
) |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
634 |
); |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
635 |
// We add each cutting |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
636 |
XElement annotContent = (XElement)(d.Root.Elements().ToList()[2]).FirstNode; |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
637 |
foreach (Cutting cut in _mainviewmodel.Project.Cuttings) |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
638 |
{ |
229
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
639 |
XElement cutNode = new XElement("decoupage", new XAttribute("id", cut.Id), new XAttribute("author", "perso"), new XAttribute("color", "0x" + cut.Color.ToString().Substring(3)), // Color.ToString() return #AARRGGBB and we keep only 0xRRGGBB); |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
640 |
new XElement("title", cut.Title), |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
225
diff
changeset
|
641 |
new XElement("abstract", "")); |
191
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
642 |
XElement cutElmts = new XElement("elements"); |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
643 |
cutNode.Add(cutElmts); |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
644 |
foreach (Annotation annot in cut.AnnotList) |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
645 |
{ |
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:
191
diff
changeset
|
646 |
cutElmts.Add(new XElement("element", new XAttribute("id", annot.Id), |
191
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
647 |
new XAttribute("begin", annot.TcBegin), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
648 |
new XAttribute("dur", annot.Dur), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
649 |
new XAttribute("author", cut.Title), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
650 |
new XAttribute("date", DateTime.Now.Day.ToString() + "/" + DateTime.Now.Month.ToString() + "/" + DateTime.Now.Year.ToString()), |
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:
191
diff
changeset
|
651 |
new XAttribute("color", "0x" + annot.Color.ToString().Substring(3)), // Color.ToString() return #AARRGGBB and we keep only 0xRRGGBB |
191
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
652 |
new XAttribute("src", ""), |
225
b60e13ed75c8
Now an annotation has a list of gesture string and not simple gesture string. These are saved into and loaded from the ldt xml file.
cavaliet
parents:
224
diff
changeset
|
653 |
new XElement("title", String.Join(",", annot.GestureType.ToArray())), |
191
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
654 |
new XElement("abstract"), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
655 |
new XElement("audio"), |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
656 |
new XElement("tags"), |
225
b60e13ed75c8
Now an annotation has a list of gesture string and not simple gesture string. These are saved into and loaded from the ldt xml file.
cavaliet
parents:
224
diff
changeset
|
657 |
new XElement("gestureType", String.Join(",", annot.GestureType.ToArray())))); |
191
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
658 |
} |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
659 |
annotContent.Add(cutNode); |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
660 |
} |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
661 |
|
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
662 |
d.Declaration = new XDeclaration("1.0", "utf-8", "true"); |
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:
191
diff
changeset
|
663 |
//Console.WriteLine(d); |
223
90d2be5c3d39
commit with changes for real table file management
cavaliet
parents:
217
diff
changeset
|
664 |
String path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "/" + _mainviewmodel.Project.Name + ".ldt"; |
90d2be5c3d39
commit with changes for real table file management
cavaliet
parents:
217
diff
changeset
|
665 |
d.Save(path); |
191
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
666 |
|
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
667 |
} |
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
668 |
|
8a25a85f2656
First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents:
190
diff
changeset
|
669 |
|
188
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
670 |
//On Tag Visualisation Mute all the other Players |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
671 |
private void Panel_OnTagVisualisation(object sender, EventArgs e) |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
672 |
{ |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
673 |
UserControlUserPanel PanelMaster = (UserControlUserPanel)sender; |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
674 |
if (Panel1 != null) |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
675 |
{ |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
676 |
if (!PanelMaster.Name.Equals(Panel1.Name)) |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
677 |
Panel1.PlayerMute(true); |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
678 |
} |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
679 |
if (Panel2 != null) |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
680 |
{ |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
681 |
if (!PanelMaster.Name.Equals(Panel2.Name)) |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
682 |
Panel2.PlayerMute(true); |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
683 |
} |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
684 |
if (Panel3 != null) |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
685 |
{ |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
686 |
if (!PanelMaster.Name.Equals(Panel3.Name)) |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
687 |
Panel3.PlayerMute(true); |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
688 |
} |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
689 |
if (Panel4 != null) |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
690 |
{ |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
691 |
if (!PanelMaster.Name.Equals(Panel4.Name)) |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
692 |
Panel4.PlayerMute(true); |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
693 |
|
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
694 |
} |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
695 |
} |
217 | 696 |
|
697 |
private void CreditsButton_ContactDown(object sender, EventArgs e) |
|
698 |
{ |
|
699 |
Console.WriteLine("CreditsButton_ContactDown"); |
|
700 |
if(sender==CreditsButton1) |
|
701 |
{ |
|
702 |
CreditsScroll1.Visibility = (CreditsScroll1.Visibility == Visibility.Hidden) ? Visibility.Visible : Visibility.Hidden; |
|
703 |
} |
|
704 |
else if (sender == CreditsButton2) |
|
705 |
{ |
|
706 |
CreditsScroll2.Visibility = (CreditsScroll2.Visibility == Visibility.Hidden) ? Visibility.Visible : Visibility.Hidden; |
|
707 |
} |
|
708 |
else if (sender == CreditsButton3) |
|
709 |
{ |
|
710 |
CreditsScroll3.Visibility = (CreditsScroll3.Visibility == Visibility.Hidden) ? Visibility.Visible : Visibility.Hidden; |
|
711 |
} |
|
712 |
else if (sender == CreditsButton4) |
|
713 |
{ |
|
714 |
CreditsScroll4.Visibility = (CreditsScroll4.Visibility == Visibility.Hidden) ? Visibility.Visible : Visibility.Hidden; |
|
715 |
} |
|
716 |
} |
|
224 | 717 |
|
718 |
|
|
45 | 719 |
} |
720 |
} |