Skip to content
Snippets Groups Projects
Commit c6372ab3 authored by SATTLER EMMA's avatar SATTLER EMMA
Browse files

Mise en forme du FormFin

parent 066c8451
Branches
Tags
No related merge requests found
......@@ -31,29 +31,81 @@ namespace Wanderer.view
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormFin));
this.label1 = new System.Windows.Forms.Label();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.lblWinner = new System.Windows.Forms.Label();
this.lblLooser = new System.Windows.Forms.Label();
this.flowLayoutPanel1.SuspendLayout();
this.flowLayoutPanel2.SuspendLayout();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(306, 100);
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(129, 42);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(32, 13);
this.label1.Size = new System.Drawing.Size(363, 46);
this.label1.TabIndex = 0;
this.label1.Text = "Win !";
this.label1.Text = "Le joueur a gagné !";
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Controls.Add(this.lblWinner);
this.flowLayoutPanel1.Location = new System.Drawing.Point(65, 126);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(236, 293);
this.flowLayoutPanel1.TabIndex = 1;
//
// flowLayoutPanel2
//
this.flowLayoutPanel2.Controls.Add(this.lblLooser);
this.flowLayoutPanel2.Location = new System.Drawing.Point(383, 126);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
this.flowLayoutPanel2.Size = new System.Drawing.Size(235, 293);
this.flowLayoutPanel2.TabIndex = 2;
//
// lblWinner
//
this.lblWinner.AutoSize = true;
this.lblWinner.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblWinner.Location = new System.Drawing.Point(3, 0);
this.lblWinner.Name = "lblWinner";
this.lblWinner.Size = new System.Drawing.Size(64, 25);
this.lblWinner.TabIndex = 0;
this.lblWinner.Text = "label2";
//
// lblLooser
//
this.lblLooser.AutoSize = true;
this.lblLooser.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblLooser.Location = new System.Drawing.Point(3, 0);
this.lblLooser.Name = "lblLooser";
this.lblLooser.Size = new System.Drawing.Size(64, 25);
this.lblLooser.TabIndex = 0;
this.lblLooser.Text = "label3";
//
// FormFin
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.ClientSize = new System.Drawing.Size(675, 457);
this.Controls.Add(this.flowLayoutPanel2);
this.Controls.Add(this.flowLayoutPanel1);
this.Controls.Add(this.label1);
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Name = "FormFin";
this.Text = "Fin";
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
this.flowLayoutPanel2.ResumeLayout(false);
this.flowLayoutPanel2.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
......@@ -62,5 +114,9 @@ namespace Wanderer.view
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Label lblWinner;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private System.Windows.Forms.Label lblLooser;
}
}
\ No newline at end of file
......@@ -7,7 +7,9 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Wanderer.controller;
using Wanderer.model;
using Wanderer.view.Controls;
namespace Wanderer.view
{
......@@ -16,12 +18,34 @@ namespace Wanderer.view
public FormFin(Player currentPlayer)
{
InitializeComponent();
label1.Text = currentPlayer.Color + " a gagné !";
if (currentPlayer.Color == Color.Brown)
{
label1.Text = "Le joueur Rouge a gagné !";
}
else
{
label1.Text = "Le joueur Bleu a gagné !";
}
afficheResultat(currentPlayer);
}
private void label1_Click(object sender, EventArgs e)
{
}
private void afficheResultat(Player p)
{
lblWinner.Text = "Marcheurs : " + p.randonneurs +
"\n\nMarks : " + p.marks;
flowLayoutPanel1.BackColor = p.Color;
Game.Instance.currentPlayerIndex = (Game.Instance.currentPlayerIndex + 1) % Game.Instance.Players.Count;
Player p2= Game.Instance.Players[Game.Instance.currentPlayerIndex];
lblLooser.Text = "Marcheurs : " + p2.randonneurs +
"\n\nMarks : " + p2.marks;
flowLayoutPanel2.BackColor = p2.Color;
}
}
}
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