author | cavaliet |
Wed, 25 Nov 2009 10:48:46 +0100 | |
changeset 230 | 010a2af88bb7 |
parent 229 | 05aba5def1fc |
parent 227 | 89f9e7e3ff54 |
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(); |
227 | 46 |
bool pivotContactDown = false; |
60 | 47 |
#endregion |
54
c724ac229181
Singleton de la factory
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
45
diff
changeset
|
48 |
|
c724ac229181
Singleton de la factory
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
45
diff
changeset
|
49 |
|
143 | 50 |
#region Constructor |
45 | 51 |
public SurfaceWindow1() |
52 |
{ |
|
53 |
InitializeComponent(); |
|
60 | 54 |
//Permet d'initialiser l'inertie du Pivot une fois relach�. |
55 |
InitPivotInertia(); |
|
58
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
56 |
//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
|
57 |
InitGridPositions(); |
45 | 58 |
// Add handlers for Application activation events |
59 |
AddActivationHandlers(); |
|
217 | 60 |
// Add credit text |
61 |
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
|
62 |
"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 | 63 |
} |
143 | 64 |
#endregion |
65 |
||
66 |
#region Initialization |
|
45 | 67 |
|
60 | 68 |
private void InitPivotInertia() |
69 |
{ |
|
70 |
try |
|
71 |
{ |
|
77 | 72 |
ScatterViewItem item = (ScatterViewItem)scaterview.Items.GetItemAt(0); |
60 | 73 |
item.DecelerationRate = double.NaN; |
74 |
} |
|
75 |
catch (Exception ex) { } |
|
76 |
} |
|
77 |
||
58
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
78 |
private void InitGridPositions() |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
79 |
{ |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
80 |
//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
|
81 |
try |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
82 |
{ |
77 | 83 |
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
|
84 |
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
|
85 |
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
|
86 |
|
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
87 |
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
|
88 |
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
|
89 |
|
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
90 |
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
|
91 |
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
|
92 |
|
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
93 |
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
|
94 |
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
|
95 |
} |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
96 |
catch (Exception ex) { } |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
97 |
} |
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
98 |
|
143 | 99 |
#endregion |
45 | 100 |
|
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
101 |
#region Application Default Functions |
45 | 102 |
/// <summary> |
103 |
/// Occurs when the window is about to close. |
|
104 |
/// </summary> |
|
105 |
/// <param name="e"></param> |
|
106 |
protected override void OnClosed(EventArgs e) |
|
107 |
{ |
|
108 |
base.OnClosed(e); |
|
109 |
||
110 |
// Remove handlers for Application activation events |
|
111 |
RemoveActivationHandlers(); |
|
112 |
} |
|
113 |
||
114 |
/// <summary> |
|
115 |
/// Adds handlers for Application activation events. |
|
116 |
/// </summary> |
|
117 |
private void AddActivationHandlers() |
|
118 |
{ |
|
119 |
// Subscribe to surface application activation events |
|
120 |
ApplicationLauncher.ApplicationActivated += OnApplicationActivated; |
|
121 |
ApplicationLauncher.ApplicationPreviewed += OnApplicationPreviewed; |
|
122 |
ApplicationLauncher.ApplicationDeactivated += OnApplicationDeactivated; |
|
123 |
} |
|
124 |
||
125 |
/// <summary> |
|
126 |
/// Removes handlers for Application activation events. |
|
127 |
/// </summary> |
|
128 |
private void RemoveActivationHandlers() |
|
129 |
{ |
|
130 |
// Unsubscribe from surface application activation events |
|
131 |
ApplicationLauncher.ApplicationActivated -= OnApplicationActivated; |
|
132 |
ApplicationLauncher.ApplicationPreviewed -= OnApplicationPreviewed; |
|
133 |
ApplicationLauncher.ApplicationDeactivated -= OnApplicationDeactivated; |
|
134 |
} |
|
135 |
||
136 |
/// <summary> |
|
137 |
/// This is called when application has been activated. |
|
138 |
/// </summary> |
|
139 |
/// <param name="sender"></param> |
|
140 |
/// <param name="e"></param> |
|
141 |
private void OnApplicationActivated(object sender, EventArgs e) |
|
142 |
{ |
|
143 |
//TODO: enable audio, animations here |
|
143 | 144 |
|
45 | 145 |
} |
146 |
||
147 |
/// <summary> |
|
148 |
/// This is called when application is in preview mode. |
|
149 |
/// </summary> |
|
150 |
/// <param name="sender"></param> |
|
151 |
/// <param name="e"></param> |
|
152 |
private void OnApplicationPreviewed(object sender, EventArgs e) |
|
153 |
{ |
|
154 |
//TODO: Disable audio here if it is enabled |
|
155 |
||
156 |
//TODO: optionally enable animations here |
|
157 |
} |
|
158 |
||
159 |
/// <summary> |
|
160 |
/// This is called when application has been deactivated. |
|
161 |
/// </summary> |
|
162 |
/// <param name="sender"></param> |
|
163 |
/// <param name="e"></param> |
|
164 |
private void OnApplicationDeactivated(object sender, EventArgs e) |
|
165 |
{ |
|
166 |
//TODO: disable audio, animations here |
|
167 |
} |
|
168 |
||
143 | 169 |
/// <summary> |
170 |
/// This is called when application has been loaded, we change the orientation |
|
171 |
/// of the application |
|
172 |
/// </summary> |
|
173 |
/// <param name="sender"></param> |
|
174 |
/// <param name="e"></param> |
|
175 |
private void mainSurfaceWindow_Loaded(object sender, RoutedEventArgs e) |
|
176 |
{ |
|
177 |
||
178 |
if (ApplicationLauncher.InitialOrientation == UserOrientation.Top) |
|
179 |
{ |
|
180 |
// Rotate the main canvas by 180 degrees. |
|
181 |
this.MainGrid.LayoutTransform = new RotateTransform(180.0); |
|
182 |
} |
|
183 |
else |
|
184 |
{ |
|
185 |
// Remove the rotate transform on the main canvas. |
|
186 |
this.MainGrid.LayoutTransform = null; |
|
187 |
} |
|
188 |
// Dismiss the loading screen. |
|
189 |
ApplicationLauncher.SignalApplicationLoadComplete(); |
|
190 |
} |
|
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
191 |
#endregion |
143 | 192 |
|
162
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 |
|
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
196 |
#region Pivot Actions |
77 | 197 |
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
|
198 |
{ } |
77 | 199 |
private void ScatterViewItemPivot_ContactChanged(object sender, ContactEventArgs e) |
45 | 200 |
{ |
58
d7313fb1806c
Initialisation de la position du Pivot au centre et des positions des 4 Grids
sarias
parents:
54
diff
changeset
|
201 |
//Permet la MAJ des 4 Grids � la position du pivot |
45 | 202 |
try |
203 |
{ |
|
204 |
Grid1.Width = e.GetPosition(mainSurfaceWindow).X; |
|
205 |
Grid1.Height = e.GetPosition(mainSurfaceWindow).Y; |
|
206 |
||
60 | 207 |
Grid3.Width = e.GetPosition(mainSurfaceWindow).X; |
45 | 208 |
Grid3.Height = 768 - e.GetPosition(mainSurfaceWindow).Y; |
209 |
||
210 |
Grid4.Width = 1024 - e.GetPosition(mainSurfaceWindow).X; |
|
60 | 211 |
Grid4.Height = 768 - e.GetPosition(mainSurfaceWindow).Y; |
212 |
||
213 |
Grid2.Width = 1024 - e.GetPosition(mainSurfaceWindow).X; |
|
214 |
Grid2.Height = e.GetPosition(mainSurfaceWindow).Y; |
|
89 | 215 |
|
91 | 216 |
//GRISAGE |
217 |
//Grid1 |
|
218 |
if (Grid1.Width < (1024 / 4) || Grid2.Height < (768 / 4)) |
|
89 | 219 |
{ |
91 | 220 |
try |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
221 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
222 |
if (Panel1 != null) |
224 | 223 |
{ |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
224 |
Panel1.PlayerPause(); |
224 | 225 |
Panel1.PanelVisibility(Visibility.Hidden); |
226 |
} |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
227 |
Grid1.Children[1].Visibility = Visibility.Hidden; |
224 | 228 |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
229 |
} |
91 | 230 |
catch (Exception) { } |
89 | 231 |
} |
91 | 232 |
else |
233 |
{ |
|
234 |
try |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
235 |
{ |
224 | 236 |
Grid1.Children[1].Visibility = Visibility.Visible; |
237 |
if (Panel1 != null) |
|
238 |
{ |
|
239 |
Panel1.PanelVisibility(Visibility.Visible); |
|
240 |
} |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
241 |
} |
91 | 242 |
catch (Exception) { } |
243 |
} |
|
244 |
//Grid2 |
|
245 |
if (Grid2.Width < (1024 / 4) || Grid2.Height < (768 / 4)) |
|
89 | 246 |
{ |
91 | 247 |
try |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
248 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
249 |
if (Panel2 != null) |
224 | 250 |
{ |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
251 |
Panel2.PlayerPause(); |
224 | 252 |
Panel2.PanelVisibility(Visibility.Hidden); |
253 |
} |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
254 |
Grid2.Children[1].Visibility = Visibility.Hidden; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
255 |
} |
91 | 256 |
catch (Exception) { } |
257 |
} |
|
258 |
else |
|
259 |
{ |
|
260 |
try |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
261 |
{ |
224 | 262 |
Grid2.Children[1].Visibility = Visibility.Visible; |
263 |
if (Panel2 != null) |
|
264 |
{ |
|
265 |
Panel2.PanelVisibility(Visibility.Visible); |
|
266 |
} |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
267 |
} |
91 | 268 |
catch (Exception) { } |
89 | 269 |
} |
91 | 270 |
//Grid3 |
271 |
if (Grid3.Width < (1024 / 4) || Grid3.Height < (768 / 4)) |
|
89 | 272 |
{ |
91 | 273 |
try |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
274 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
275 |
if (Panel3 != null) |
224 | 276 |
{ |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
277 |
Panel3.PlayerPause(); |
224 | 278 |
Panel3.PanelVisibility(Visibility.Hidden); |
279 |
} |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
280 |
Grid3.Children[1].Visibility = Visibility.Hidden; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
281 |
} |
91 | 282 |
catch (Exception) { } |
283 |
} |
|
284 |
else |
|
285 |
{ |
|
286 |
try |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
287 |
{ |
224 | 288 |
Grid3.Children[1].Visibility = Visibility.Visible; |
289 |
if (Panel3 != null) |
|
290 |
{ |
|
291 |
Panel3.PanelVisibility(Visibility.Visible); |
|
292 |
} |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
293 |
} |
91 | 294 |
catch (Exception) { } |
89 | 295 |
} |
91 | 296 |
//Grid4 |
297 |
if (Grid4.Width < (1024 / 4) || Grid4.Height < (768 / 4)) |
|
89 | 298 |
{ |
91 | 299 |
try |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
300 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
301 |
if (Panel4 != null) |
224 | 302 |
{ |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
303 |
Panel4.PlayerPause(); |
224 | 304 |
Panel4.PanelVisibility(Visibility.Hidden); |
305 |
} |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
306 |
Grid4.Children[1].Visibility = Visibility.Hidden; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
307 |
} |
91 | 308 |
catch (Exception) { } |
89 | 309 |
} |
91 | 310 |
else |
311 |
{ |
|
312 |
try |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
313 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
314 |
Grid4.Children[1].Visibility = Visibility.Visible; |
224 | 315 |
if (Panel4 != null) |
316 |
{ |
|
317 |
Panel4.PanelVisibility(Visibility.Visible); |
|
318 |
} |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
319 |
} |
91 | 320 |
catch (Exception) { } |
321 |
} |
|
45 | 322 |
} |
91 | 323 |
catch (Exception) { } |
45 | 324 |
} |
60 | 325 |
|
224 | 326 |
//SAR |
327 |
private void ScatterViewItemPivot_ContactLeave(object sender, ContactEventArgs e) |
|
328 |
{ |
|
329 |
//Permet la MAJ des 4 Grids � la position du pivot |
|
330 |
try |
|
331 |
{ |
|
227 | 332 |
if (!pivotContactDown) |
333 |
{ |
|
334 |
Grid1.Width = e.GetPosition(mainSurfaceWindow).X; |
|
335 |
Grid1.Height = e.GetPosition(mainSurfaceWindow).Y; |
|
224 | 336 |
|
227 | 337 |
Grid3.Width = e.GetPosition(mainSurfaceWindow).X; |
338 |
Grid3.Height = 768 - e.GetPosition(mainSurfaceWindow).Y; |
|
224 | 339 |
|
227 | 340 |
Grid4.Width = 1024 - e.GetPosition(mainSurfaceWindow).X; |
341 |
Grid4.Height = 768 - e.GetPosition(mainSurfaceWindow).Y; |
|
224 | 342 |
|
227 | 343 |
Grid2.Width = 1024 - e.GetPosition(mainSurfaceWindow).X; |
344 |
Grid2.Height = e.GetPosition(mainSurfaceWindow).Y; |
|
345 |
((ScatterViewItem)sender).Center = new Point(e.GetPosition(mainSurfaceWindow).X, e.GetPosition(mainSurfaceWindow).Y); |
|
346 |
} |
|
347 |
pivotContactDown = false; |
|
224 | 348 |
} |
349 |
catch (Exception) { } |
|
350 |
} |
|
351 |
||
112 | 352 |
private void UserControlPivot_EH_SurfaceButtonPlayer_ContactDown(object sender, EventArgs e) |
60 | 353 |
{ |
227 | 354 |
pivotContactDown = true; |
143 | 355 |
// Traitement du contact down sur le pivot (Cr�ation d'un screen ou suppression d'un panel |
112 | 356 |
switch ((int)sender) |
60 | 357 |
{ |
112 | 358 |
case 1: |
217 | 359 |
if (Panel1 == null && Grid1.Children.Count == 3) |
112 | 360 |
{ |
361 |
//1-Creation du control Screen |
|
143 | 362 |
UserControlScreen Screen = new UserControlScreen(1, _mainviewmodel); |
112 | 363 |
Screen.Name = "Screen1"; |
364 |
Screen.contexteGrid = Grid1.Name.ToString(); |
|
365 |
//2-Rajout du screen dans la grid correspondante |
|
366 |
Grid1.Children.Add(Screen); |
|
367 |
||
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
|
368 |
Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
112 | 369 |
} |
143 | 370 |
else //Affichage du message de confirmation |
371 |
{ |
|
217 | 372 |
if (Panel1 != null && Grid1.Children.Count == 4) |
143 | 373 |
{ |
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
|
374 |
UserControlClose UCclose = new UserControlClose(1, "�tes-vous s�r de vouloir quitter ?"); |
143 | 375 |
UCclose.Name = "CloseAlert1"; |
376 |
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
|
377 |
UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
143 | 378 |
} |
379 |
} |
|
112 | 380 |
break; |
381 |
case 2: |
|
217 | 382 |
if (Panel2 == null && Grid2.Children.Count == 3) |
112 | 383 |
{ |
384 |
//1-Creation du control Screen |
|
143 | 385 |
UserControlScreen Screen = new UserControlScreen(2, _mainviewmodel); |
112 | 386 |
Screen.Name = "Screen2"; |
387 |
Screen.contexteGrid = Grid2.Name.ToString(); |
|
388 |
//2-Rajout du screen dans la grid correspondante |
|
389 |
Grid2.Children.Add(Screen); |
|
72
f1ca0958c992
Travail sur le control List Video et comunication entre ListVideo et FingersDance
sarias
parents:
60
diff
changeset
|
390 |
|
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
|
391 |
Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
112 | 392 |
} |
143 | 393 |
else //Affichage du message de confirmation |
394 |
{ |
|
217 | 395 |
if (Panel2 != null && Grid2.Children.Count == 4) |
143 | 396 |
{ |
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
|
397 |
UserControlClose UCclose = new UserControlClose(2, "�tes-vous s�r de vouloir quitter ?"); |
143 | 398 |
UCclose.Name = "CloseAlert2"; |
399 |
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
|
400 |
UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
143 | 401 |
} |
402 |
} |
|
112 | 403 |
break; |
404 |
case 3: |
|
217 | 405 |
if (Panel3 == null && Grid3.Children.Count == 3) |
112 | 406 |
{ |
407 |
//1-Creation du control Screen |
|
143 | 408 |
UserControlScreen Screen = new UserControlScreen(3, _mainviewmodel); |
112 | 409 |
Screen.Name = "Screen3"; |
410 |
Screen.contexteGrid = Grid3.Name.ToString(); |
|
411 |
//2-Rajout du screen dans la grid correspondante |
|
412 |
Grid3.Children.Add(Screen); |
|
72
f1ca0958c992
Travail sur le control List Video et comunication entre ListVideo et FingersDance
sarias
parents:
60
diff
changeset
|
413 |
|
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
|
414 |
Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
112 | 415 |
} |
143 | 416 |
else //Affichage du message de confirmation |
417 |
{ |
|
217 | 418 |
if (Panel3 != null && Grid3.Children.Count == 4) |
143 | 419 |
{ |
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
|
420 |
UserControlClose UCclose = new UserControlClose(3, "�tes-vous s�r de vouloir quitter ?"); |
143 | 421 |
UCclose.Name = "CloseAlert3"; |
422 |
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
|
423 |
UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
143 | 424 |
} |
425 |
} |
|
112 | 426 |
break; |
427 |
case 4: |
|
217 | 428 |
if (Panel4 == null && Grid4.Children.Count == 3) |
112 | 429 |
{ |
430 |
//1-Creation du control Screen |
|
143 | 431 |
UserControlScreen Screen = new UserControlScreen(4, _mainviewmodel); |
112 | 432 |
Screen.Name = "Screen4"; |
433 |
Screen.contexteGrid = Grid4.Name.ToString(); |
|
434 |
//2-Rajout du screen dans la grid correspondante |
|
435 |
Grid4.Children.Add(Screen); |
|
436 |
||
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
|
437 |
Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
112 | 438 |
} |
143 | 439 |
else //Affichage du message de confirmation |
440 |
{ |
|
217 | 441 |
if (Panel4 != null && Grid4.Children.Count == 4) |
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:
139
diff
changeset
|
443 |
UserControlClose UCclose = new UserControlClose(4, "�tes-vous s�r de vouloir quitter ?"); |
143 | 444 |
UCclose.Name = "CloseAlert4"; |
445 |
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
|
446 |
UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
143 | 447 |
} |
448 |
} |
|
112 | 449 |
break; |
450 |
} |
|
73 | 451 |
} |
72
f1ca0958c992
Travail sur le control List Video et comunication entre ListVideo et FingersDance
sarias
parents:
60
diff
changeset
|
452 |
|
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
453 |
#endregion |
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
454 |
|
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
455 |
|
73 | 456 |
//Button Submit du control SessionInput |
457 |
private void SessionInput_EH_SurfaceButtonSubmit_ContactDown(object sender, EventArgs e) |
|
458 |
{ |
|
459 |
try |
|
460 |
{ |
|
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
|
461 |
// We get UserControlScreen's instance and content |
104 | 462 |
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
|
463 |
// We remove the UserControlScreen's instance |
104 | 464 |
root.Children.Remove(((UserControlScreen)sender)); |
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
465 |
|
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
466 |
if ((((UserControlScreen)sender).Cutting != null && ((UserControlScreen)sender).AnnotationOrSearchMode == "Annotation") || (((UserControlScreen)sender).AnnotationOrSearchMode == "Search")) |
112 | 467 |
{ |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
468 |
//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
|
469 |
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
|
470 |
uint UintIdColor = 0; |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
471 |
|
186
83615722dbab
Debug data management for others panels to redisplay.
cavaliet
parents:
182
diff
changeset
|
472 |
// 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
|
473 |
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
|
474 |
{ |
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
475 |
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
|
476 |
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
|
477 |
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
|
478 |
return; |
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
479 |
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
|
480 |
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
|
481 |
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
|
482 |
return; |
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
483 |
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
|
484 |
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
|
485 |
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
|
486 |
return; |
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
487 |
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
|
488 |
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
|
489 |
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
|
490 |
return; |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
491 |
|
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
492 |
// 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
|
493 |
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
|
494 |
{ |
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
495 |
_mainviewmodel.Project.Cuttings.Add(newCutting); |
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
496 |
_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
|
497 |
// 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
|
498 |
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
|
499 |
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
|
500 |
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
|
501 |
// 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
|
502 |
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
|
503 |
} |
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
|
504 |
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
|
505 |
// 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
|
506 |
UintIdColor = ColorFactory.getId(newCutting.Color); |
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
507 |
} |
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
|
508 |
} |
186
83615722dbab
Debug data management for others panels to redisplay.
cavaliet
parents:
182
diff
changeset
|
509 |
// And now we build the new UserPanel |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
510 |
switch (((UserControlScreen)sender).id) |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
511 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
512 |
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
|
513 |
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
|
514 |
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
|
515 |
Panel1.Name = "UserPanel1"; |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
516 |
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
|
517 |
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
|
518 |
Panel1.idcolor = UintIdColor; |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
519 |
//3-Rajout sur la Grid Root |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
520 |
root.Children.Add(Panel1); |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
521 |
break; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
522 |
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
|
523 |
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
|
524 |
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
|
525 |
Panel2.Name = "UserPanel2"; |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
526 |
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
|
527 |
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
|
528 |
Panel2.idcolor = UintIdColor; |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
529 |
//3-Rajout sur la Grid Root |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
530 |
root.Children.Add(Panel2); |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
531 |
break; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
532 |
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
|
533 |
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
|
534 |
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
|
535 |
Panel3.Name = "UserPanel3"; |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
536 |
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
|
537 |
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
|
538 |
Panel3.idcolor = UintIdColor; |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
539 |
//3-Rajout sur la Grid Root |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
540 |
root.Children.Add(Panel3); |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
541 |
break; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
542 |
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
|
543 |
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
|
544 |
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
|
545 |
Panel4.Name = "UserPanel4"; |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
546 |
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
|
547 |
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
|
548 |
Panel4.idcolor = UintIdColor; |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
549 |
//3-Rajout sur la Grid Root |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
550 |
root.Children.Add(Panel4); |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
551 |
break; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
552 |
} |
112 | 553 |
} |
73 | 554 |
} |
555 |
catch (Exception ex) { } |
|
72
f1ca0958c992
Travail sur le control List Video et comunication entre ListVideo et FingersDance
sarias
parents:
60
diff
changeset
|
556 |
} |
73 | 557 |
|
143 | 558 |
//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
|
559 |
private void CloseAlert_EH_SurfaceButton_ContactDown(object sender, ConfirmEventArgs e) |
143 | 560 |
{ |
561 |
Grid root = (Grid)(((UserControlClose)sender).Parent); |
|
141
923687896770
UserControlClose more readable and MainSurfaceWindow now uses the ConfirmYesOrNo event.
cavaliet
parents:
140
diff
changeset
|
562 |
if(e.Confirmed==true) |
143 | 563 |
{ |
141
923687896770
UserControlClose more readable and MainSurfaceWindow now uses the ConfirmYesOrNo event.
cavaliet
parents:
140
diff
changeset
|
564 |
switch(e.PanelNumber) |
143 | 565 |
{ |
566 |
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
|
567 |
UserControlPivot.ApplyColor(1, 0); |
143 | 568 |
root.Children.Remove(Panel1); |
224 | 569 |
Panel1.PanelClose(); |
143 | 570 |
Panel1 = null; |
571 |
break; |
|
572 |
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
|
573 |
UserControlPivot.ApplyColor(2, 0); |
143 | 574 |
root.Children.Remove(Panel2); |
224 | 575 |
Panel2.PanelClose(); |
143 | 576 |
Panel2 = null; |
577 |
break; |
|
578 |
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
|
579 |
UserControlPivot.ApplyColor(3, 0); |
143 | 580 |
root.Children.Remove(Panel3); |
224 | 581 |
Panel3.PanelClose(); |
143 | 582 |
Panel3 = null; |
583 |
break; |
|
584 |
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
|
585 |
UserControlPivot.ApplyColor(4, 0); |
143 | 586 |
root.Children.Remove(Panel4); |
224 | 587 |
Panel4.PanelClose(); |
143 | 588 |
Panel4 = null; |
589 |
break; |
|
590 |
} |
|
591 |
} |
|
592 |
root.Children.Remove(((UserControlClose)sender)); |
|
168
d70ee2002f75
Thumb Timeline Rotation and Debug Closing Panels
ARIAS Santiago
parents:
162
diff
changeset
|
593 |
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
|
594 |
_mainviewmodel.CloseProject(); |
143 | 595 |
} |
77 | 596 |
|
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
597 |
|
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
598 |
//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
|
599 |
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
|
600 |
{ |
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
|
601 |
// 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
|
602 |
saveDatas(); |
188
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
603 |
} |
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
|
604 |
|
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
|
605 |
// |
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 |
// 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
|
607 |
// |
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 |
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
|
609 |
{ |
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
|
610 |
// 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
|
611 |
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
|
612 |
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
|
613 |
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
|
614 |
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
|
615 |
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
|
616 |
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
|
617 |
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
|
618 |
), |
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 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
|
620 |
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
|
621 |
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
|
622 |
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
|
623 |
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
|
624 |
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
|
625 |
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
|
626 |
) |
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 |
), |
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 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
|
629 |
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
|
630 |
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
|
631 |
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
|
632 |
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
|
633 |
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
|
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 |
), |
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 |
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
|
637 |
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
|
638 |
) |
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
|
639 |
); |
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
|
640 |
// 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
|
641 |
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
|
642 |
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
|
643 |
{ |
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
|
644 |
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
|
645 |
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
|
646 |
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
|
647 |
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
|
648 |
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
|
649 |
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
|
650 |
{ |
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 |
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
|
652 |
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
|
653 |
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
|
654 |
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
|
655 |
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
|
656 |
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
|
657 |
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
|
658 |
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
|
659 |
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
|
660 |
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
|
661 |
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
|
662 |
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
|
663 |
} |
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
|
664 |
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
|
665 |
} |
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 |
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
|
668 |
//Console.WriteLine(d); |
223
90d2be5c3d39
commit with changes for real table file management
cavaliet
parents:
217
diff
changeset
|
669 |
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
|
670 |
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
|
671 |
|
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
|
672 |
} |
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
|
673 |
|
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
|
674 |
|
188
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
675 |
//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
|
676 |
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
|
677 |
{ |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
678 |
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
|
679 |
if (Panel1 != 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(Panel1.Name)) |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
682 |
Panel1.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 (Panel2 != 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(Panel2.Name)) |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
687 |
Panel2.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 (Panel3 != 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(Panel3.Name)) |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
692 |
Panel3.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 |
if (Panel4 != null) |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
695 |
{ |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
696 |
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
|
697 |
Panel4.PlayerMute(true); |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
698 |
|
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
699 |
} |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
700 |
} |
217 | 701 |
|
702 |
private void CreditsButton_ContactDown(object sender, EventArgs e) |
|
703 |
{ |
|
704 |
Console.WriteLine("CreditsButton_ContactDown"); |
|
705 |
if(sender==CreditsButton1) |
|
706 |
{ |
|
707 |
CreditsScroll1.Visibility = (CreditsScroll1.Visibility == Visibility.Hidden) ? Visibility.Visible : Visibility.Hidden; |
|
708 |
} |
|
709 |
else if (sender == CreditsButton2) |
|
710 |
{ |
|
711 |
CreditsScroll2.Visibility = (CreditsScroll2.Visibility == Visibility.Hidden) ? Visibility.Visible : Visibility.Hidden; |
|
712 |
} |
|
713 |
else if (sender == CreditsButton3) |
|
714 |
{ |
|
715 |
CreditsScroll3.Visibility = (CreditsScroll3.Visibility == Visibility.Hidden) ? Visibility.Visible : Visibility.Hidden; |
|
716 |
} |
|
717 |
else if (sender == CreditsButton4) |
|
718 |
{ |
|
719 |
CreditsScroll4.Visibility = (CreditsScroll4.Visibility == Visibility.Hidden) ? Visibility.Visible : Visibility.Hidden; |
|
720 |
} |
|
721 |
} |
|
224 | 722 |
|
723 |
|
|
45 | 724 |
} |
725 |
} |