author | cavaliet |
Mon, 23 Nov 2009 15:21:17 +0100 | |
changeset 217 | 6cfd723a1378 |
parent 214 | beebae32b1ed |
child 223 | 90d2be5c3d39 |
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 = |
|
61 |
"MICROSOFT :\nPierre-Louis Xech\n\nEFREI :\nSantiago Aria\nRiley Ikni\nJonathan Pamphile\nAmine Tarari\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) |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
222 |
Panel1.PlayerPause(); |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
223 |
Grid1.Children[1].Visibility = Visibility.Hidden; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
224 |
} |
91 | 225 |
catch (Exception) { } |
89 | 226 |
} |
91 | 227 |
else |
228 |
{ |
|
229 |
try |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
230 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
231 |
Grid1.Children[1].Visibility = Visibility.Visible; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
232 |
} |
91 | 233 |
catch (Exception) { } |
234 |
} |
|
235 |
//Grid2 |
|
236 |
if (Grid2.Width < (1024 / 4) || Grid2.Height < (768 / 4)) |
|
89 | 237 |
{ |
91 | 238 |
try |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
239 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
240 |
if (Panel2 != null) |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
241 |
Panel2.PlayerPause(); |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
242 |
Grid2.Children[1].Visibility = Visibility.Hidden; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
243 |
} |
91 | 244 |
catch (Exception) { } |
245 |
} |
|
246 |
else |
|
247 |
{ |
|
248 |
try |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
249 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
250 |
Grid2.Children[1].Visibility = Visibility.Visible; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
251 |
} |
91 | 252 |
catch (Exception) { } |
89 | 253 |
} |
91 | 254 |
//Grid3 |
255 |
if (Grid3.Width < (1024 / 4) || Grid3.Height < (768 / 4)) |
|
89 | 256 |
{ |
91 | 257 |
try |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
258 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
259 |
if (Panel3 != null) |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
260 |
Panel3.PlayerPause(); |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
261 |
Grid3.Children[1].Visibility = Visibility.Hidden; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
262 |
} |
91 | 263 |
catch (Exception) { } |
264 |
} |
|
265 |
else |
|
266 |
{ |
|
267 |
try |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
268 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
269 |
Grid3.Children[1].Visibility = Visibility.Visible; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
270 |
} |
91 | 271 |
catch (Exception) { } |
89 | 272 |
} |
91 | 273 |
//Grid4 |
274 |
if (Grid4.Width < (1024 / 4) || Grid4.Height < (768 / 4)) |
|
89 | 275 |
{ |
91 | 276 |
try |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
277 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
278 |
if (Panel4 != null) |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
279 |
Panel4.PlayerPause(); |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
280 |
Grid4.Children[1].Visibility = Visibility.Hidden; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
281 |
} |
91 | 282 |
catch (Exception) { } |
89 | 283 |
} |
91 | 284 |
else |
285 |
{ |
|
286 |
try |
|
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
287 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
288 |
Grid4.Children[1].Visibility = Visibility.Visible; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
289 |
} |
91 | 290 |
catch (Exception) { } |
291 |
} |
|
45 | 292 |
} |
91 | 293 |
catch (Exception) { } |
45 | 294 |
} |
60 | 295 |
|
112 | 296 |
private void UserControlPivot_EH_SurfaceButtonPlayer_ContactDown(object sender, EventArgs e) |
60 | 297 |
{ |
143 | 298 |
// Traitement du contact down sur le pivot (Cr�ation d'un screen ou suppression d'un panel |
112 | 299 |
switch ((int)sender) |
60 | 300 |
{ |
112 | 301 |
case 1: |
217 | 302 |
if (Panel1 == null && Grid1.Children.Count == 3) |
112 | 303 |
{ |
304 |
//1-Creation du control Screen |
|
143 | 305 |
UserControlScreen Screen = new UserControlScreen(1, _mainviewmodel); |
112 | 306 |
Screen.Name = "Screen1"; |
307 |
Screen.contexteGrid = Grid1.Name.ToString(); |
|
308 |
//2-Rajout du screen dans la grid correspondante |
|
309 |
Grid1.Children.Add(Screen); |
|
310 |
||
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
|
311 |
Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
112 | 312 |
} |
143 | 313 |
else //Affichage du message de confirmation |
314 |
{ |
|
217 | 315 |
if (Panel1 != null && Grid1.Children.Count == 4) |
143 | 316 |
{ |
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
|
317 |
UserControlClose UCclose = new UserControlClose(1, "�tes-vous s�r de vouloir quitter ?"); |
143 | 318 |
UCclose.Name = "CloseAlert1"; |
319 |
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
|
320 |
UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
143 | 321 |
} |
322 |
} |
|
112 | 323 |
break; |
324 |
case 2: |
|
217 | 325 |
if (Panel2 == null && Grid2.Children.Count == 3) |
112 | 326 |
{ |
327 |
//1-Creation du control Screen |
|
143 | 328 |
UserControlScreen Screen = new UserControlScreen(2, _mainviewmodel); |
112 | 329 |
Screen.Name = "Screen2"; |
330 |
Screen.contexteGrid = Grid2.Name.ToString(); |
|
331 |
//2-Rajout du screen dans la grid correspondante |
|
332 |
Grid2.Children.Add(Screen); |
|
72
f1ca0958c992
Travail sur le control List Video et comunication entre ListVideo et FingersDance
sarias
parents:
60
diff
changeset
|
333 |
|
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
|
334 |
Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
112 | 335 |
} |
143 | 336 |
else //Affichage du message de confirmation |
337 |
{ |
|
217 | 338 |
if (Panel2 != null && Grid2.Children.Count == 4) |
143 | 339 |
{ |
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
|
340 |
UserControlClose UCclose = new UserControlClose(2, "�tes-vous s�r de vouloir quitter ?"); |
143 | 341 |
UCclose.Name = "CloseAlert2"; |
342 |
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
|
343 |
UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
143 | 344 |
} |
345 |
} |
|
112 | 346 |
break; |
347 |
case 3: |
|
217 | 348 |
if (Panel3 == null && Grid3.Children.Count == 3) |
112 | 349 |
{ |
350 |
//1-Creation du control Screen |
|
143 | 351 |
UserControlScreen Screen = new UserControlScreen(3, _mainviewmodel); |
112 | 352 |
Screen.Name = "Screen3"; |
353 |
Screen.contexteGrid = Grid3.Name.ToString(); |
|
354 |
//2-Rajout du screen dans la grid correspondante |
|
355 |
Grid3.Children.Add(Screen); |
|
72
f1ca0958c992
Travail sur le control List Video et comunication entre ListVideo et FingersDance
sarias
parents:
60
diff
changeset
|
356 |
|
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
|
357 |
Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
112 | 358 |
} |
143 | 359 |
else //Affichage du message de confirmation |
360 |
{ |
|
217 | 361 |
if (Panel3 != null && Grid3.Children.Count == 4) |
143 | 362 |
{ |
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
|
363 |
UserControlClose UCclose = new UserControlClose(3, "�tes-vous s�r de vouloir quitter ?"); |
143 | 364 |
UCclose.Name = "CloseAlert3"; |
365 |
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
|
366 |
UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
143 | 367 |
} |
368 |
} |
|
112 | 369 |
break; |
370 |
case 4: |
|
217 | 371 |
if (Panel4 == null && Grid4.Children.Count == 3) |
112 | 372 |
{ |
373 |
//1-Creation du control Screen |
|
143 | 374 |
UserControlScreen Screen = new UserControlScreen(4, _mainviewmodel); |
112 | 375 |
Screen.Name = "Screen4"; |
376 |
Screen.contexteGrid = Grid4.Name.ToString(); |
|
377 |
//2-Rajout du screen dans la grid correspondante |
|
378 |
Grid4.Children.Add(Screen); |
|
379 |
||
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
|
380 |
Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
112 | 381 |
} |
143 | 382 |
else //Affichage du message de confirmation |
383 |
{ |
|
217 | 384 |
if (Panel4 != null && Grid4.Children.Count == 4) |
143 | 385 |
{ |
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
|
386 |
UserControlClose UCclose = new UserControlClose(4, "�tes-vous s�r de vouloir quitter ?"); |
143 | 387 |
UCclose.Name = "CloseAlert4"; |
388 |
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
|
389 |
UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
143 | 390 |
} |
391 |
} |
|
112 | 392 |
break; |
393 |
} |
|
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
394 |
|
73 | 395 |
} |
72
f1ca0958c992
Travail sur le control List Video et comunication entre ListVideo et FingersDance
sarias
parents:
60
diff
changeset
|
396 |
|
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
397 |
#endregion |
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
398 |
|
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
399 |
|
73 | 400 |
//Button Submit du control SessionInput |
401 |
private void SessionInput_EH_SurfaceButtonSubmit_ContactDown(object sender, EventArgs e) |
|
402 |
{ |
|
403 |
try |
|
404 |
{ |
|
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
|
405 |
// We get UserControlScreen's instance and content |
104 | 406 |
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
|
407 |
// We remove the UserControlScreen's instance |
104 | 408 |
root.Children.Remove(((UserControlScreen)sender)); |
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
409 |
|
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
410 |
if ((((UserControlScreen)sender).Cutting != null && ((UserControlScreen)sender).AnnotationOrSearchMode == "Annotation") || (((UserControlScreen)sender).AnnotationOrSearchMode == "Search")) |
112 | 411 |
{ |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
412 |
//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
|
413 |
Cutting newCutting = ((UserControlScreen)sender).Cutting; |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
414 |
|
186
83615722dbab
Debug data management for others panels to redisplay.
cavaliet
parents:
182
diff
changeset
|
415 |
// 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
|
416 |
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
|
417 |
{ |
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
418 |
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
|
419 |
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
|
420 |
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
|
421 |
return; |
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
422 |
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
|
423 |
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
|
424 |
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
|
425 |
return; |
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
426 |
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
|
427 |
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
|
428 |
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
|
429 |
return; |
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
430 |
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
|
431 |
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
|
432 |
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
|
433 |
return; |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
434 |
|
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
435 |
// 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
|
436 |
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
|
437 |
{ |
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
438 |
_mainviewmodel.Project.Cuttings.Add(newCutting); |
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
439 |
_mainviewmodel.Project.CuttingsDict.Add(newCutting.Title, newCutting); |
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
440 |
} |
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
|
441 |
} |
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
|
442 |
|
186
83615722dbab
Debug data management for others panels to redisplay.
cavaliet
parents:
182
diff
changeset
|
443 |
// And now we build the new UserPanel |
156
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
152
diff
changeset
|
444 |
Random c = new Random(); |
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
|
445 |
uint color = (uint)c.Next(12) + 1; // for the number to be >0 |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
446 |
switch (((UserControlScreen)sender).id) |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
447 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
448 |
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
|
449 |
UserControlPivot.ApplyColor(1, color); |
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
|
450 |
Panel1 = new UserControlUserPanel(1, (new ColorFactory()).Colors[color], newCutting, _mainviewmodel.Project.VideoPath, ((UserControlScreen)sender).AnnotationOrSearchMode, ((UserControlScreen)sender).SearchedProject); |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
451 |
Panel1.Name = "UserPanel1"; |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
452 |
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
|
453 |
Panel1.OnTagVisualisation += new EventHandler(Panel_OnTagVisualisation); |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
454 |
Panel1.idcolor = color; |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
455 |
//3-Rajout sur la Grid Root |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
456 |
root.Children.Add(Panel1); |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
457 |
break; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
458 |
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
|
459 |
UserControlPivot.ApplyColor(2, color); |
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
|
460 |
Panel2 = new UserControlUserPanel(2, (new ColorFactory()).Colors[color], newCutting, _mainviewmodel.Project.VideoPath, ((UserControlScreen)sender).AnnotationOrSearchMode, ((UserControlScreen)sender).SearchedProject); |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
461 |
Panel2.Name = "UserPanel2"; |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
462 |
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
|
463 |
Panel2.OnTagVisualisation += new EventHandler(Panel_OnTagVisualisation); |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
464 |
Panel2.idcolor = color; |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
465 |
//3-Rajout sur la Grid Root |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
466 |
root.Children.Add(Panel2); |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
467 |
break; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
468 |
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
|
469 |
UserControlPivot.ApplyColor(3, color); |
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
|
470 |
Panel3 = new UserControlUserPanel(3, (new ColorFactory()).Colors[color], newCutting, _mainviewmodel.Project.VideoPath, ((UserControlScreen)sender).AnnotationOrSearchMode, ((UserControlScreen)sender).SearchedProject); |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
471 |
Panel3.Name = "UserPanel3"; |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
472 |
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
|
473 |
Panel3.OnTagVisualisation += new EventHandler(Panel_OnTagVisualisation); |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
474 |
Panel3.idcolor = color; |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
475 |
//3-Rajout sur la Grid Root |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
476 |
root.Children.Add(Panel3); |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
477 |
break; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
478 |
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
|
479 |
UserControlPivot.ApplyColor(4, color); |
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 |
Panel4 = new UserControlUserPanel(4, (new ColorFactory()).Colors[color], newCutting, _mainviewmodel.Project.VideoPath, ((UserControlScreen)sender).AnnotationOrSearchMode, ((UserControlScreen)sender).SearchedProject); |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
481 |
Panel4.Name = "UserPanel4"; |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
482 |
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
|
483 |
Panel4.OnTagVisualisation += new EventHandler(Panel_OnTagVisualisation); |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
484 |
Panel4.idcolor = color; |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
485 |
//3-Rajout sur la Grid Root |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
486 |
root.Children.Add(Panel4); |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
487 |
break; |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
488 |
} |
112 | 489 |
} |
73 | 490 |
} |
491 |
catch (Exception ex) { } |
|
72
f1ca0958c992
Travail sur le control List Video et comunication entre ListVideo et FingersDance
sarias
parents:
60
diff
changeset
|
492 |
} |
73 | 493 |
|
143 | 494 |
//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
|
495 |
private void CloseAlert_EH_SurfaceButton_ContactDown(object sender, ConfirmEventArgs e) |
143 | 496 |
{ |
497 |
Grid root = (Grid)(((UserControlClose)sender).Parent); |
|
141
923687896770
UserControlClose more readable and MainSurfaceWindow now uses the ConfirmYesOrNo event.
cavaliet
parents:
140
diff
changeset
|
498 |
if(e.Confirmed==true) |
143 | 499 |
{ |
141
923687896770
UserControlClose more readable and MainSurfaceWindow now uses the ConfirmYesOrNo event.
cavaliet
parents:
140
diff
changeset
|
500 |
switch(e.PanelNumber) |
143 | 501 |
{ |
502 |
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
|
503 |
UserControlPivot.ApplyColor(1, 0); |
143 | 504 |
root.Children.Remove(Panel1); |
505 |
Panel1 = null; |
|
506 |
break; |
|
507 |
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
|
508 |
UserControlPivot.ApplyColor(2, 0); |
143 | 509 |
root.Children.Remove(Panel2); |
510 |
Panel2 = null; |
|
511 |
break; |
|
512 |
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
|
513 |
UserControlPivot.ApplyColor(3, 0); |
143 | 514 |
root.Children.Remove(Panel3); |
515 |
Panel3 = null; |
|
516 |
break; |
|
517 |
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
|
518 |
UserControlPivot.ApplyColor(4, 0); |
143 | 519 |
root.Children.Remove(Panel4); |
520 |
Panel4 = null; |
|
521 |
break; |
|
522 |
} |
|
523 |
} |
|
524 |
root.Children.Remove(((UserControlClose)sender)); |
|
168
d70ee2002f75
Thumb Timeline Rotation and Debug Closing Panels
ARIAS Santiago
parents:
162
diff
changeset
|
525 |
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
|
526 |
_mainviewmodel.CloseProject(); |
143 | 527 |
} |
77 | 528 |
|
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
529 |
|
211
50e6fe2c2ea2
second step for search. Menu created and UserPanel modified for search mode.
cavaliet
parents:
195
diff
changeset
|
530 |
//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
|
531 |
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
|
532 |
{ |
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
|
533 |
// 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
|
534 |
saveDatas(); |
188
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
535 |
} |
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
|
536 |
|
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
|
537 |
// |
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
|
538 |
// 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
|
539 |
// |
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
|
540 |
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
|
541 |
{ |
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
|
542 |
// 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
|
543 |
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
|
544 |
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
|
545 |
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
|
546 |
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
|
547 |
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
|
548 |
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
|
549 |
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
|
550 |
), |
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
|
551 |
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
|
552 |
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
|
553 |
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
|
554 |
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
|
555 |
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
|
556 |
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
|
557 |
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
|
558 |
) |
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
|
559 |
), |
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
|
560 |
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
|
561 |
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
|
562 |
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
|
563 |
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
|
564 |
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
|
565 |
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
|
566 |
) |
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
|
567 |
), |
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
|
568 |
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
|
569 |
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
|
570 |
) |
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
|
571 |
); |
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
|
572 |
// 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
|
573 |
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
|
574 |
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
|
575 |
{ |
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
|
576 |
XElement cutNode = new XElement("decoupage", new XAttribute("id", cut.Id), new XAttribute("author", "perso"), |
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
|
577 |
new XElement("title",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
|
578 |
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
|
579 |
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
|
580 |
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
|
581 |
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
|
582 |
{ |
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
|
583 |
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
|
584 |
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
|
585 |
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
|
586 |
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
|
587 |
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
|
588 |
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
|
589 |
new XAttribute("src", ""), |
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
|
590 |
new XElement("title", annot.GestureType), |
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
|
591 |
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
|
592 |
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
|
593 |
new XElement("tags"), |
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
|
594 |
new XElement("gestureType", annot.GestureType))); |
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
|
595 |
} |
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 |
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
|
597 |
} |
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
|
598 |
|
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 |
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
|
600 |
//Console.WriteLine(d); |
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 |
d.Save(_mainviewmodel.Project.Name + ".ldt"); |
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 |
} |
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 |
|
188
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
606 |
//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
|
607 |
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
|
608 |
{ |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
609 |
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
|
610 |
if (Panel1 != null) |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
611 |
{ |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
612 |
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
|
613 |
Panel1.PlayerMute(true); |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
614 |
} |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
615 |
if (Panel2 != null) |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
616 |
{ |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
617 |
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
|
618 |
Panel2.PlayerMute(true); |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
619 |
} |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
620 |
if (Panel3 != null) |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
621 |
{ |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
622 |
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
|
623 |
Panel3.PlayerMute(true); |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
624 |
} |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
625 |
if (Panel4 != null) |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
626 |
{ |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
627 |
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
|
628 |
Panel4.PlayerMute(true); |
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
629 |
|
e642ad0c366b
Tag Visualisation Control Sound (Use Byte Value "01") and Mute all other Players opened
ARIAS Santiago
parents:
186
diff
changeset
|
630 |
} |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
631 |
} |
217 | 632 |
|
633 |
private void CreditsButton_ContactDown(object sender, EventArgs e) |
|
634 |
{ |
|
635 |
Console.WriteLine("CreditsButton_ContactDown"); |
|
636 |
if(sender==CreditsButton1) |
|
637 |
{ |
|
638 |
CreditsScroll1.Visibility = (CreditsScroll1.Visibility == Visibility.Hidden) ? Visibility.Visible : Visibility.Hidden; |
|
639 |
} |
|
640 |
else if (sender == CreditsButton2) |
|
641 |
{ |
|
642 |
CreditsScroll2.Visibility = (CreditsScroll2.Visibility == Visibility.Hidden) ? Visibility.Visible : Visibility.Hidden; |
|
643 |
} |
|
644 |
else if (sender == CreditsButton3) |
|
645 |
{ |
|
646 |
CreditsScroll3.Visibility = (CreditsScroll3.Visibility == Visibility.Hidden) ? Visibility.Visible : Visibility.Hidden; |
|
647 |
} |
|
648 |
else if (sender == CreditsButton4) |
|
649 |
{ |
|
650 |
CreditsScroll4.Visibility = (CreditsScroll4.Visibility == Visibility.Hidden) ? Visibility.Visible : Visibility.Hidden; |
|
651 |
} |
|
652 |
} |
|
45 | 653 |
} |
654 |
} |