54 InitPivotInertia(); |
54 InitPivotInertia(); |
55 //Permet d'initialiser les quand Grid à la position initiale du pivot |
55 //Permet d'initialiser les quand Grid à la position initiale du pivot |
56 InitGridPositions(); |
56 InitGridPositions(); |
57 // Add handlers for Application activation events |
57 // Add handlers for Application activation events |
58 AddActivationHandlers(); |
58 AddActivationHandlers(); |
|
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"; |
59 } |
62 } |
60 #endregion |
63 #endregion |
61 |
64 |
62 #region Initialization |
65 #region Initialization |
63 |
66 |
294 { |
297 { |
295 // Traitement du contact down sur le pivot (Création d'un screen ou suppression d'un panel |
298 // Traitement du contact down sur le pivot (Création d'un screen ou suppression d'un panel |
296 switch ((int)sender) |
299 switch ((int)sender) |
297 { |
300 { |
298 case 1: |
301 case 1: |
299 if (Panel1 == null && Grid1.Children.Count == 1) |
302 if (Panel1 == null && Grid1.Children.Count == 3) |
300 { |
303 { |
301 //1-Creation du control Screen |
304 //1-Creation du control Screen |
302 UserControlScreen Screen = new UserControlScreen(1, _mainviewmodel); |
305 UserControlScreen Screen = new UserControlScreen(1, _mainviewmodel); |
303 Screen.Name = "Screen1"; |
306 Screen.Name = "Screen1"; |
304 Screen.contexteGrid = Grid1.Name.ToString(); |
307 Screen.contexteGrid = Grid1.Name.ToString(); |
307 |
310 |
308 Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
311 Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
309 } |
312 } |
310 else //Affichage du message de confirmation |
313 else //Affichage du message de confirmation |
311 { |
314 { |
312 if (Panel1 != null && Grid1.Children.Count == 2) |
315 if (Panel1 != null && Grid1.Children.Count == 4) |
313 { |
316 { |
314 UserControlClose UCclose = new UserControlClose(1, "Êtes-vous sûr de vouloir quitter ?"); |
317 UserControlClose UCclose = new UserControlClose(1, "Êtes-vous sûr de vouloir quitter ?"); |
315 UCclose.Name = "CloseAlert1"; |
318 UCclose.Name = "CloseAlert1"; |
316 Grid1.Children.Add(UCclose); |
319 Grid1.Children.Add(UCclose); |
317 UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
320 UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
318 } |
321 } |
319 } |
322 } |
320 break; |
323 break; |
321 case 2: |
324 case 2: |
322 if (Panel2 == null && Grid2.Children.Count == 1) |
325 if (Panel2 == null && Grid2.Children.Count == 3) |
323 { |
326 { |
324 //1-Creation du control Screen |
327 //1-Creation du control Screen |
325 UserControlScreen Screen = new UserControlScreen(2, _mainviewmodel); |
328 UserControlScreen Screen = new UserControlScreen(2, _mainviewmodel); |
326 Screen.Name = "Screen2"; |
329 Screen.Name = "Screen2"; |
327 Screen.contexteGrid = Grid2.Name.ToString(); |
330 Screen.contexteGrid = Grid2.Name.ToString(); |
330 |
333 |
331 Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
334 Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
332 } |
335 } |
333 else //Affichage du message de confirmation |
336 else //Affichage du message de confirmation |
334 { |
337 { |
335 if (Panel2 != null && Grid2.Children.Count == 2) |
338 if (Panel2 != null && Grid2.Children.Count == 4) |
336 { |
339 { |
337 UserControlClose UCclose = new UserControlClose(2, "Êtes-vous sûr de vouloir quitter ?"); |
340 UserControlClose UCclose = new UserControlClose(2, "Êtes-vous sûr de vouloir quitter ?"); |
338 UCclose.Name = "CloseAlert2"; |
341 UCclose.Name = "CloseAlert2"; |
339 Grid2.Children.Add(UCclose); |
342 Grid2.Children.Add(UCclose); |
340 UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
343 UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
341 } |
344 } |
342 } |
345 } |
343 break; |
346 break; |
344 case 3: |
347 case 3: |
345 if (Panel3 == null && Grid3.Children.Count == 1) |
348 if (Panel3 == null && Grid3.Children.Count == 3) |
346 { |
349 { |
347 //1-Creation du control Screen |
350 //1-Creation du control Screen |
348 UserControlScreen Screen = new UserControlScreen(3, _mainviewmodel); |
351 UserControlScreen Screen = new UserControlScreen(3, _mainviewmodel); |
349 Screen.Name = "Screen3"; |
352 Screen.Name = "Screen3"; |
350 Screen.contexteGrid = Grid3.Name.ToString(); |
353 Screen.contexteGrid = Grid3.Name.ToString(); |
353 |
356 |
354 Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
357 Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
355 } |
358 } |
356 else //Affichage du message de confirmation |
359 else //Affichage du message de confirmation |
357 { |
360 { |
358 if (Panel3 != null && Grid3.Children.Count == 2) |
361 if (Panel3 != null && Grid3.Children.Count == 4) |
359 { |
362 { |
360 UserControlClose UCclose = new UserControlClose(3, "Êtes-vous sûr de vouloir quitter ?"); |
363 UserControlClose UCclose = new UserControlClose(3, "Êtes-vous sûr de vouloir quitter ?"); |
361 UCclose.Name = "CloseAlert3"; |
364 UCclose.Name = "CloseAlert3"; |
362 Grid3.Children.Add(UCclose); |
365 Grid3.Children.Add(UCclose); |
363 UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
366 UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
364 } |
367 } |
365 } |
368 } |
366 break; |
369 break; |
367 case 4: |
370 case 4: |
368 if (Panel4 == null && Grid4.Children.Count == 1) |
371 if (Panel4 == null && Grid4.Children.Count == 3) |
369 { |
372 { |
370 //1-Creation du control Screen |
373 //1-Creation du control Screen |
371 UserControlScreen Screen = new UserControlScreen(4, _mainviewmodel); |
374 UserControlScreen Screen = new UserControlScreen(4, _mainviewmodel); |
372 Screen.Name = "Screen4"; |
375 Screen.Name = "Screen4"; |
373 Screen.contexteGrid = Grid4.Name.ToString(); |
376 Screen.contexteGrid = Grid4.Name.ToString(); |
376 |
379 |
377 Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
380 Screen.UC_Screen_NewCutting += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
378 } |
381 } |
379 else //Affichage du message de confirmation |
382 else //Affichage du message de confirmation |
380 { |
383 { |
381 if (Panel4 != null && Grid4.Children.Count == 2) |
384 if (Panel4 != null && Grid4.Children.Count == 4) |
382 { |
385 { |
383 UserControlClose UCclose = new UserControlClose(4, "Êtes-vous sûr de vouloir quitter ?"); |
386 UserControlClose UCclose = new UserControlClose(4, "Êtes-vous sûr de vouloir quitter ?"); |
384 UCclose.Name = "CloseAlert4"; |
387 UCclose.Name = "CloseAlert4"; |
385 Grid4.Children.Add(UCclose); |
388 Grid4.Children.Add(UCclose); |
386 UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
389 UCclose.ConfirmYesOrNo += new EventHandler<ConfirmEventArgs>(CloseAlert_EH_SurfaceButton_ContactDown); |
624 if (!PanelMaster.Name.Equals(Panel4.Name)) |
627 if (!PanelMaster.Name.Equals(Panel4.Name)) |
625 Panel4.PlayerMute(true); |
628 Panel4.PlayerMute(true); |
626 |
629 |
627 } |
630 } |
628 } |
631 } |
|
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 } |
629 } |
653 } |
630 } |
654 } |