aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-07-31 20:04:30 -0500
committerGitHub <[email protected]>2017-07-31 20:04:30 -0500
commit2c87be280cb1869331549e5c6160b017fabea43e (patch)
tree8b3e2d3b78b06e14805ddca8bd686c4220cf5748 /TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs
parent87902a4c24b0c5bbd2695cfc771e9b6419c75e16 (diff)
parent677482ba0b26102b2a2802502a3f29701c319e9d (diff)
downloadhistacom2-2c87be280cb1869331549e5c6160b017fabea43e.tar.gz
histacom2-2c87be280cb1869331549e5c6160b017fabea43e.tar.bz2
histacom2-2c87be280cb1869331549e5c6160b017fabea43e.zip
Merge pull request #142 from jtsshieh/master
Made some changes to Minesweeper
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs')
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs24
1 files changed, 11 insertions, 13 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs b/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs
index 6b6e297..657659b 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs
@@ -29,32 +29,30 @@ namespace TimeHACK.OS.Win95.Win95Apps
{
labelBombs.Text = (_game.Mines - _game.DismantledMines).ToString();
}
+ public void calculateFormSize(int x, int y)
+ {
+ panel1.Size = new Size(x * 25, y * 25);
+ this.ParentForm.Size = new Size(x * 25 + 45, y * 25 + 100);
+ labelTime.Location = new Point(x * 25 - 38, button1.Location.Y);
+ button1.PerformClick();
+ }
private void begginnerToolStripMenuItem_Click(object sender, EventArgs e)
{
level = "easy";
- panel1.Size = new Size(200, 200);
- this.ParentForm.Size = new Size(240, 275);
button1.Location = new Point(108, 32);
- labelTime.Location = new Point(162, 34);
- button1.PerformClick();
+ calculateFormSize(8, 8);
}
private void intermediateToolStripMenuItem_Click(object sender, EventArgs e)
{
level = "medium";
- panel1.Size = new Size(400,400);
- this.ParentForm.Size = new Size(440, 480);
button1.Location = new Point(208, 32);
- labelTime.Location = new Point(362, 34);
- button1.PerformClick();
+ calculateFormSize(16, 16);
}
private void expertToolStripMenuItem_Click(object sender, EventArgs e)
{
level = "hard";
- panel1.Size = new Size(740, 400);
- this.ParentForm.Size = new Size(776, 480);
button1.Location = new Point(381, 32);
- labelTime.Location = new Point(702, 34);
- button1.PerformClick();
+ calculateFormSize(30, 16);
}
private void button1_Click(object sender, EventArgs e)
{
@@ -87,7 +85,7 @@ namespace TimeHACK.OS.Win95.Win95Apps
private void WinClassicMinesweeper_Load(object sender, EventArgs e)
{
- button1.PerformClick();
+ begginnerToolStripMenuItem.PerformClick();
}
}
}