aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs')
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs41
1 files changed, 41 insertions, 0 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs b/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs
new file mode 100644
index 0000000..a7e043f
--- /dev/null
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using TimeHACK.OS.Win95.Win95Apps.MineSweeper;
+
+namespace TimeHACK.OS.Win95.Win95Apps
+{
+ public partial class WinClassicMinesweeper : UserControl
+ {
+ private Game _game;
+ public int currentface = 1;
+ public WinClassicMinesweeper()
+ {
+ InitializeComponent();
+ }
+ private void GameTick(object sender, EventArgs e)
+ {
+ labelTime.Text = _game.Time.ToString();
+ }
+
+ private void GameDismantledMinesChanged(object sender, EventArgs e)
+ {
+ labelBombs.Text = (_game.Mines - _game.DismantledMines).ToString();
+ }
+
+ private void pictureBox1_Click(object sender, EventArgs e)
+ {
+ Cursor.Current = Cursors.WaitCursor;
+ _game = new Game(this.panel1, 8, 8, 10);
+ _game.Tick += new EventHandler(GameTick);
+ _game.DismantledMinesChanged += new EventHandler(GameDismantledMinesChanged);
+ _game.Start();
+ }
+ }
+}