diff --git a/psychorientation/psychorientation/Form1.cs b/psychorientation/psychorientation/Form1.cs index b32de509b81278728591f66c53f85294b5417419..baf4f85c4c2c2695ec38bb3efdcda6588afc5536 100644 --- a/psychorientation/psychorientation/Form1.cs +++ b/psychorientation/psychorientation/Form1.cs @@ -43,16 +43,21 @@ namespace psychorientation private void Form1_Load(object sender, EventArgs e) { InitialiserTableau(); - Message m = new Message(-1,"Bonjour apprenti prof, vous allez apprendre à éduquer des joueurs !! ","Début"); + CreerEleve(nombreEleve); + + TypeMessage tm = TypeMessage.INFORMATION; + Message m = new Message(-1,"Bonjour apprenti prof, vous allez apprendre à éduquer des joueurs !! ","Début",tm); m.ShowDialog(); - CreerEleve(nombreEleve); + InterfaceInfoEleve ii = new InterfaceInfoEleve(); ii.setParam(listEleve[0],listClasse); ii.Left = 0; ii.Top = 0; ii.BorderStyle = BorderStyle.Fixed3D; this.Controls.Add(ii); + + } } } diff --git a/psychorientation/psychorientation/InterfaceInfoEleve.Designer.cs b/psychorientation/psychorientation/InterfaceInfoEleve.Designer.cs index ce15611b0c5e2098e450c0a0ea0f518ab62ff3ba..88dad84d9b538c49c6988e37e5179dbdce204007 100644 --- a/psychorientation/psychorientation/InterfaceInfoEleve.Designer.cs +++ b/psychorientation/psychorientation/InterfaceInfoEleve.Designer.cs @@ -34,9 +34,11 @@ this.label3 = new System.Windows.Forms.Label(); this.lblClasse = new System.Windows.Forms.Label(); this.panel1 = new System.Windows.Forms.Panel(); - this.panel2 = new System.Windows.Forms.Panel(); this.pnlEffort = new System.Windows.Forms.Panel(); + this.panel2 = new System.Windows.Forms.Panel(); this.pnlCompetence = new System.Windows.Forms.Panel(); + this.lblEffort = new System.Windows.Forms.Label(); + this.lblCompetence = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); this.SuspendLayout(); @@ -96,6 +98,14 @@ this.panel1.Size = new System.Drawing.Size(139, 26); this.panel1.TabIndex = 5; // + // pnlEffort + // + this.pnlEffort.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); + this.pnlEffort.Location = new System.Drawing.Point(3, 4); + this.pnlEffort.Name = "pnlEffort"; + this.pnlEffort.Size = new System.Drawing.Size(133, 18); + this.pnlEffort.TabIndex = 6; + // // panel2 // this.panel2.BackColor = System.Drawing.Color.Silver; @@ -105,14 +115,6 @@ this.panel2.Size = new System.Drawing.Size(139, 26); this.panel2.TabIndex = 6; // - // pnlEffort - // - this.pnlEffort.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); - this.pnlEffort.Location = new System.Drawing.Point(3, 4); - this.pnlEffort.Name = "pnlEffort"; - this.pnlEffort.Size = new System.Drawing.Size(133, 18); - this.pnlEffort.TabIndex = 6; - // // pnlCompetence // this.pnlCompetence.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); @@ -120,11 +122,30 @@ this.pnlCompetence.Name = "pnlCompetence"; this.pnlCompetence.Size = new System.Drawing.Size(125, 18); this.pnlCompetence.TabIndex = 7; + // + // lblEffort + // + this.lblEffort.AutoSize = true; + this.lblEffort.Location = new System.Drawing.Point(255, 144); + this.lblEffort.Name = "lblEffort"; + this.lblEffort.Size = new System.Drawing.Size(0, 13); + this.lblEffort.TabIndex = 7; + // + // lblCompetence + // + this.lblCompetence.AutoSize = true; + this.lblCompetence.Location = new System.Drawing.Point(254, 189); + this.lblCompetence.Name = "lblCompetence"; + this.lblCompetence.Size = new System.Drawing.Size(0, 13); + this.lblCompetence.TabIndex = 8; + // // InterfaceInfoEleve // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.lblCompetence); + this.Controls.Add(this.lblEffort); this.Controls.Add(this.panel2); this.Controls.Add(this.panel1); this.Controls.Add(this.lblClasse); @@ -153,5 +174,7 @@ private System.Windows.Forms.Panel pnlEffort; private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel pnlCompetence; + private System.Windows.Forms.Label lblEffort; + private System.Windows.Forms.Label lblCompetence; } } diff --git a/psychorientation/psychorientation/InterfaceInfoEleve.cs b/psychorientation/psychorientation/InterfaceInfoEleve.cs index 8fb3e723eaf2244385e089684662703a9ad261a7..264b5c9871a8e7c0e0dae69214643b57f335c159 100644 --- a/psychorientation/psychorientation/InterfaceInfoEleve.cs +++ b/psychorientation/psychorientation/InterfaceInfoEleve.cs @@ -35,6 +35,8 @@ namespace psychorientation { lblEleve.Text = "Eleve n°"+eleve.getId(); lblClasse.Text = listClasse[eleve.getClasse()]; + lblEffort.Text = eleve.getEffort().ToString(); + lblCompetence.Text = eleve.getCompetence().ToString(); MajPanel(pnlCompetence,eleve.getCompetence()); MajPanel(pnlEffort, eleve.getEffort()); } diff --git a/psychorientation/psychorientation/Message.cs b/psychorientation/psychorientation/Message.cs index 8fb84cb0105a385cad5c34218cc1448f1f969945..7efdfc2c32fed3c9edc03d99dc2b4ca3f8bf6fe7 100644 --- a/psychorientation/psychorientation/Message.cs +++ b/psychorientation/psychorientation/Message.cs @@ -10,12 +10,18 @@ using System.Windows.Forms; namespace psychorientation { + + public enum TypeMessage + { + INFORMATION + } + public partial class Message : Form { int affichage = -1; string message = ""; string titre = ""; - + TypeMessage typeMessage; bool reponseBool = false; string reponseString = ""; @@ -23,9 +29,10 @@ namespace psychorientation double reponseDouble = 0; - public Message(int affichageChoisi,string messageAffiche,string titreAffiche) + public Message(int affichageChoisi,string messageAffiche,string titreAffiche,TypeMessage typeMessage) { InitializeComponent(); + this.typeMessage = typeMessage; affichage = affichageChoisi; message = messageAffiche; titre = titreAffiche; @@ -56,11 +63,12 @@ namespace psychorientation { lblMessage.Text = message; lblTitre.Text = titre; - switch (affichage) + switch (typeMessage) { - case 1: //affichage + case TypeMessage.INFORMATION:; break; } + } private void button1_Click(object sender, EventArgs e)