Skip to content
Snippets Groups Projects
Commit 6069f112 authored by TRITSCHBERGER ANTOINE's avatar TRITSCHBERGER ANTOINE
Browse files

Merge branch 'master' into 'master'

Ajout d'une enum pour le type d'affichage

See merge request !5
parents ad1f0bc2 acd007d8
Branches
1 merge request!5Ajout d'une enum pour le type d'affichage
...@@ -43,16 +43,21 @@ namespace psychorientation ...@@ -43,16 +43,21 @@ namespace psychorientation
private void Form1_Load(object sender, EventArgs e) private void Form1_Load(object sender, EventArgs e)
{ {
InitialiserTableau(); 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(); m.ShowDialog();
CreerEleve(nombreEleve);
InterfaceInfoEleve ii = new InterfaceInfoEleve(); InterfaceInfoEleve ii = new InterfaceInfoEleve();
ii.setParam(listEleve[0],listClasse); ii.setParam(listEleve[0],listClasse);
ii.Left = 0; ii.Left = 0;
ii.Top = 0; ii.Top = 0;
ii.BorderStyle = BorderStyle.Fixed3D; ii.BorderStyle = BorderStyle.Fixed3D;
this.Controls.Add(ii); this.Controls.Add(ii);
} }
} }
} }
...@@ -34,9 +34,11 @@ ...@@ -34,9 +34,11 @@
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.lblClasse = new System.Windows.Forms.Label(); this.lblClasse = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.pnlEffort = 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.pnlCompetence = new System.Windows.Forms.Panel();
this.lblEffort = new System.Windows.Forms.Label();
this.lblCompetence = new System.Windows.Forms.Label();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
...@@ -96,6 +98,14 @@ ...@@ -96,6 +98,14 @@
this.panel1.Size = new System.Drawing.Size(139, 26); this.panel1.Size = new System.Drawing.Size(139, 26);
this.panel1.TabIndex = 5; 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 // panel2
// //
this.panel2.BackColor = System.Drawing.Color.Silver; this.panel2.BackColor = System.Drawing.Color.Silver;
...@@ -105,14 +115,6 @@ ...@@ -105,14 +115,6 @@
this.panel2.Size = new System.Drawing.Size(139, 26); this.panel2.Size = new System.Drawing.Size(139, 26);
this.panel2.TabIndex = 6; 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 // pnlCompetence
// //
this.pnlCompetence.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); this.pnlCompetence.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
...@@ -120,11 +122,30 @@ ...@@ -120,11 +122,30 @@
this.pnlCompetence.Name = "pnlCompetence"; this.pnlCompetence.Name = "pnlCompetence";
this.pnlCompetence.Size = new System.Drawing.Size(125, 18); this.pnlCompetence.Size = new System.Drawing.Size(125, 18);
this.pnlCompetence.TabIndex = 7; 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 // InterfaceInfoEleve
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 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.panel2);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
this.Controls.Add(this.lblClasse); this.Controls.Add(this.lblClasse);
...@@ -153,5 +174,7 @@ ...@@ -153,5 +174,7 @@
private System.Windows.Forms.Panel pnlEffort; private System.Windows.Forms.Panel pnlEffort;
private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Panel pnlCompetence; private System.Windows.Forms.Panel pnlCompetence;
private System.Windows.Forms.Label lblEffort;
private System.Windows.Forms.Label lblCompetence;
} }
} }
...@@ -35,6 +35,8 @@ namespace psychorientation ...@@ -35,6 +35,8 @@ namespace psychorientation
{ {
lblEleve.Text = "Eleve n°"+eleve.getId(); lblEleve.Text = "Eleve n°"+eleve.getId();
lblClasse.Text = listClasse[eleve.getClasse()]; lblClasse.Text = listClasse[eleve.getClasse()];
lblEffort.Text = eleve.getEffort().ToString();
lblCompetence.Text = eleve.getCompetence().ToString();
MajPanel(pnlCompetence,eleve.getCompetence()); MajPanel(pnlCompetence,eleve.getCompetence());
MajPanel(pnlEffort, eleve.getEffort()); MajPanel(pnlEffort, eleve.getEffort());
} }
......
...@@ -10,12 +10,18 @@ using System.Windows.Forms; ...@@ -10,12 +10,18 @@ using System.Windows.Forms;
namespace psychorientation namespace psychorientation
{ {
public enum TypeMessage
{
INFORMATION
}
public partial class Message : Form public partial class Message : Form
{ {
int affichage = -1; int affichage = -1;
string message = ""; string message = "";
string titre = ""; string titre = "";
TypeMessage typeMessage;
bool reponseBool = false; bool reponseBool = false;
string reponseString = ""; string reponseString = "";
...@@ -23,9 +29,10 @@ namespace psychorientation ...@@ -23,9 +29,10 @@ namespace psychorientation
double reponseDouble = 0; double reponseDouble = 0;
public Message(int affichageChoisi,string messageAffiche,string titreAffiche) public Message(int affichageChoisi,string messageAffiche,string titreAffiche,TypeMessage typeMessage)
{ {
InitializeComponent(); InitializeComponent();
this.typeMessage = typeMessage;
affichage = affichageChoisi; affichage = affichageChoisi;
message = messageAffiche; message = messageAffiche;
titre = titreAffiche; titre = titreAffiche;
...@@ -56,11 +63,12 @@ namespace psychorientation ...@@ -56,11 +63,12 @@ namespace psychorientation
{ {
lblMessage.Text = message; lblMessage.Text = message;
lblTitre.Text = titre; lblTitre.Text = titre;
switch (affichage) switch (typeMessage)
{ {
case 1: //affichage case TypeMessage.INFORMATION:;
break; break;
} }
} }
private void button1_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e)
......
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