From 51bb77e8528cdd0c770c62e4a4a041f5fb6bc4b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Gross?= <loic.gross@unistra.fr>
Date: Wed, 1 Apr 2020 20:20:23 +0200
Subject: [PATCH] InterfaceInfoCompletEleve debut note

---
 .../InterfaceInfoCompletEleve.Designer.cs     | 18 ++++++++++
 .../InterfaceInfoCompletEleve.cs              | 33 +++++++++++++++++++
 .../psychorientation/ListeEleve.cs            | 11 ++++---
 3 files changed, 58 insertions(+), 4 deletions(-)

diff --git a/psychorientation/psychorientation/InterfaceInfoCompletEleve.Designer.cs b/psychorientation/psychorientation/InterfaceInfoCompletEleve.Designer.cs
index 2eb7f24..5ee83c8 100755
--- a/psychorientation/psychorientation/InterfaceInfoCompletEleve.Designer.cs
+++ b/psychorientation/psychorientation/InterfaceInfoCompletEleve.Designer.cs
@@ -41,9 +41,11 @@
             this.lblMoyenneNote = new System.Windows.Forms.Label();
             this.pcbEleve = new System.Windows.Forms.PictureBox();
             this.pnlNote = new System.Windows.Forms.Panel();
+            this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
             this.panel1.SuspendLayout();
             this.panel2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pcbEleve)).BeginInit();
+            this.pnlNote.SuspendLayout();
             this.SuspendLayout();
             // 
             // lblNomEleve
@@ -161,11 +163,25 @@
             // 
             // pnlNote
             // 
+            this.pnlNote.Controls.Add(this.tableLayoutPanel1);
             this.pnlNote.Location = new System.Drawing.Point(98, 243);
             this.pnlNote.Name = "pnlNote";
             this.pnlNote.Size = new System.Drawing.Size(391, 134);
             this.pnlNote.TabIndex = 16;
             // 
+            // tableLayoutPanel1
+            // 
+            this.tableLayoutPanel1.ColumnCount = 3;
+            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 119F));
+            this.tableLayoutPanel1.Location = new System.Drawing.Point(16, 19);
+            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+            this.tableLayoutPanel1.RowCount = 1;
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
+            this.tableLayoutPanel1.Size = new System.Drawing.Size(355, 50);
+            this.tableLayoutPanel1.TabIndex = 0;
+            // 
             // InterfaceInfoCompletEleve
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -188,6 +204,7 @@
             this.panel1.ResumeLayout(false);
             this.panel2.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.pcbEleve)).EndInit();
+            this.pnlNote.ResumeLayout(false);
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -208,5 +225,6 @@
         private System.Windows.Forms.Label lblMoyenneNote;
         private System.Windows.Forms.PictureBox pcbEleve;
         private System.Windows.Forms.Panel pnlNote;
+        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
     }
 }
\ No newline at end of file
diff --git a/psychorientation/psychorientation/InterfaceInfoCompletEleve.cs b/psychorientation/psychorientation/InterfaceInfoCompletEleve.cs
index 8338f69..b06bfe8 100755
--- a/psychorientation/psychorientation/InterfaceInfoCompletEleve.cs
+++ b/psychorientation/psychorientation/InterfaceInfoCompletEleve.cs
@@ -54,11 +54,44 @@ namespace psychorientation
 
             MajPanel(pnlCompetence, eleve.GetCompetence());
             MajPanel(pnlEffort, eleve.GetEffort());
+
+            InitNote();
         }
         private void MajPanel(Panel p, double valeur)
         {
             int val = (int)valeur;
             p.Size = new Size(val * 133 / 10, p.Height);
         }
+
+        private void InitNote()
+        {
+            List<Note> listNote = this.eleve.GetlisteNotes();
+            TableLayoutPanel tlp = new TableLayoutPanel();
+            tlp.ColumnCount = 4;
+            tlp.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+            tlp.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+            tlp.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+            tlp.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+            tlp.RowCount = 1 + listNote.Count;
+            for(int i=0; i<tlp.RowCount; i++)
+            {
+                tlp.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
+            }
+            pnlNote.Controls.Add(tlp);
+
+            /*this.tableLayoutPanel1.ColumnCount = 4;
+            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+            this.tableLayoutPanel1.Location = new System.Drawing.Point(16, 19);
+            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+            this.tableLayoutPanel1.RowCount = 1;
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
+            this.tableLayoutPanel1.Size = new System.Drawing.Size(413, 50);
+            this.tableLayoutPanel1.TabIndex = 0;*/
+        }
+
+
     }
 }
diff --git a/psychorientation/psychorientation/ListeEleve.cs b/psychorientation/psychorientation/ListeEleve.cs
index 465ead1..9b8cea5 100755
--- a/psychorientation/psychorientation/ListeEleve.cs
+++ b/psychorientation/psychorientation/ListeEleve.cs
@@ -24,10 +24,13 @@ namespace psychorientation
             Libelle lib = new Libelle();
 
             // TEST
-            //Eleve e1 = new Eleve(4);
-            //Eleve e2 = new Eleve(5);
-            //gestEleve.AjouterEleve(e1);
-            //gestEleve.AjouterEleve(e2);
+            Eleve e1 = new Eleve(4);
+            Eleve e2 = new Eleve(5);
+            e1.AjouterNote("une");
+            e1.AjouterNote("deux");
+            e1.AjouterNote("trois");
+            gestEleve.AjouterEleve(e1);
+            gestEleve.AjouterEleve(e2);
 
             List<Eleve> listEleve = gestEleve.GetListeEleves();
             int y = 0;
-- 
GitLab