Skip to content
Snippets Groups Projects
Commit f48eb587 authored by Elias Leinenweber's avatar Elias Leinenweber
Browse files

Revert "Merge remote-tracking branch 'origin/master'"

This reverts commit 1c6f2e0c, reversing
changes made to 3fbaffb9.
parent 1c6f2e0c
No related merge requests found
using Wanderer.model; namespace Wanderer
namespace Wanderer
{ {
public class Map public class Map
{ {
private Tile[,] _tiles; private Tile[,] _tiles;
public Map(int dx, int dy)
{
_tiles = new Tile[dx, dy];
}
public Tile[,] Tiles public Tile[,] Tiles
{ {
get => _tiles; get => _tiles;
......
namespace Wanderer.model namespace Wanderer
{ {
public class Tile public class Tile
{ {
private Terrain _terrain;
public Tile(Terrain terrain)
{
_terrain = terrain;
}
public Terrain Terrain { get; set; } public Terrain Terrain { get; set; }
} }
} }
\ No newline at end of file
...@@ -9,7 +9,7 @@ namespace Wanderer.view.Controls ...@@ -9,7 +9,7 @@ namespace Wanderer.view.Controls
{ {
private TileView[,] tileViews; private TileView[,] tileViews;
[Category("Data")] [Category("Model")]
[Browsable(true)] [Browsable(true)]
[Description("La map correspondante.")] [Description("La map correspondante.")]
[Editor(typeof(WindowsFormsComponentEditor), typeof(UITypeEditor))] [Editor(typeof(WindowsFormsComponentEditor), typeof(UITypeEditor))]
...@@ -18,15 +18,6 @@ namespace Wanderer.view.Controls ...@@ -18,15 +18,6 @@ namespace Wanderer.view.Controls
ColumnCount = value.Tiles.GetLength(0); ColumnCount = value.Tiles.GetLength(0);
RowCount = value.Tiles.GetLength(1); RowCount = value.Tiles.GetLength(1);
for (int i = 0; i < ColumnCount; i++) {
ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100));
}
for (int i = 0; i < RowCount; i++) {
RowStyles.Add(new RowStyle(SizeType.Percent, 100));
}
tileViews = new TileView[ColumnCount, RowCount];
for (int i = 0; i < ColumnCount; ++i) for (int i = 0; i < ColumnCount; ++i)
for (int j = 0; j < RowCount; ++j) for (int j = 0; j < RowCount; ++j)
{ {
...@@ -39,8 +30,6 @@ namespace Wanderer.view.Controls ...@@ -39,8 +30,6 @@ namespace Wanderer.view.Controls
public MapView() public MapView()
{ {
InitializeComponent(); InitializeComponent();
CellBorderStyle = TableLayoutPanelCellBorderStyle.Inset;
} }
} }
} }
\ No newline at end of file
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
using Wanderer.model;
namespace Wanderer.view.Controls namespace Wanderer.view.Controls
{ {
...@@ -11,8 +10,7 @@ namespace Wanderer.view.Controls ...@@ -11,8 +10,7 @@ namespace Wanderer.view.Controls
public TileView(Tile tile) public TileView(Tile tile)
{ {
model = tile; model = tile;
Size = new Size(50, 50); Image = imageFromTerrain();
//Image = imageFromTerrain();
} }
private Image imageFromTerrain() private Image imageFromTerrain()
......
...@@ -41,10 +41,5 @@ namespace Wanderer.view ...@@ -41,10 +41,5 @@ namespace Wanderer.view
private void mapView1_Paint(object sender, PaintEventArgs e) private void mapView1_Paint(object sender, PaintEventArgs e)
{ {
} }
private void FormJeu_Load(object sender, EventArgs e)
{
mapView1.Model = new Map(10, 10);
}
} }
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -44,8 +44,6 @@ ...@@ -44,8 +44,6 @@
this.btnPlay.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnPlay.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnPlay.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnPlay.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnPlay.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.btnPlay.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.btnPlay.Location = new System.Drawing.Point(193, 87);
this.btnPlay.Margin = new System.Windows.Forms.Padding(2);
this.btnPlay.Location = new System.Drawing.Point(290, 134); this.btnPlay.Location = new System.Drawing.Point(290, 134);
this.btnPlay.Name = "btnPlay"; this.btnPlay.Name = "btnPlay";
this.btnPlay.Size = new System.Drawing.Size(328, 129); this.btnPlay.Size = new System.Drawing.Size(328, 129);
...@@ -62,8 +60,6 @@ ...@@ -62,8 +60,6 @@
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button1.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button1.Location = new System.Drawing.Point(193, 269);
this.button1.Margin = new System.Windows.Forms.Padding(4);
this.button1.Location = new System.Drawing.Point(290, 414); this.button1.Location = new System.Drawing.Point(290, 414);
this.button1.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6); this.button1.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.button1.Name = "button1"; this.button1.Name = "button1";
...@@ -81,8 +77,6 @@ ...@@ -81,8 +77,6 @@
this.btnAide.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnAide.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAide.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnAide.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnAide.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.btnAide.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.btnAide.Location = new System.Drawing.Point(193, 177);
this.btnAide.Margin = new System.Windows.Forms.Padding(4);
this.btnAide.Location = new System.Drawing.Point(290, 272); this.btnAide.Location = new System.Drawing.Point(290, 272);
this.btnAide.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6); this.btnAide.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.btnAide.Name = "btnAide"; this.btnAide.Name = "btnAide";
...@@ -96,11 +90,6 @@ ...@@ -96,11 +90,6 @@
// //
this.lbltitre.AutoSize = true; this.lbltitre.AutoSize = true;
this.lbltitre.BackColor = System.Drawing.Color.Transparent; this.lbltitre.BackColor = System.Drawing.Color.Transparent;
this.lbltitre.Font = new System.Drawing.Font("GOST Common", 48F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbltitre.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.lbltitre.Location = new System.Drawing.Point(156, 7);
this.lbltitre.Name = "lbltitre";
this.lbltitre.Size = new System.Drawing.Size(305, 78);
this.lbltitre.Font = new System.Drawing.Font("OCR A Extended", 48F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbltitre.Font = new System.Drawing.Font("OCR A Extended", 48F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbltitre.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.lbltitre.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.lbltitre.Location = new System.Drawing.Point(207, 18); this.lbltitre.Location = new System.Drawing.Point(207, 18);
...@@ -121,7 +110,6 @@ ...@@ -121,7 +110,6 @@
this.Controls.Add(this.btnAide); this.Controls.Add(this.btnAide);
this.Controls.Add(this.button1); this.Controls.Add(this.button1);
this.Controls.Add(this.btnPlay); this.Controls.Add(this.btnPlay);
this.Margin = new System.Windows.Forms.Padding(2);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FormMainMenu"; this.Name = "FormMainMenu";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
......
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