diff --git a/psychorientation/images/patern/paternFeuille.png b/psychorientation/images/patern/paternFeuille.png new file mode 100644 index 0000000000000000000000000000000000000000..002a14f0605484bd19172bb321b707b2bc00f56c Binary files /dev/null and b/psychorientation/images/patern/paternFeuille.png differ diff --git a/psychorientation/psychorientation/InterfaceClasse.Designer.cs b/psychorientation/psychorientation/InterfaceClasse.Designer.cs index 2676c3b985ff0097af5dd04d86fff13d74a50503..954308696ad106a15b9a79667acab627e8f450e0 100644 --- a/psychorientation/psychorientation/InterfaceClasse.Designer.cs +++ b/psychorientation/psychorientation/InterfaceClasse.Designer.cs @@ -29,16 +29,18 @@ private void InitializeComponent() { this.pb_action_suivante = new System.Windows.Forms.PictureBox(); - this.pb_liste_eleves = new System.Windows.Forms.PictureBox(); this.lblDate = new System.Windows.Forms.Label(); this.pb_sortir = new System.Windows.Forms.PictureBox(); this.lblClasse = new System.Windows.Forms.Label(); this.lblMoyenne = new System.Windows.Forms.Label(); this.lblCompetence = new System.Windows.Forms.Label(); this.lblEffort = new System.Windows.Forms.Label(); + this.pnlListeEleve = new System.Windows.Forms.Panel(); + this.lblListeEleve = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.pb_action_suivante)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pb_liste_eleves)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pb_sortir)).BeginInit(); + this.pnlListeEleve.SuspendLayout(); this.SuspendLayout(); // // pb_action_suivante @@ -54,18 +56,6 @@ this.pb_action_suivante.TabStop = false; this.pb_action_suivante.Click += new System.EventHandler(this.Pb_action_suivante_Click); // - // pb_liste_eleves - // - this.pb_liste_eleves.BackColor = System.Drawing.Color.Transparent; - this.pb_liste_eleves.BackgroundImage = global::psychorientation.Properties.Resources.grp; - this.pb_liste_eleves.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.pb_liste_eleves.Location = new System.Drawing.Point(12, 12); - this.pb_liste_eleves.Name = "pb_liste_eleves"; - this.pb_liste_eleves.Size = new System.Drawing.Size(100, 100); - this.pb_liste_eleves.TabIndex = 1; - this.pb_liste_eleves.TabStop = false; - this.pb_liste_eleves.Click += new System.EventHandler(this.Pb_liste_eleves_Click); - // // lblDate // this.lblDate.AutoSize = true; @@ -102,6 +92,7 @@ this.lblClasse.TabIndex = 4; this.lblClasse.Text = "Chargement..."; // + // lblMoyenne // this.lblMoyenne.AutoSize = true; @@ -137,6 +128,26 @@ this.lblEffort.Size = new System.Drawing.Size(101, 18); this.lblEffort.TabIndex = 7; this.lblEffort.Text = "Chargement..."; + + // pnlListeEleve + // + this.pnlListeEleve.AutoScroll = true; + this.pnlListeEleve.BackColor = System.Drawing.Color.White; + this.pnlListeEleve.Controls.Add(this.lblListeEleve); + this.pnlListeEleve.Location = new System.Drawing.Point(0, -1); + this.pnlListeEleve.Name = "pnlListeEleve"; + this.pnlListeEleve.Size = new System.Drawing.Size(241, 783); + this.pnlListeEleve.TabIndex = 5; + // + // lblListeEleve + // + this.lblListeEleve.AutoSize = true; + this.lblListeEleve.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblListeEleve.Location = new System.Drawing.Point(3, 0); + this.lblListeEleve.Name = "lblListeEleve"; + this.lblListeEleve.Size = new System.Drawing.Size(217, 29); + this.lblListeEleve.TabIndex = 0; + this.lblListeEleve.Text = "Liste des élèves :"; // // InterfaceClasse // @@ -146,13 +157,16 @@ this.BackgroundImage = global::psychorientation.Properties.Resources.salleV11; this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.ClientSize = new System.Drawing.Size(1357, 783); + this.Controls.Add(this.lblEffort); this.Controls.Add(this.lblCompetence); this.Controls.Add(this.lblMoyenne); + + this.Controls.Add(this.pnlListeEleve); + this.Controls.Add(this.lblClasse); this.Controls.Add(this.pb_sortir); this.Controls.Add(this.lblDate); - this.Controls.Add(this.pb_liste_eleves); this.Controls.Add(this.pb_action_suivante); this.DoubleBuffered = true; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; @@ -163,8 +177,9 @@ this.Load += new System.EventHandler(this.Form1_Load); this.SizeChanged += new System.EventHandler(this.InterfaceClasse_SizeChanged); ((System.ComponentModel.ISupportInitialize)(this.pb_action_suivante)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pb_liste_eleves)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pb_sortir)).EndInit(); + this.pnlListeEleve.ResumeLayout(false); + this.pnlListeEleve.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -173,13 +188,17 @@ #endregion private System.Windows.Forms.PictureBox pb_action_suivante; - private System.Windows.Forms.PictureBox pb_liste_eleves; private System.Windows.Forms.Label lblDate; private System.Windows.Forms.PictureBox pb_sortir; private System.Windows.Forms.Label lblClasse; + private System.Windows.Forms.Label lblMoyenne; private System.Windows.Forms.Label lblCompetence; private System.Windows.Forms.Label lblEffort; + + private System.Windows.Forms.Panel pnlListeEleve; + private System.Windows.Forms.Label lblListeEleve; + } } diff --git a/psychorientation/psychorientation/InterfaceClasse.cs b/psychorientation/psychorientation/InterfaceClasse.cs index ddda314271d37ffc5f85178496656c28792b2e14..5adeda927eb0691f518c15251d4222a487c02556 100644 --- a/psychorientation/psychorientation/InterfaceClasse.cs +++ b/psychorientation/psychorientation/InterfaceClasse.cs @@ -29,13 +29,23 @@ namespace psychorientation gestEleve.AjouterEleve(new Eleve(i)); } gestEleve.AjouterEleve(new Eleve(3,0,10.0,10.0,0)); - lblDate.Text = libelle.Mois(moisActuel % 12); lblClasse.Text=libelle.Niveau(anneeActuelle); lblEffort.Text = "Effort de la classe : " + Math.Round(gestEleve.GetEffortClasse(),1).ToString(); lblCompetence.Text = "Competence de la classe : " + Math.Round(gestEleve.GetCompetenceClasse(),1).ToString(); lblMoyenne.Text = "Moyenne de la classe : " + Math.Round(gestEleve.GetMoyenneClasse(),1).ToString(); + Libelle lib = new Libelle(); + int y = 20; + foreach (Eleve eleve in gestEleve.GetListeEleves()) + { + InterfaceInfoEleve ii = new InterfaceInfoEleve(); + ii.setParam(eleve); + ii.Location = new Point(0, y); + pnlListeEleve.Controls.Add(ii); + y += 220; + } + Message mAccueil = new Message("Bonjour apprenti prof, vous allez apprendre à éduquer des joueurs !! ", "Début", TypeMessage.INFORMATION); mAccueil.ShowDialog(); @@ -61,7 +71,7 @@ namespace psychorientation lblEffort.Text = "Effort de la classe : " + Math.Round(gestEleve.GetEffortClasse(), 1).ToString(); lblCompetence.Text = "Competence de la classe : " + Math.Round(gestEleve.GetCompetenceClasse(), 1).ToString(); lblMoyenne.Text = "Moyenne de la classe : " + Math.Round(gestEleve.GetMoyenneClasse(), 1).ToString(); - + ActualiserEleveCoter(); // Passe au mois suivant. moisActuel++; @@ -103,6 +113,19 @@ namespace psychorientation le.Show(); } + private void ActualiserEleveCoter() + { + foreach(Control c in pnlListeEleve.Controls) + { + if (c is InterfaceInfoEleve) + { + InterfaceInfoEleve iie = (InterfaceInfoEleve)c; + iie.actualiser(); + } + + } + } + private void InterfaceClasse_SizeChanged(object sender, EventArgs e) { PictureBox pb1 = pb_action_suivante; diff --git a/psychorientation/psychorientation/InterfaceInfoEleve.Designer.cs b/psychorientation/psychorientation/InterfaceInfoEleve.Designer.cs index 53e1c83020872f521f85242bec691a1817df9a39..41e6cda668dff235309f84497353bc69c7c6f1cd 100644 --- a/psychorientation/psychorientation/InterfaceInfoEleve.Designer.cs +++ b/psychorientation/psychorientation/InterfaceInfoEleve.Designer.cs @@ -49,7 +49,7 @@ // this.lblEleve.AutoSize = true; this.lblEleve.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblEleve.Location = new System.Drawing.Point(77, 16); + this.lblEleve.Location = new System.Drawing.Point(12, 13); this.lblEleve.Name = "lblEleve"; this.lblEleve.Size = new System.Drawing.Size(99, 33); this.lblEleve.TabIndex = 0; @@ -59,7 +59,7 @@ // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(41, 71); + this.label1.Location = new System.Drawing.Point(3, 71); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(50, 13); this.label1.TabIndex = 1; @@ -69,7 +69,8 @@ // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(34, 105); + + this.label2.Location = new System.Drawing.Point(3, 108); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(41, 13); this.label2.TabIndex = 2; @@ -79,7 +80,9 @@ // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(4, 150); + + this.label3.Location = new System.Drawing.Point(3, 150); + this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(76, 13); this.label3.TabIndex = 3; @@ -89,7 +92,7 @@ // lblClasse // this.lblClasse.AutoSize = true; - this.lblClasse.Location = new System.Drawing.Point(97, 71); + this.lblClasse.Location = new System.Drawing.Point(59, 71); this.lblClasse.Name = "lblClasse"; this.lblClasse.Size = new System.Drawing.Size(35, 13); this.lblClasse.TabIndex = 4; @@ -100,7 +103,7 @@ // this.panel1.BackColor = System.Drawing.Color.Silver; this.panel1.Controls.Add(this.pnlEffort); - this.panel1.Location = new System.Drawing.Point(97, 100); + this.panel1.Location = new System.Drawing.Point(83, 95); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(139, 26); this.panel1.TabIndex = 5; @@ -119,7 +122,7 @@ // this.panel2.BackColor = System.Drawing.Color.Silver; this.panel2.Controls.Add(this.pnlCompetence); - this.panel2.Location = new System.Drawing.Point(97, 146); + this.panel2.Location = new System.Drawing.Point(83, 150); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(139, 26); this.panel2.TabIndex = 6; @@ -153,7 +156,7 @@ // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(12, 189); + this.label4.Location = new System.Drawing.Point(3, 189); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(98, 13); this.label4.TabIndex = 9; @@ -163,7 +166,7 @@ // lblMoyenne // this.lblMoyenne.AutoSize = true; - this.lblMoyenne.Location = new System.Drawing.Point(113, 189); + this.lblMoyenne.Location = new System.Drawing.Point(96, 189); this.lblMoyenne.Name = "lblMoyenne"; this.lblMoyenne.Size = new System.Drawing.Size(35, 13); this.lblMoyenne.TabIndex = 10; @@ -186,7 +189,9 @@ this.Controls.Add(this.label1); this.Controls.Add(this.lblEleve); this.Name = "InterfaceInfoEleve"; - this.Size = new System.Drawing.Size(253, 226); + + this.Size = new System.Drawing.Size(223, 216); + this.Load += new System.EventHandler(this.InterfaceInfoEleve_Load); this.Click += new System.EventHandler(this.InterfaceInfoEleve_Click); this.panel1.ResumeLayout(false); diff --git a/psychorientation/psychorientation/InterfaceInfoEleve.cs b/psychorientation/psychorientation/InterfaceInfoEleve.cs index 518776dc8accd2f517e98f7adb6404204d762200..9e1a28478a6352014e0170b424e0f0824bbaae47 100644 --- a/psychorientation/psychorientation/InterfaceInfoEleve.cs +++ b/psychorientation/psychorientation/InterfaceInfoEleve.cs @@ -29,7 +29,7 @@ namespace psychorientation actualiser(); } - private void actualiser() + public void actualiser() { Libelle lib = new Libelle(); lblEleve.Text = "Eleve n°" + eleve.GetId();