Skip to content
Snippets Groups Projects
Commit 2b80ed47 authored by Arnaud Feisthauer's avatar Arnaud Feisthauer
Browse files

Correction du bug qui empechait de jouer

parent e1ba57a4
No related merge requests found
......@@ -33,6 +33,9 @@
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.lblGameover = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
......@@ -74,11 +77,41 @@
this.lblGameover.TabIndex = 3;
this.lblGameover.Text = "label1";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(13, 107);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(35, 13);
this.label1.TabIndex = 4;
this.label1.Text = "label1";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(13, 124);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(35, 13);
this.label2.TabIndex = 5;
this.label2.Text = "label2";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(13, 141);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(35, 13);
this.label3.TabIndex = 6;
this.label3.Text = "label3";
//
// FormGameOver
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(704, 441);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.lblGameover);
this.Controls.Add(this.pictureBox2);
this.Controls.Add(this.btnRecommencerPartie);
......@@ -99,5 +132,8 @@
private System.Windows.Forms.Button btnRecommencerPartie;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.Label lblGameover;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
}
}
\ No newline at end of file
......@@ -16,6 +16,12 @@ namespace diabete_simulator_2018
{
InitializeComponent();
RaisonGameOver(raison);
//test
label1.Text = "Poids : " + Jeu.ListePoids[Jeu.ListePoids.Count - 1].ToString();
label2.Text = "Glycémie : " + Jeu.ListeGlycemie[Jeu.ListeGlycemie.Count - 1].ToString();
label3.Text = "Insuline : " + Jeu.ListeInsuline[Jeu.ListeInsuline.Count - 1].ToString();
}
private void btnRecommencerPartie_Click(object sender, EventArgs e)
......
......@@ -60,10 +60,13 @@ namespace diabete_simulator_2018
pnlEvents.Controls.Add(l);
y += 25;
charts.MiseAJourGraphiques(mois, Convert.ToDouble(Jeu.ListePoids[Jeu.ListePoids.Count-1]),
Convert.ToDouble(Jeu.ListeGlycemie[Jeu.ListeGlycemie.Count-1]),
if (charts != null)
{
charts.MiseAJourGraphiques(mois, Convert.ToDouble(Jeu.ListePoids[Jeu.ListePoids.Count - 1]),
Convert.ToDouble(Jeu.ListeGlycemie[Jeu.ListeGlycemie.Count - 1]),
Convert.ToDouble(Jeu.ListeInsuline[Jeu.ListeInsuline.Count - 1]));
}
MessageBox.Show(res, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
......
......@@ -23,6 +23,8 @@ namespace diabete_simulator_2018
Phase = 1;
ValPhase = 0;
Temps = 24;
Hypoglycemie = 0;
Hyperglycemie = 0;
ListeGlycemie = new ArrayList();
ListeGlycemie.Add(GJoueur.GetJoueur().Glycemie);
......
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