Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Showing
with 177 additions and 99712 deletions
File moved
File moved
......@@ -6,10 +6,11 @@ using Wanderer.model;
namespace Wanderer.view.Controls
{
public partial class MapView : TableLayoutPanel
public class MapView : TableLayoutPanel
{
public static TileView SelectedTile;
private TileView[,] tileViews;
private IContainer components = null;
[Category("Model")]
[Browsable(true)]
......@@ -51,7 +52,20 @@ namespace Wanderer.view.Controls
public MapView()
{
InitializeComponent();
}
protected override void Dispose(bool disposing)
{
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.SuspendLayout();
this.ResumeLayout(false);
}
}
}
\ No newline at end of file
......@@ -33,13 +33,15 @@ namespace Wanderer.view
{
Button b = (Button)sender;
lblTitre.Text = b.Text;
lblTexte.Text = "En Début de partie vous aurez le choix de l'endroit où vous voulez construire votre gare. Celle ci doit etre placée en bord de terrain.\n\n\n" +
lblTexte.Text = "En début de partie vous aurez le choix de l'endroit où vous voulez construire votre gare. Celle ci doit etre placée en bord de terrain.\n\n" +
"Afin d'augmenter le nombre de marcheurs sur votre terrain vous devrez placer :\n" +
" - des usines : pour fabriquer du matériel de randonnée, et donc gagner de l'argent\n" +
" - des chemins : pour augmenter la superficie de votre territoire de randonnée\n" +
" - des refuges : pour attirer plus de marcheur \n\n" +
"Vous aurez également la possibilité de financer des clubs de randonnées et d'améliorer vos chemins ferroviaires afin d'attirer plus de randonneurs.\n\n\n" +
"Pour placer les différents éléments, cliquez sur l'item que vous voulez placer puis cliquez sur l'emplacement où vous voulez le placer.";
"Vous aurez également la possibilité de financer des clubs de randonnées et d'améliorer vos chemins ferroviaires afin d'attirer plus de randonneurs.\n\n" +
"Lorsque vous placez 5 chemins vous obtiendrez un bonus d'un marcheur à chaque nouveau chemin placé, de deux marcheurs si vous en placez etc. Il en est de" +
" meme avec les clubs mais le bonus est doublé !\n\n"+
"Pour placer les différents éléments, cliquez sur la case où vous voulez vous placer puis cliquez sur l'item que vous voulez placer dans cette case.";
}
private void btnContexte_Click(object sender, EventArgs e)
......@@ -62,7 +64,7 @@ namespace Wanderer.view
{
Button b = (Button)sender;
lblTitre.Text = b.Text;
lblTexte.Text = "Vous devrez atteindre un nombre de marcheurs sur votre territoire s'élévant à X marcheurs.\n\n"+
lblTexte.Text = "Vous devrez atteindre un nombre de 50 marcheurs sur votre territoire avant votre adversaire.\n\n"+
"Pour cela aménagez votre territoire ! \n" +
"(Rendez-vous dans la rubrique Construction)";
}
......
File moved
......@@ -36,6 +36,8 @@ namespace Wanderer.view
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.lblLooser = new System.Windows.Forms.Label();
this.lblTour = new System.Windows.Forms.Label();
this.btnContexte = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.flowLayoutPanel1.SuspendLayout();
this.flowLayoutPanel2.SuspendLayout();
this.SuspendLayout();
......@@ -47,7 +49,7 @@ namespace Wanderer.view
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(110, 42);
this.label1.Location = new System.Drawing.Point(409, 61);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(363, 46);
......@@ -59,9 +61,9 @@ namespace Wanderer.view
//
this.flowLayoutPanel1.Controls.Add(this.lblWinner);
this.flowLayoutPanel1.Font = new System.Drawing.Font("Microsoft Tai Le", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.flowLayoutPanel1.Location = new System.Drawing.Point(65, 126);
this.flowLayoutPanel1.Location = new System.Drawing.Point(164, 183);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(236, 115);
this.flowLayoutPanel1.Size = new System.Drawing.Size(369, 220);
this.flowLayoutPanel1.TabIndex = 1;
//
// lblWinner
......@@ -78,9 +80,9 @@ namespace Wanderer.view
//
this.flowLayoutPanel2.Controls.Add(this.lblLooser);
this.flowLayoutPanel2.Font = new System.Drawing.Font("Microsoft Tai Le", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.flowLayoutPanel2.Location = new System.Drawing.Point(383, 126);
this.flowLayoutPanel2.Location = new System.Drawing.Point(785, 192);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
this.flowLayoutPanel2.Size = new System.Drawing.Size(235, 115);
this.flowLayoutPanel2.Size = new System.Drawing.Size(366, 204);
this.flowLayoutPanel2.TabIndex = 2;
//
// lblLooser
......@@ -100,26 +102,65 @@ namespace Wanderer.view
this.lblTour.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.lblTour.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblTour.ForeColor = System.Drawing.Color.White;
this.lblTour.Location = new System.Drawing.Point(106, 301);
this.lblTour.Location = new System.Drawing.Point(446, 462);
this.lblTour.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblTour.Name = "lblTour";
this.lblTour.Size = new System.Drawing.Size(406, 46);
this.lblTour.TabIndex = 3;
this.lblTour.Text = "Nombre de tour total :";
//
// btnContexte
//
this.btnContexte.BackColor = System.Drawing.Color.Transparent;
this.btnContexte.FlatAppearance.BorderSize = 2;
this.btnContexte.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Moccasin;
this.btnContexte.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnContexte.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnContexte.ForeColor = System.Drawing.Color.White;
this.btnContexte.Location = new System.Drawing.Point(732, 602);
this.btnContexte.Margin = new System.Windows.Forms.Padding(2);
this.btnContexte.Name = "btnContexte";
this.btnContexte.Size = new System.Drawing.Size(159, 65);
this.btnContexte.TabIndex = 6;
this.btnContexte.Text = "Quitter";
this.btnContexte.UseVisualStyleBackColor = false;
this.btnContexte.Click += new System.EventHandler(this.btnContexte_Click);
//
// button1
//
this.button1.BackColor = System.Drawing.Color.Transparent;
this.button1.FlatAppearance.BorderSize = 2;
this.button1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Moccasin;
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.ForeColor = System.Drawing.Color.White;
this.button1.Location = new System.Drawing.Point(374, 602);
this.button1.Margin = new System.Windows.Forms.Padding(2);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(159, 65);
this.button1.TabIndex = 7;
this.button1.Text = "Rejouer";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// 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.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.ClientSize = new System.Drawing.Size(1280, 700);
this.Controls.Add(this.button1);
this.Controls.Add(this.btnContexte);
this.Controls.Add(this.lblTour);
this.Controls.Add(this.flowLayoutPanel2);
this.Controls.Add(this.flowLayoutPanel1);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "FormFin";
this.Text = "Fin";
this.Load += new System.EventHandler(this.FormFin_Load);
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
this.flowLayoutPanel2.ResumeLayout(false);
......@@ -137,5 +178,7 @@ namespace Wanderer.view
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private System.Windows.Forms.Label lblLooser;
private System.Windows.Forms.Label lblTour;
private System.Windows.Forms.Button btnContexte;
private System.Windows.Forms.Button button1;
}
}
\ No newline at end of file
......@@ -52,5 +52,22 @@ namespace Wanderer.view
"\n\nMarks : " + p2.marks;
flowLayoutPanel2.BackColor = p2.Color;
}
private void FormFin_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
FormJeu f = new FormJeu();
f.Show();
this.Hide();
}
private void btnContexte_Click(object sender, EventArgs e)
{
Application.Exit();
}
}
}
File moved
......@@ -46,12 +46,13 @@ namespace Wanderer.view
this.btnRefuge = new System.Windows.Forms.Button();
this.btnChemin = new System.Windows.Forms.Button();
this.btnClub = new System.Windows.Forms.Button();
this.mapView1 = new Wanderer.view.Controls.MapView();
this.lblRefuge = new System.Windows.Forms.Label();
this.lblChemins = new System.Windows.Forms.Label();
this.lblClub = new System.Windows.Forms.Label();
this.lblTrain = new System.Windows.Forms.Label();
this.lblUsine = new System.Windows.Forms.Label();
this.mapView1 = new Wanderer.view.Controls.MapView();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pbAide)).BeginInit();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
......@@ -72,6 +73,7 @@ namespace Wanderer.view
//
// panel1
//
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.lblMarcheurBleu);
this.panel1.Controls.Add(this.lblArgentBleu);
this.panel1.Controls.Add(this.lblMarcheursUp);
......@@ -93,7 +95,7 @@ namespace Wanderer.view
this.lblMarcheurBleu.AutoSize = true;
this.lblMarcheurBleu.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.lblMarcheurBleu.ForeColor = System.Drawing.Color.Blue;
this.lblMarcheurBleu.Location = new System.Drawing.Point(1062, 24);
this.lblMarcheurBleu.Location = new System.Drawing.Point(922, 24);
this.lblMarcheurBleu.Name = "lblMarcheurBleu";
this.lblMarcheurBleu.Size = new System.Drawing.Size(105, 25);
this.lblMarcheurBleu.TabIndex = 18;
......@@ -104,7 +106,7 @@ namespace Wanderer.view
this.lblArgentBleu.AutoSize = true;
this.lblArgentBleu.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.lblArgentBleu.ForeColor = System.Drawing.Color.Blue;
this.lblArgentBleu.Location = new System.Drawing.Point(755, 24);
this.lblArgentBleu.Location = new System.Drawing.Point(616, 23);
this.lblArgentBleu.Name = "lblArgentBleu";
this.lblArgentBleu.Size = new System.Drawing.Size(70, 25);
this.lblArgentBleu.TabIndex = 17;
......@@ -133,7 +135,7 @@ namespace Wanderer.view
this.lblMarcheurRouge.AutoSize = true;
this.lblMarcheurRouge.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.lblMarcheurRouge.ForeColor = System.Drawing.Color.Red;
this.lblMarcheurRouge.Location = new System.Drawing.Point(919, 24);
this.lblMarcheurRouge.Location = new System.Drawing.Point(779, 24);
this.lblMarcheurRouge.Name = "lblMarcheurRouge";
this.lblMarcheurRouge.Size = new System.Drawing.Size(105, 25);
this.lblMarcheurRouge.TabIndex = 14;
......@@ -144,7 +146,7 @@ namespace Wanderer.view
this.lblArgentRouge.AutoSize = true;
this.lblArgentRouge.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.lblArgentRouge.ForeColor = System.Drawing.Color.Red;
this.lblArgentRouge.Location = new System.Drawing.Point(645, 24);
this.lblArgentRouge.Location = new System.Drawing.Point(506, 23);
this.lblArgentRouge.Name = "lblArgentRouge";
this.lblArgentRouge.Size = new System.Drawing.Size(70, 25);
this.lblArgentRouge.TabIndex = 13;
......@@ -154,7 +156,7 @@ namespace Wanderer.view
//
this.lblTour.AutoSize = true;
this.lblTour.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F);
this.lblTour.Location = new System.Drawing.Point(70, 9);
this.lblTour.Location = new System.Drawing.Point(61, 9);
this.lblTour.Name = "lblTour";
this.lblTour.Size = new System.Drawing.Size(354, 46);
this.lblTour.TabIndex = 12;
......@@ -164,7 +166,7 @@ namespace Wanderer.view
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(596, 19);
this.pictureBox1.Location = new System.Drawing.Point(462, 18);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(32, 33);
......@@ -175,7 +177,7 @@ namespace Wanderer.view
// pbPersonnes
//
this.pbPersonnes.Image = ((System.Drawing.Image)(resources.GetObject("pbPersonnes.Image")));
this.pbPersonnes.Location = new System.Drawing.Point(870, 19);
this.pbPersonnes.Location = new System.Drawing.Point(737, 19);
this.pbPersonnes.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
this.pbPersonnes.Name = "pbPersonnes";
this.pbPersonnes.Size = new System.Drawing.Size(32, 33);
......@@ -192,7 +194,7 @@ namespace Wanderer.view
this.btnUsine.ForeColor = System.Drawing.Color.White;
this.btnUsine.Image = ((System.Drawing.Image)(resources.GetObject("btnUsine.Image")));
this.btnUsine.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUsine.Location = new System.Drawing.Point(1080, 598);
this.btnUsine.Location = new System.Drawing.Point(1029, 598);
this.btnUsine.Margin = new System.Windows.Forms.Padding(2);
this.btnUsine.Name = "btnUsine";
this.btnUsine.Size = new System.Drawing.Size(167, 77);
......@@ -212,7 +214,7 @@ namespace Wanderer.view
this.btnTrain.ForeColor = System.Drawing.Color.White;
this.btnTrain.Image = ((System.Drawing.Image)(resources.GetObject("btnTrain.Image")));
this.btnTrain.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnTrain.Location = new System.Drawing.Point(819, 598);
this.btnTrain.Location = new System.Drawing.Point(548, 598);
this.btnTrain.Margin = new System.Windows.Forms.Padding(2);
this.btnTrain.Name = "btnTrain";
this.btnTrain.Size = new System.Drawing.Size(167, 77);
......@@ -232,7 +234,7 @@ namespace Wanderer.view
this.btnRefuge.ForeColor = System.Drawing.Color.White;
this.btnRefuge.Image = ((System.Drawing.Image)(resources.GetObject("btnRefuge.Image")));
this.btnRefuge.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnRefuge.Location = new System.Drawing.Point(29, 598);
this.btnRefuge.Location = new System.Drawing.Point(73, 598);
this.btnRefuge.Margin = new System.Windows.Forms.Padding(2);
this.btnRefuge.Name = "btnRefuge";
this.btnRefuge.Size = new System.Drawing.Size(167, 77);
......@@ -252,7 +254,7 @@ namespace Wanderer.view
this.btnChemin.ForeColor = System.Drawing.Color.White;
this.btnChemin.Image = ((System.Drawing.Image)(resources.GetObject("btnChemin.Image")));
this.btnChemin.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnChemin.Location = new System.Drawing.Point(281, 598);
this.btnChemin.Location = new System.Drawing.Point(367, 598);
this.btnChemin.Margin = new System.Windows.Forms.Padding(2);
this.btnChemin.Name = "btnChemin";
this.btnChemin.Size = new System.Drawing.Size(167, 77);
......@@ -272,7 +274,7 @@ namespace Wanderer.view
this.btnClub.ForeColor = System.Drawing.Color.White;
this.btnClub.Image = ((System.Drawing.Image)(resources.GetObject("btnClub.Image")));
this.btnClub.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnClub.Location = new System.Drawing.Point(556, 598);
this.btnClub.Location = new System.Drawing.Point(708, 598);
this.btnClub.Margin = new System.Windows.Forms.Padding(2);
this.btnClub.Name = "btnClub";
this.btnClub.Size = new System.Drawing.Size(167, 77);
......@@ -283,35 +285,17 @@ namespace Wanderer.view
this.btnClub.UseVisualStyleBackColor = false;
this.btnClub.Click += new System.EventHandler(this.btn_Click);
//
// mapView1
//
this.mapView1.AutoScroll = true;
this.mapView1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("mapView1.BackgroundImage")));
this.mapView1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.mapView1.ColumnCount = 2;
this.mapView1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.mapView1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.mapView1.Location = new System.Drawing.Point(29, 87);
this.mapView1.Margin = new System.Windows.Forms.Padding(2);
this.mapView1.Name = "mapView1";
this.mapView1.RowCount = 2;
this.mapView1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 13.81032F));
this.mapView1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 86.18968F));
this.mapView1.Size = new System.Drawing.Size(1218, 488);
this.mapView1.TabIndex = 11;
this.mapView1.Click += new System.EventHandler(this.mapView1_Click);
this.mapView1.Paint += new System.Windows.Forms.PaintEventHandler(this.mapView1_Paint);
//
// lblRefuge
//
this.lblRefuge.AutoSize = true;
this.lblRefuge.BackColor = System.Drawing.SystemColors.ButtonShadow;
this.lblRefuge.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblRefuge.Location = new System.Drawing.Point(98, 683);
this.lblRefuge.Location = new System.Drawing.Point(142, 683);
this.lblRefuge.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblRefuge.Name = "lblRefuge";
this.lblRefuge.Size = new System.Drawing.Size(64, 25);
this.lblRefuge.TabIndex = 12;
this.lblRefuge.Tag = "0";
this.lblRefuge.Text = "label1";
//
// lblChemins
......@@ -319,11 +303,12 @@ namespace Wanderer.view
this.lblChemins.AutoSize = true;
this.lblChemins.BackColor = System.Drawing.SystemColors.ControlDark;
this.lblChemins.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblChemins.Location = new System.Drawing.Point(344, 682);
this.lblChemins.Location = new System.Drawing.Point(430, 682);
this.lblChemins.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblChemins.Name = "lblChemins";
this.lblChemins.Size = new System.Drawing.Size(64, 25);
this.lblChemins.TabIndex = 13;
this.lblChemins.Tag = "1";
this.lblChemins.Text = "label2";
//
// lblClub
......@@ -331,11 +316,12 @@ namespace Wanderer.view
this.lblClub.AutoSize = true;
this.lblClub.BackColor = System.Drawing.SystemColors.ButtonShadow;
this.lblClub.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblClub.Location = new System.Drawing.Point(628, 682);
this.lblClub.Location = new System.Drawing.Point(780, 682);
this.lblClub.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblClub.Name = "lblClub";
this.lblClub.Size = new System.Drawing.Size(64, 25);
this.lblClub.TabIndex = 14;
this.lblClub.Tag = "2";
this.lblClub.Text = "label3";
//
// lblTrain
......@@ -343,11 +329,12 @@ namespace Wanderer.view
this.lblTrain.AutoSize = true;
this.lblTrain.BackColor = System.Drawing.SystemColors.ButtonShadow;
this.lblTrain.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblTrain.Location = new System.Drawing.Point(881, 682);
this.lblTrain.Location = new System.Drawing.Point(610, 682);
this.lblTrain.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblTrain.Name = "lblTrain";
this.lblTrain.Size = new System.Drawing.Size(64, 25);
this.lblTrain.TabIndex = 15;
this.lblTrain.Tag = "3";
this.lblTrain.Text = "label4";
//
// lblUsine
......@@ -355,13 +342,44 @@ namespace Wanderer.view
this.lblUsine.AutoSize = true;
this.lblUsine.BackColor = System.Drawing.SystemColors.ButtonShadow;
this.lblUsine.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblUsine.Location = new System.Drawing.Point(1155, 680);
this.lblUsine.Location = new System.Drawing.Point(1104, 680);
this.lblUsine.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblUsine.Name = "lblUsine";
this.lblUsine.Size = new System.Drawing.Size(64, 25);
this.lblUsine.TabIndex = 16;
this.lblUsine.Tag = "4";
this.lblUsine.Text = "label5";
//
// mapView1
//
this.mapView1.AutoScroll = true;
this.mapView1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("mapView1.BackgroundImage")));
this.mapView1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.mapView1.ColumnCount = 2;
this.mapView1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.mapView1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.mapView1.Location = new System.Drawing.Point(29, 87);
this.mapView1.Margin = new System.Windows.Forms.Padding(2);
this.mapView1.Name = "mapView1";
this.mapView1.RowCount = 2;
this.mapView1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 13.81032F));
this.mapView1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 86.18968F));
this.mapView1.Size = new System.Drawing.Size(1218, 488);
this.mapView1.TabIndex = 11;
this.mapView1.Click += new System.EventHandler(this.mapView1_Click);
this.mapView1.Paint += new System.Windows.Forms.PaintEventHandler(this.mapView1_Paint);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.label1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.label1.Location = new System.Drawing.Point(1077, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(116, 25);
this.label1.TabIndex = 19;
this.label1.Text = "Objectif : 50";
//
// FormJeu
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
......@@ -422,5 +440,6 @@ namespace Wanderer.view
private System.Windows.Forms.Label lblClub;
private System.Windows.Forms.Label lblTrain;
private System.Windows.Forms.Label lblUsine;
private System.Windows.Forms.Label label1;
}
}
\ No newline at end of file
......@@ -55,19 +55,17 @@ namespace Wanderer.view
//Premier tour
if(nombreTour==0)
{
b.Enabled = false;
b.BackColor = Color.Gray;
btnTrain.Enabled = true;
btnTrain.BackColor = Color.Transparent;
b.Visible = false;
btnTrain.Visible = true;
}
else
{
b.Visible = true;
btnTrain.Visible = false;
}
}
}
//Désactive train
if (nombreTour > 1)
{
btnTrain.BackColor = Color.Gray;
btnTrain.Enabled = false;
}
if (nombreTour % 10 ==0 && nombreTour != 0)
{
for( int i=0; i < tbConstruct.Length; i++)
......@@ -78,6 +76,28 @@ namespace Wanderer.view
}
}
private void updateLabels()
{
foreach (Object o in Controls)
{
if (o is Label l && l.Tag != null)
{
//Premier tour
if (nombreTour == 0)
{
l.Visible = false;
lblTrain.Visible = true;
}
else
{
l.Visible = true;
lblTrain.Visible = false;
}
}
}
}
/**
* Action btnClick
* - vérifie si fond suffisant
......@@ -96,7 +116,7 @@ namespace Wanderer.view
//Calcul des marks et randonneurs, ajout d'image sur la map
if (currentPlayer.marks >= cout && MapView.SelectedTile.model.Improvement == 0)
if (currentPlayer.marks >= cout && MapView.SelectedTile != null && MapView.SelectedTile.model.Improvement == 0)
{
MapView.SelectedTile.model.Improvement = (Improvement) i;
if (!MapView.SelectedTile.model.HasChanged) return;
......@@ -158,6 +178,7 @@ namespace Wanderer.view
MapView.SelectedTile.model.HasChanged = false;
}
updateButtons();
updateLabels();
if (currentPlayer.randonneurs >= 50)
{
......
File moved
File moved
This source diff could not be displayed because it is too large. You can view the blob instead.
using System.ComponentModel;
namespace Wanderer.view.Controls
{
public partial class MapView
{
private IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.SuspendLayout();
this.ResumeLayout(false);
}
}
}
\ No newline at end of file

namespace Wanderer.view
{
partial class FormFin
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(419, 267);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(44, 20);
this.label1.TabIndex = 0;
this.label1.Text = "Win !";
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// FormFin
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.ClientSize = new System.Drawing.Size(900, 562);
this.Controls.Add(this.label1);
this.Name = "FormFin";
this.Text = "Fin";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label label1;
}
}
\ No newline at end of file