src/FingersDance/MainSurfaceWindow.xaml.cs
changeset 217 6cfd723a1378
parent 214 beebae32b1ed
child 223 90d2be5c3d39
--- a/src/FingersDance/MainSurfaceWindow.xaml.cs	Fri Nov 20 17:14:52 2009 +0100
+++ b/src/FingersDance/MainSurfaceWindow.xaml.cs	Mon Nov 23 15:21:17 2009 +0100
@@ -56,6 +56,9 @@
             InitGridPositions();
             // Add handlers for Application activation events
             AddActivationHandlers();
+            // Add credit text
+            CreditsText1.Text = CreditsText2.Text = CreditsText3.Text = CreditsText4.Text =
+                "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";
         }
         #endregion
 
@@ -296,7 +299,7 @@
             switch ((int)sender)
             {
                 case 1:
-                    if (Panel1 == null && Grid1.Children.Count == 1)
+                    if (Panel1 == null && Grid1.Children.Count == 3)
                     {
                         //1-Creation du control Screen
                         UserControlScreen Screen = new UserControlScreen(1, _mainviewmodel);
@@ -309,7 +312,7 @@
                     }
                     else //Affichage du message de confirmation
                     {
-                        if (Panel1 != null && Grid1.Children.Count == 2)
+                        if (Panel1 != null && Grid1.Children.Count == 4)
                         {
                             UserControlClose UCclose = new UserControlClose(1, "Êtes-vous sûr de vouloir quitter ?");
                             UCclose.Name = "CloseAlert1";
@@ -319,7 +322,7 @@
                     }
                     break;
                 case 2:
-                    if (Panel2 == null && Grid2.Children.Count == 1)
+                    if (Panel2 == null && Grid2.Children.Count == 3)
                     {
                         //1-Creation du control Screen
                         UserControlScreen Screen = new UserControlScreen(2, _mainviewmodel);
@@ -332,7 +335,7 @@
                     }
                     else //Affichage du message de confirmation
                     {
-                        if (Panel2 != null && Grid2.Children.Count == 2)
+                        if (Panel2 != null && Grid2.Children.Count == 4)
                         {
                             UserControlClose UCclose = new UserControlClose(2, "Êtes-vous sûr de vouloir quitter ?");
                             UCclose.Name = "CloseAlert2";
@@ -342,7 +345,7 @@
                     }
                     break;
                 case 3:
-                    if (Panel3 == null && Grid3.Children.Count == 1)
+                    if (Panel3 == null && Grid3.Children.Count == 3)
                     {
                         //1-Creation du control Screen
                         UserControlScreen Screen = new UserControlScreen(3, _mainviewmodel);
@@ -355,7 +358,7 @@
                     }
                     else //Affichage du message de confirmation
                     {
-                        if (Panel3 != null && Grid3.Children.Count == 2)
+                        if (Panel3 != null && Grid3.Children.Count == 4)
                         {
                             UserControlClose UCclose = new UserControlClose(3, "Êtes-vous sûr de vouloir quitter ?");
                             UCclose.Name = "CloseAlert3";
@@ -365,7 +368,7 @@
                     }
                     break;
                 case 4:
-                    if (Panel4 == null && Grid4.Children.Count == 1)
+                    if (Panel4 == null && Grid4.Children.Count == 3)
                     {
                         //1-Creation du control Screen
                         UserControlScreen Screen = new UserControlScreen(4, _mainviewmodel);
@@ -378,7 +381,7 @@
                     }
                     else //Affichage du message de confirmation
                     {
-                        if (Panel4 != null && Grid4.Children.Count == 2)
+                        if (Panel4 != null && Grid4.Children.Count == 4)
                         {
                             UserControlClose UCclose = new UserControlClose(4, "Êtes-vous sûr de vouloir quitter ?");
                             UCclose.Name = "CloseAlert4";
@@ -626,5 +629,26 @@
                 
             }
         }
+
+        private void CreditsButton_ContactDown(object sender, EventArgs e)
+        {
+            Console.WriteLine("CreditsButton_ContactDown");
+            if(sender==CreditsButton1)
+            {
+                CreditsScroll1.Visibility = (CreditsScroll1.Visibility == Visibility.Hidden) ? Visibility.Visible : Visibility.Hidden;
+            }
+            else if (sender == CreditsButton2)
+            {
+                CreditsScroll2.Visibility = (CreditsScroll2.Visibility == Visibility.Hidden) ? Visibility.Visible : Visibility.Hidden;
+            }
+            else if (sender == CreditsButton3)
+            {
+                CreditsScroll3.Visibility = (CreditsScroll3.Visibility == Visibility.Hidden) ? Visibility.Visible : Visibility.Hidden;
+            }
+            else if (sender == CreditsButton4)
+            {
+                CreditsScroll4.Visibility = (CreditsScroll4.Visibility == Visibility.Hidden) ? Visibility.Visible : Visibility.Hidden;
+            }
+        }
     }
 }
\ No newline at end of file