equal
deleted
inserted
replaced
230 private void UserControlPivot_EH_SurfaceButtonPlayer_ContactDown(object sender, EventArgs e) |
230 private void UserControlPivot_EH_SurfaceButtonPlayer_ContactDown(object sender, EventArgs e) |
231 { |
231 { |
232 switch ((int)sender) |
232 switch ((int)sender) |
233 { |
233 { |
234 case 1: |
234 case 1: |
235 if (Panel1 == null) |
235 if (Panel1 == null && Grid1.Children.Count == 1) |
236 { |
236 { |
237 //1-Creation du control Screen |
237 //1-Creation du control Screen |
238 UserControlScreen Screen = new UserControlScreen(1); |
238 UserControlScreen Screen = new UserControlScreen(1); |
239 Screen.Name = "Screen1"; |
239 Screen.Name = "Screen1"; |
240 Screen.contexteGrid = Grid1.Name.ToString(); |
240 Screen.contexteGrid = Grid1.Name.ToString(); |
243 |
243 |
244 Screen.UC_Screen_NewSession += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
244 Screen.UC_Screen_NewSession += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
245 } |
245 } |
246 else //Affichage du message de confirmation |
246 else //Affichage du message de confirmation |
247 { |
247 { |
248 UserControlClose UCclose = new UserControlClose(1); |
248 if (Panel1 != null && Grid1.Children.Count == 2) |
249 UCclose.Name = "CloseAlert1"; |
249 { |
250 Grid1.Children.Add(UCclose); |
250 UserControlClose UCclose = new UserControlClose(1); |
251 UCclose.EH_SurfaceButtonClose_ContactDown += new EventHandler(CloseAlert_EH_SurfaceButton_ContactDown); |
251 UCclose.Name = "CloseAlert1"; |
|
252 Grid1.Children.Add(UCclose); |
|
253 UCclose.EH_SurfaceButtonClose_ContactDown += new EventHandler(CloseAlert_EH_SurfaceButton_ContactDown); |
|
254 } |
252 } |
255 } |
253 break; |
256 break; |
254 case 2: |
257 case 2: |
255 if (Panel2 == null) |
258 if (Panel2 == null && Grid2.Children.Count == 1) |
256 { |
259 { |
257 //1-Creation du control Screen |
260 //1-Creation du control Screen |
258 UserControlScreen Screen = new UserControlScreen(2); |
261 UserControlScreen Screen = new UserControlScreen(2); |
259 Screen.Name = "Screen2"; |
262 Screen.Name = "Screen2"; |
260 Screen.contexteGrid = Grid2.Name.ToString(); |
263 Screen.contexteGrid = Grid2.Name.ToString(); |
263 |
266 |
264 Screen.UC_Screen_NewSession += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
267 Screen.UC_Screen_NewSession += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
265 } |
268 } |
266 else //Affichage du message de confirmation |
269 else //Affichage du message de confirmation |
267 { |
270 { |
268 UserControlClose UCclose = new UserControlClose(2); |
271 if (Panel2 != null && Grid2.Children.Count == 2) |
269 UCclose.Name = "CloseAlert2"; |
272 { |
270 Grid2.Children.Add(UCclose); |
273 UserControlClose UCclose = new UserControlClose(2); |
271 UCclose.EH_SurfaceButtonClose_ContactDown += new EventHandler(CloseAlert_EH_SurfaceButton_ContactDown); |
274 UCclose.Name = "CloseAlert2"; |
|
275 Grid2.Children.Add(UCclose); |
|
276 UCclose.EH_SurfaceButtonClose_ContactDown += new EventHandler(CloseAlert_EH_SurfaceButton_ContactDown); |
|
277 } |
272 } |
278 } |
273 break; |
279 break; |
274 case 3: |
280 case 3: |
275 if (Panel3 == null) |
281 if (Panel3 == null && Grid3.Children.Count == 1) |
276 { |
282 { |
277 //1-Creation du control Screen |
283 //1-Creation du control Screen |
278 UserControlScreen Screen = new UserControlScreen(3); |
284 UserControlScreen Screen = new UserControlScreen(3); |
279 Screen.Name = "Screen3"; |
285 Screen.Name = "Screen3"; |
280 Screen.contexteGrid = Grid3.Name.ToString(); |
286 Screen.contexteGrid = Grid3.Name.ToString(); |
283 |
289 |
284 Screen.UC_Screen_NewSession += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
290 Screen.UC_Screen_NewSession += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
285 } |
291 } |
286 else //Affichage du message de confirmation |
292 else //Affichage du message de confirmation |
287 { |
293 { |
288 UserControlClose UCclose = new UserControlClose(3); |
294 if (Panel3 != null && Grid3.Children.Count == 2) |
289 UCclose.Name = "CloseAlert3"; |
295 { |
290 Grid3.Children.Add(UCclose); |
296 UserControlClose UCclose = new UserControlClose(3); |
291 UCclose.EH_SurfaceButtonClose_ContactDown += new EventHandler(CloseAlert_EH_SurfaceButton_ContactDown); |
297 UCclose.Name = "CloseAlert3"; |
|
298 Grid3.Children.Add(UCclose); |
|
299 UCclose.EH_SurfaceButtonClose_ContactDown += new EventHandler(CloseAlert_EH_SurfaceButton_ContactDown); |
|
300 } |
292 } |
301 } |
293 break; |
302 break; |
294 case 4: |
303 case 4: |
295 if (Panel4 == null) |
304 if (Panel4 == null && Grid4.Children.Count == 1) |
296 { |
305 { |
297 //1-Creation du control Screen |
306 //1-Creation du control Screen |
298 UserControlScreen Screen = new UserControlScreen(4); |
307 UserControlScreen Screen = new UserControlScreen(4); |
299 Screen.Name = "Screen4"; |
308 Screen.Name = "Screen4"; |
300 Screen.contexteGrid = Grid4.Name.ToString(); |
309 Screen.contexteGrid = Grid4.Name.ToString(); |
303 |
312 |
304 Screen.UC_Screen_NewSession += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
313 Screen.UC_Screen_NewSession += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
305 } |
314 } |
306 else //Affichage du message de confirmation |
315 else //Affichage du message de confirmation |
307 { |
316 { |
308 UserControlClose UCclose = new UserControlClose(4); |
317 if (Panel4 != null && Grid4.Children.Count == 2) |
309 UCclose.Name = "CloseAlert4"; |
318 { |
310 Grid4.Children.Add(UCclose); |
319 UserControlClose UCclose = new UserControlClose(4); |
311 UCclose.EH_SurfaceButtonClose_ContactDown += new EventHandler(CloseAlert_EH_SurfaceButton_ContactDown); |
320 UCclose.Name = "CloseAlert4"; |
|
321 Grid4.Children.Add(UCclose); |
|
322 UCclose.EH_SurfaceButtonClose_ContactDown += new EventHandler(CloseAlert_EH_SurfaceButton_ContactDown); |
|
323 } |
312 } |
324 } |
313 break; |
325 break; |
314 } |
326 } |
315 |
327 |
316 } |
328 } |
363 { |
375 { |
364 switch(((UserControlClose)sender).Id) |
376 switch(((UserControlClose)sender).Id) |
365 { |
377 { |
366 case 1: |
378 case 1: |
367 root.Children.Remove(Panel1); |
379 root.Children.Remove(Panel1); |
|
380 Panel1 = null; |
368 break; |
381 break; |
369 case 2: |
382 case 2: |
370 root.Children.Remove(Panel2); |
383 root.Children.Remove(Panel2); |
|
384 Panel2 = null; |
371 break; |
385 break; |
372 case 3: |
386 case 3: |
373 root.Children.Remove(Panel3); |
387 root.Children.Remove(Panel3); |
|
388 Panel3 = null; |
374 break; |
389 break; |
375 case 4: |
390 case 4: |
376 root.Children.Remove(Panel4); |
391 root.Children.Remove(Panel4); |
|
392 Panel4 = null; |
377 break; |
393 break; |
378 } |
394 } |
379 } |
395 } |
380 root.Children.Remove(((UserControlClose)sender)); |
396 root.Children.Remove(((UserControlClose)sender)); |
381 } |
397 } |