diff options
| author | lempamo <lempamo@outlook.com> | 2017-07-26 21:00:41 -0400 |
|---|---|---|
| committer | lempamo <lempamo@outlook.com> | 2017-07-26 21:00:41 -0400 |
| commit | 27b0ef74642e98bf8c9a83d2700e7ce6643e3114 (patch) | |
| tree | 1cf133193286ccf67fd0339018a8d9ae219e5b11 /TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs | |
| parent | e1a0433b6bac1a0db985e40b8e94cd43d0f7302a (diff) | |
| parent | bd7604e6a8c13e9cee05614e64b8eadd68b1c8c9 (diff) | |
| download | histacom2-27b0ef74642e98bf8c9a83d2700e7ce6643e3114.tar.gz histacom2-27b0ef74642e98bf8c9a83d2700e7ce6643e3114.tar.bz2 histacom2-27b0ef74642e98bf8c9a83d2700e7ce6643e3114.zip | |
Merge branch 'master' of https://github.com/TimeHACKDevs/TimeHACK.git
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs')
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs | 41 |
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(); + } + } +} |
