private void actualiser() { lblEffort.Text = "Effort : " + Math.Round(eleve.GetEffort(), 1); lblCompetence.Text = "Compétence : " + Math.Round(eleve.GetCompetence(), 1); Libelle lib = new Libelle(); string nom = "Élève n°" + eleve.GetId(); this.Text = nom; lblNomEleve.Text = nom; lblNiveau.Text = lib.Niveau(eleve.GetClasse()); double moyenne = eleve.GetMoyenne(); if (moyenne == -1) { lblMoyenneNote.Text = "Pas encore d'évaluation"; } else { lblMoyenneNote.Text = Math.Round(eleve.GetMoyenne(), 2).ToString() + "/20"; } MajPanel(pnlCompetence, eleve.GetCompetence()); MajPanel(pnlEffort, eleve.GetEffort()); InitNote(); }
public void actualiser() { Libelle lib = new Libelle(); lblEleve.Text = "Élève n°" + eleve.GetId(); lblClasse.Text = lib.Niveau(eleve.GetClasse()); 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()); }
private void GenererBase() { lblDate.Text = libelle.Mois(moisActuel % 12); lblClasse.Text = libelle.Niveau(anneeActuelle); effortInitial = Math.Round(gestEleve.GetEffortClasse(), 1); competenceInitial = Math.Round(gestEleve.GetCompetenceClasse(), 1); moyenneInitiale = Math.Round(gestEleve.GetMoyenneClasse(), 1); lblEffort.Text = "Effort de la classe : " + effortInitial.ToString(); lblCompetence.Text = "Competence de la classe : " + competenceInitial.ToString(); lblMoyenne.Text = "Moyenne de la classe : " + moyenneInitiale.ToString(); Libelle lib = new Libelle(); int y = 40; foreach (Eleve eleve in gestEleve.GetListeEleves()) { InterfaceInfoEleve ii = new InterfaceInfoEleve(); ii.setParam(eleve); ii.Tag = eleve; ii.Location = new Point(6, y); ii.Click += new System.EventHandler(PbOuvrirInfo); foreach (Control c in ii.Controls) { if (c is Panel) { foreach (Control c2 in (c as Panel).Controls) { c2.Click += new System.EventHandler(PbOuvrirInfo); } } c.Click += new System.EventHandler(PbOuvrirInfo); } pnlListeEleve.Controls.Add(ii); y += 220; } TrackBar tbNota = new TrackBar(); tbNota.Location = new System.Drawing.Point(0, lblNotation.Location.Y + lblNotation.Size.Height); tbNota.Size = new System.Drawing.Size(184, 45); tbNota.Maximum = 20; tbNota.BackColor = System.Drawing.Color.Tan; tbNota.Value = 10; tbNota.SmallChange = 1; tbNota.LargeChange = 1; tbNota.TickStyle = TickStyle.TopLeft; tbNota.Scroll += new System.EventHandler(tbNota_Scroll); pnlChoix.Controls.Add(tbNota); lblNotation.Text = notaText; lblValEffort.Tag = "Effort : "; lblValCompetence.Tag = "Compétence : "; lblValEffort.Location = new Point(130, 5 + tbNota.Location.Y + tbNota.Size.Height); lblValCompetence.Location = new Point(1, 5 + tbNota.Location.Y + tbNota.Size.Height); lblValEffort.Text = lblValEffort.Tag + ((tbNota.Value) / 10.0).ToString(); lblValCompetence.Text = lblValCompetence.Tag + ((20 - tbNota.Value) / 10.0).ToString(); lblValCompetence.BackColor = System.Drawing.Color.Transparent; lblValEffort.BackColor = System.Drawing.Color.Transparent; pnlChoix.Controls.Add(lblValEffort); pnlChoix.Controls.Add(lblValCompetence); TrackBar tbCours = new TrackBar(); tbCours.BackColor = System.Drawing.Color.Tan; tbCours.Location = new System.Drawing.Point(0, 10 + lblCours.Location.Y + lblCours.Size.Height); tbCours.Size = new System.Drawing.Size(184, 45); tbCours.Value = 5; tbCours.SmallChange = 1; tbCours.LargeChange = 1; tbCours.Scroll += new System.EventHandler(tbCours_Scroll); pnlChoix.Controls.Add(tbCours); lblCours.Text = coursText + tbCours.Value.ToString(); }