Skip to content
Snippets Groups Projects
Commit 6aa004da authored by Loïc Gross's avatar Loïc Gross
Browse files

InterfaceInfoCompletEleve ajout tableau des notes

parent e7c580fb
Branches
1 merge request!16InterfaceInfoCompletEleve ajout tableau des notes
......@@ -41,11 +41,9 @@
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
......@@ -163,25 +161,12 @@
//
// pnlNote
//
this.pnlNote.Controls.Add(this.tableLayoutPanel1);
this.pnlNote.Location = new System.Drawing.Point(98, 243);
this.pnlNote.AutoScroll = true;
this.pnlNote.Location = new System.Drawing.Point(85, 243);
this.pnlNote.Name = "pnlNote";
this.pnlNote.Size = new System.Drawing.Size(391, 134);
this.pnlNote.Size = new System.Drawing.Size(448, 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);
......@@ -204,7 +189,6 @@
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pcbEleve)).EndInit();
this.pnlNote.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
......@@ -225,6 +209,5 @@
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
......@@ -65,6 +65,7 @@ namespace psychorientation
private void InitNote()
{
int largeurLigne = 25;
List<Note> listNote = this.eleve.GetlisteNotes();
TableLayoutPanel tlp = new TableLayoutPanel();
tlp.ColumnCount = 4;
......@@ -73,23 +74,35 @@ namespace psychorientation
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++)
// Initialise la première ligne d'en-tête
tlp.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
tlp.Controls.Add(CreerLabel("Nom :"), 0, 0);
tlp.Controls.Add(CreerLabel("Note :"), 1, 0);
tlp.Controls.Add(CreerLabel("Compétence :"), 2, 0);
tlp.Controls.Add(CreerLabel("Effort :"), 3, 0);
// Rajoute les lignes supplémentaires
for (int i=1; i<tlp.RowCount; i++)
{
tlp.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
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(note.GetNote().ToString()), 1, i);
tlp.Controls.Add(CreerLabel(note.GetCompetence().ToString()), 2, i);
tlp.Controls.Add(CreerLabel(note.GetEffort().ToString()), 3, i);
}
tlp.Size = new System.Drawing.Size(413, largeurLigne* tlp.RowCount);
tlp.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single;
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;*/
private Label CreerLabel(string contenu)
{
Label lbl = new Label();
lbl.Text = contenu;
return lbl;
}
......
......@@ -24,13 +24,13 @@ namespace psychorientation
Libelle lib = new Libelle();
// TEST
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);
//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;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment