aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Square.cs
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-08-03 09:44:42 -0500
committerGitHub <[email protected]>2017-08-03 09:44:42 -0500
commit970dabaa90a39623c7a8271239861a09af7b2b54 (patch)
treebe800478122fb3909c40699b1e879d333afdb536 /TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Square.cs
parenta3b48880bf4136cb8033305fde052727e24ab8b1 (diff)
parent3e53975325a4f398150207c9362b8d63ef927f7c (diff)
downloadhistacom2-970dabaa90a39623c7a8271239861a09af7b2b54.tar.gz
histacom2-970dabaa90a39623c7a8271239861a09af7b2b54.tar.bz2
histacom2-970dabaa90a39623c7a8271239861a09af7b2b54.zip
Merge pull request #146 from jtsshieh/master
Minesweeper Scoring System
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Square.cs')
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Square.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Square.cs b/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Square.cs
index 2029995..a65eedf 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Square.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Square.cs
@@ -1,5 +1,6 @@
using System;
using System.Drawing;
+using System.Threading.Tasks;
using System.Windows.Forms;
using TimeHACK.Engine;
@@ -51,6 +52,7 @@ namespace TimeHACK.OS.Win95.Win95Apps.MineSweeper
private void Click(object sender, System.EventArgs e)
{
+
if (!Dismantled)
{
if (Minded)
@@ -63,6 +65,14 @@ namespace TimeHACK.OS.Win95.Win95Apps.MineSweeper
this.Open();
}
}
+ if (_game.ftime == true)
+ {
+ _game.ftime = false;
+ _game._timer = new Timer();
+ _game._timer.Interval = 1000;
+ _game._timer.Tick += new EventHandler(_game.TimerTick);
+ _game._timer.Enabled = true;
+ }
}
private void DismantleClick(object sender, MouseEventArgs e)
@@ -75,9 +85,17 @@ namespace TimeHACK.OS.Win95.Win95Apps.MineSweeper
Button.BackgroundImage = null;
Button.Text = "?";
}
+ else if(Button.Text == "?")
+ {
+ _dismantled = false;
+ Button.BackgroundImage = null;
+ Button.Text = "";
+ return;
+ }
else
{
_dismantled = true;
+ Button.Text = "";
Button.BackgroundImage = Properties.Resources.WinClassicMinesweeperFlag;
}
OnDismantle();