From b9635a6057dbf7441829743d6440aa9e064a235a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20F=C3=A9lix?= <felixantoine67@yahoo.fr> Date: Thu, 2 Apr 2020 16:08:57 +0200 Subject: [PATCH] =?UTF-8?q?Coordination=20des=20informations=20donn=C3=A9e?= =?UTF-8?q?s=20via=20les=20interfaces.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InterfaceClasse.Designer.cs | 2 +- .../psychorientation/InterfaceClasse.resx | 2 +- .../InterfaceInfoCompletEleve.cs | 10 +++++----- .../InterfaceInfoEleve.Designer.cs | 15 +++++++------- .../psychorientation/InterfaceInfoEleve.cs | 20 ++++--------------- psychorientation/psychorientation/eleve.cs | 2 +- 6 files changed, 19 insertions(+), 32 deletions(-) diff --git a/psychorientation/psychorientation/InterfaceClasse.Designer.cs b/psychorientation/psychorientation/InterfaceClasse.Designer.cs index 83fd150..d5b55d4 100644 --- a/psychorientation/psychorientation/InterfaceClasse.Designer.cs +++ b/psychorientation/psychorientation/InterfaceClasse.Designer.cs @@ -133,7 +133,7 @@ // pnlListeEleve // this.pnlListeEleve.AutoScroll = true; - this.pnlListeEleve.BackColor = System.Drawing.Color.Transparent; + this.pnlListeEleve.BackColor = System.Drawing.SystemColors.Control; this.pnlListeEleve.Controls.Add(this.lblListeEleve); this.pnlListeEleve.Location = new System.Drawing.Point(0, -1); this.pnlListeEleve.Name = "pnlListeEleve"; diff --git a/psychorientation/psychorientation/InterfaceClasse.resx b/psychorientation/psychorientation/InterfaceClasse.resx index d3c83b8..6febe6b 100644 --- a/psychorientation/psychorientation/InterfaceClasse.resx +++ b/psychorientation/psychorientation/InterfaceClasse.resx @@ -125,7 +125,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACM - mgEAAk1TRnQBSQFMAgEBBgEAARABAAEQAQAByAEAAcgBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + mgEAAk1TRnQBSQFMAgEBBgEAARgBAAEYAQAByAEAAcgBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABIAEDAgABkAEBAgABAQEAAQgGAAHiAQQXAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEA AcAB3AHAAQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEA A0IBAAM5AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIA diff --git a/psychorientation/psychorientation/InterfaceInfoCompletEleve.cs b/psychorientation/psychorientation/InterfaceInfoCompletEleve.cs index cc4baa2..169d9b1 100755 --- a/psychorientation/psychorientation/InterfaceInfoCompletEleve.cs +++ b/psychorientation/psychorientation/InterfaceInfoCompletEleve.cs @@ -49,7 +49,7 @@ namespace psychorientation } else { - lblMoyenneNote.Text = Math.Round(eleve.GetMoyenne(),1).ToString() + "/20"; + lblMoyenneNote.Text = Math.Round(eleve.GetMoyenne(), 2).ToString() + "/20"; } MajPanel(pnlCompetence, eleve.GetCompetence()); @@ -66,7 +66,7 @@ namespace psychorientation private void InitNote() { int largeurLigne = 25; - List<Note> listNote = this.eleve.GetlisteNotes(); + 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)); @@ -88,9 +88,9 @@ namespace psychorientation tlp.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); Note note = listNote[i - 1]; tlp.Controls.Add(CreerLabel(note.GetNom()), 0, i); - tlp.Controls.Add(CreerLabel( Math.Round(note.GetNote(),1).ToString()), 1, i); - tlp.Controls.Add(CreerLabel(Math.Round(note.GetCompetence(),1).ToString()), 2, i); - tlp.Controls.Add(CreerLabel(Math.Round(note.GetEffort(),1).ToString()), 3, i); + tlp.Controls.Add(CreerLabel( Math.Round(note.GetNote(), 2).ToString()), 1, i); + tlp.Controls.Add(CreerLabel(Math.Round(note.GetCompetence(), 2).ToString()), 2, i); + tlp.Controls.Add(CreerLabel(Math.Round(note.GetEffort(), 2).ToString()), 3, i); } tlp.Size = new System.Drawing.Size(413, largeurLigne* tlp.RowCount); diff --git a/psychorientation/psychorientation/InterfaceInfoEleve.Designer.cs b/psychorientation/psychorientation/InterfaceInfoEleve.Designer.cs index f2239b2..9562cb8 100644 --- a/psychorientation/psychorientation/InterfaceInfoEleve.Designer.cs +++ b/psychorientation/psychorientation/InterfaceInfoEleve.Designer.cs @@ -69,7 +69,7 @@ // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(3, 108); + this.label2.Location = new System.Drawing.Point(3, 104); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(41, 13); this.label2.TabIndex = 2; @@ -79,7 +79,7 @@ // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(3, 155); + this.label3.Location = new System.Drawing.Point(3, 159); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(76, 13); this.label3.TabIndex = 3; @@ -137,7 +137,7 @@ // lblEffort // this.lblEffort.AutoSize = true; - this.lblEffort.Location = new System.Drawing.Point(49, 109); + this.lblEffort.Location = new System.Drawing.Point(53, 104); this.lblEffort.Name = "lblEffort"; this.lblEffort.Size = new System.Drawing.Size(0, 13); this.lblEffort.TabIndex = 7; @@ -145,7 +145,7 @@ // lblCompetence // this.lblCompetence.AutoSize = true; - this.lblCompetence.Location = new System.Drawing.Point(85, 154); + this.lblCompetence.Location = new System.Drawing.Point(79, 159); this.lblCompetence.Name = "lblCompetence"; this.lblCompetence.Size = new System.Drawing.Size(0, 13); this.lblCompetence.TabIndex = 8; @@ -155,15 +155,15 @@ this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(3, 189); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(104, 13); + this.label4.Size = new System.Drawing.Size(80, 13); this.label4.TabIndex = 9; - this.label4.Text = "Moyenne générale : "; + this.label4.Text = "Dernière note : "; this.label4.Click += new System.EventHandler(this.InterfaceInfoEleve_Click); // // lblMoyenne // this.lblMoyenne.AutoSize = true; - this.lblMoyenne.Location = new System.Drawing.Point(107, 189); + this.lblMoyenne.Location = new System.Drawing.Point(89, 189); this.lblMoyenne.Name = "lblMoyenne"; this.lblMoyenne.Size = new System.Drawing.Size(35, 13); this.lblMoyenne.TabIndex = 10; @@ -188,7 +188,6 @@ this.Controls.Add(this.lblEleve); this.Name = "InterfaceInfoEleve"; this.Size = new System.Drawing.Size(216, 216); - this.Load += new System.EventHandler(this.InterfaceInfoEleve_Load); this.Click += new System.EventHandler(this.InterfaceInfoEleve_Click); this.panel1.ResumeLayout(false); this.panel2.ResumeLayout(false); diff --git a/psychorientation/psychorientation/InterfaceInfoEleve.cs b/psychorientation/psychorientation/InterfaceInfoEleve.cs index 4c774c4..5bbc6f0 100644 --- a/psychorientation/psychorientation/InterfaceInfoEleve.cs +++ b/psychorientation/psychorientation/InterfaceInfoEleve.cs @@ -18,11 +18,6 @@ namespace psychorientation InitializeComponent(); } - private void InterfaceInfoEleve_Load(object sender, EventArgs e) - { - - } - public void setParam(Eleve el) { this.eleve = el; @@ -34,17 +29,10 @@ namespace psychorientation Libelle lib = new Libelle(); lblEleve.Text = "Eleve n°" + eleve.GetId(); lblClasse.Text = lib.Niveau(eleve.GetClasse()); - lblEffort.Text = Math.Round(eleve.GetEffort(),1).ToString() ; - lblCompetence.Text = Math.Round(eleve.GetCompetence(),1).ToString(); - double moyenne = eleve.GetMoyenne(); - if (moyenne == -1) - { - lblMoyenne.Text="Pas encore d'évaluation"; - } - else - { - lblMoyenne.Text = Math.Round(eleve.GetMoyenne(),1).ToString()+"/20"; - } + lblEffort.Text = Math.Round(eleve.GetEffort(), 2).ToString() ; + lblCompetence.Text = Math.Round(eleve.GetCompetence(), 2).ToString(); + + lblMoyenne.Text = Math.Round(eleve.GetListeNotes().Last().GetNote(), 2).ToString()+"/20"; MajPanel(pnlCompetence,eleve.GetCompetence()); MajPanel(pnlEffort, eleve.GetEffort()); diff --git a/psychorientation/psychorientation/eleve.cs b/psychorientation/psychorientation/eleve.cs index a2d382c..18fe996 100644 --- a/psychorientation/psychorientation/eleve.cs +++ b/psychorientation/psychorientation/eleve.cs @@ -62,7 +62,7 @@ namespace psychorientation { return this.competence; } - public List<Note> GetlisteNotes() + public List<Note> GetListeNotes() { return this.listeNotes; } -- GitLab