From e67f3e820fbef83356d2a63fcfb797282d342185 Mon Sep 17 00:00:00 2001
From: Antoine Tritschberger <antoine.tritschberger@etu.unistra.fr>
Date: Fri, 3 Apr 2020 14:15:46 +0200
Subject: [PATCH] Correction du rejouer

---
 .../psychorientation/InterfaceClasse.Designer.cs         | 4 ++--
 psychorientation/psychorientation/InterfaceClasse.cs     | 5 +++--
 psychorientation/psychorientation/InterfaceClasse.resx   | 2 +-
 psychorientation/psychorientation/Menu.Designer.cs       | 1 +
 psychorientation/psychorientation/Menu.cs                | 9 +++++++--
 psychorientation/psychorientation/Message.cs             | 4 +---
 6 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/psychorientation/psychorientation/InterfaceClasse.Designer.cs b/psychorientation/psychorientation/InterfaceClasse.Designer.cs
index ae4bea3..74eaf43 100644
--- a/psychorientation/psychorientation/InterfaceClasse.Designer.cs
+++ b/psychorientation/psychorientation/InterfaceClasse.Designer.cs
@@ -69,7 +69,7 @@
             this.lblDate.BackColor = System.Drawing.Color.Transparent;
             this.lblDate.Font = new System.Drawing.Font("Consolas", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.lblDate.ForeColor = System.Drawing.Color.White;
-            this.lblDate.Location = new System.Drawing.Point(277, 171);
+            this.lblDate.Location = new System.Drawing.Point(275, 171);
             this.lblDate.Name = "lblDate";
             this.lblDate.Size = new System.Drawing.Size(140, 22);
             this.lblDate.TabIndex = 2;
@@ -81,7 +81,7 @@
             this.lblClasse.BackColor = System.Drawing.Color.Transparent;
             this.lblClasse.Font = new System.Drawing.Font("Consolas", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.lblClasse.ForeColor = System.Drawing.Color.White;
-            this.lblClasse.Location = new System.Drawing.Point(951, 171);
+            this.lblClasse.Location = new System.Drawing.Point(949, 171);
             this.lblClasse.Name = "lblClasse";
             this.lblClasse.Size = new System.Drawing.Size(140, 22);
             this.lblClasse.TabIndex = 4;
diff --git a/psychorientation/psychorientation/InterfaceClasse.cs b/psychorientation/psychorientation/InterfaceClasse.cs
index 65a9bee..2782d15 100644
--- a/psychorientation/psychorientation/InterfaceClasse.cs
+++ b/psychorientation/psychorientation/InterfaceClasse.cs
@@ -220,14 +220,15 @@ namespace psychorientation
                         moyenneInitiale,
                         effortFinal,
                         competenceFinal,
-                        moyenneFinale,
-                        isRandom
+                        moyenneFinale
                     );
                     m_fin.ShowDialog();
                     UntransmitKeyDown();
                     pb_action_suivante.Click -= new System.EventHandler(Pb_action_suivante_Click);
                     this.FormClosing -= new System.Windows.Forms.FormClosingEventHandler(InterfaceClasse_FormClosing);
                     Close();
+                    InterfaceClasse iC = new InterfaceClasse(isRandom);
+                    iC.ShowDialog();
                     break;
             }
 
diff --git a/psychorientation/psychorientation/InterfaceClasse.resx b/psychorientation/psychorientation/InterfaceClasse.resx
index 02edc12..af07aa2 100644
--- a/psychorientation/psychorientation/InterfaceClasse.resx
+++ b/psychorientation/psychorientation/InterfaceClasse.resx
@@ -125,7 +125,7 @@
         AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
         LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
         ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACM
-        mgEAAk1TRnQBSQFMAgEBBgEAAYABAAGAAQAByAEAAcgBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+        mgEAAk1TRnQBSQFMAgEBBgEAAYgBAAGIAQAByAEAAcgBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
         AwABIAEDAgABkAEBAgABAQEAAQgGAAHiAQQXAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEA
         AcAB3AHAAQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEA
         A0IBAAM5AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIA
diff --git a/psychorientation/psychorientation/Menu.Designer.cs b/psychorientation/psychorientation/Menu.Designer.cs
index f957dc7..b403011 100644
--- a/psychorientation/psychorientation/Menu.Designer.cs
+++ b/psychorientation/psychorientation/Menu.Designer.cs
@@ -84,6 +84,7 @@
             this.Name = "Menu";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Text = "Menu";
+            this.Load += new System.EventHandler(this.Menu_Load);
             this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Menu_KeyDown);
             this.ResumeLayout(false);
             this.PerformLayout();
diff --git a/psychorientation/psychorientation/Menu.cs b/psychorientation/psychorientation/Menu.cs
index 00e6279..98c31c0 100644
--- a/psychorientation/psychorientation/Menu.cs
+++ b/psychorientation/psychorientation/Menu.cs
@@ -22,14 +22,14 @@ namespace psychorientation
         private void button1_Click(object sender, EventArgs e)
         {
             InterfaceClasse iC = new InterfaceClasse(false);
-            iC.Show();
+            iC.ShowDialog();
         }
 
 
         private void button2_Click(object sender, EventArgs e)
         {
             InterfaceClasse iC = new InterfaceClasse(true);
-            iC.Show();
+            iC.ShowDialog();
         }
 
         private void TransmitKeyDown()
@@ -54,5 +54,10 @@ namespace psychorientation
                 Close();
             }
         }
+
+        private void Menu_Load(object sender, EventArgs e)
+        {
+
+        }
     }
 }
diff --git a/psychorientation/psychorientation/Message.cs b/psychorientation/psychorientation/Message.cs
index c350742..1da6d1f 100644
--- a/psychorientation/psychorientation/Message.cs
+++ b/psychorientation/psychorientation/Message.cs
@@ -48,7 +48,7 @@ namespace psychorientation
             titre = titreAffiche;
         }
 
-        public void setParamRes(double effortInitial, double competenceInitial, double moyenneInitiale, double effortFinal, double competenceFinal, double moyenneFinale,bool isRandom)
+        public void setParamRes(double effortInitial, double competenceInitial, double moyenneInitiale, double effortFinal, double competenceFinal, double moyenneFinale)
         {
             effortScore = Math.Round(100 * (effortFinal - effortInitial) / effortInitial, 1);
             competenceScore = Math.Round(100 * (competenceFinal - competenceInitial) / competenceInitial, 1); 
@@ -206,8 +206,6 @@ namespace psychorientation
         private void btnRejouer_Click(object sender, EventArgs e)
         {
             this.DialogResult = DialogResult.OK;
-            InterfaceClasse iC = new InterfaceClasse(isRandom);
-            iC.Show();
         }
     }
 }
-- 
GitLab