From 1a7baf7a0ed6a9eaa4549cc2ec313dcef0311c0b Mon Sep 17 00:00:00 2001 From: lempamo Date: Mon, 7 Aug 2017 17:16:14 -0400 Subject: minesweeper graphics part 2 --- TimeHACK.Main/OS/Win95/Win95.cs | 2 +- .../OS/Win95/Win95Apps/MineSweeper/Game.cs | 6 +++++- .../OS/Win95/Win95Apps/MineSweeper/Square.cs | 2 +- .../Win95Apps/MineSweeper/WinClassicMinesweeper.cs | 10 +++++----- TimeHACK.Main/Properties/Resources.Designer.cs | 20 ++++++++++++++++++++ TimeHACK.Main/Properties/Resources.resx | 6 ++++++ TimeHACK.Main/Resources/minesweepSquare5.png | Bin 0 -> 208 bytes TimeHACK.Main/Resources/minesweepSquareWrong.png | Bin 0 -> 271 bytes TimeHACK.Main/TimeHACK.Main.csproj | 2 ++ 9 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 TimeHACK.Main/Resources/minesweepSquare5.png create mode 100644 TimeHACK.Main/Resources/minesweepSquareWrong.png (limited to 'TimeHACK.Main') diff --git a/TimeHACK.Main/OS/Win95/Win95.cs b/TimeHACK.Main/OS/Win95/Win95.cs index 8629f41..db7b7f6 100644 --- a/TimeHACK.Main/OS/Win95/Win95.cs +++ b/TimeHACK.Main/OS/Win95/Win95.cs @@ -569,7 +569,7 @@ namespace TimeHACK.OS.Win95 private void MinsweeperToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartWin95(new WinClassicMinesweeper(), "Minesweeper", Properties.Resources.WinClassicMinesweeper, false, false); + WinClassic app = wm.StartWin95(new WinClassicMinesweeper(), "Minesweeper", Properties.Resources.WinClassicMinesweeper, false, false, false, false); AddTaskBarItem(app, app.Tag.ToString(), "Minesweeper", Properties.Resources.WinClassicMinesweeper); nonimportantapps.Add(app); diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Game.cs b/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Game.cs index b01596c..be3f1c8 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Game.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Game.cs @@ -67,10 +67,14 @@ namespace TimeHACK.OS.Win95.Win95Apps.MineSweeper foreach (Square s in _squares) { s.RemoveEvents(); - if (s.Minded && !s.Exploded) + if (s.Minded && !s.Exploded && !s.Dismantled) { s.Button.BackgroundImage = Properties.Resources.minesweepSquareMine; } + if (s.Dismantled && !s.Minded) + { + s.Button.BackgroundImage = Properties.Resources.minesweepSquareWrong; + } } } diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Square.cs b/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Square.cs index ef20710..00594b2 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Square.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Square.cs @@ -207,7 +207,7 @@ namespace TimeHACK.OS.Win95.Win95Apps.MineSweeper Button.BackgroundImage = Properties.Resources.minesweepSquare4; break; case 5: - Button.ForeColor = Color.DarkRed; + Button.BackgroundImage = Properties.Resources.minesweepSquare5; break; case 6: Button.ForeColor = Color.LightBlue; diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs b/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs index fb8f112..5556e18 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs @@ -43,24 +43,25 @@ namespace TimeHACK.OS.Win95.Win95Apps panel2.Paint -= (sender, args) => Paintbrush.PaintClassicBordersIndented(sender, args, 3); panel2.Refresh(); panel2.Paint += (sender, args) => Paintbrush.PaintClassicBordersIndented(sender, args, 3); + button1.Location = new Point(this.Width / 2 - 12, 32); button1.PerformClick(); } private void begginnerToolStripMenuItem_Click(object sender, EventArgs e) { level = "easy"; - button1.Location = new Point(70, 32); + //button1.Location = new Point(70, 32); calculateFormSize(8, 8); } private void intermediateToolStripMenuItem_Click(object sender, EventArgs e) { level = "medium"; - button1.Location = new Point(208, 32); + //button1.Location = new Point(158, 32); calculateFormSize(16, 16); } private void expertToolStripMenuItem_Click(object sender, EventArgs e) { level = "hard"; - button1.Location = new Point(381, 32); + //button1.Location = new Point(381, 32); calculateFormSize(30, 16); } private void button1_Click(object sender, EventArgs e) @@ -120,6 +121,7 @@ namespace TimeHACK.OS.Win95.Win95Apps } SaveSystem.SaveGame(); + timer1.Stop(); } } @@ -131,8 +133,6 @@ namespace TimeHACK.OS.Win95.Win95Apps private void exitToolStripMenuItem_Click(object sender, EventArgs e) { - Thread t = new Thread(Achieve); - t.Start(); this.ParentForm.Close(); } } diff --git a/TimeHACK.Main/Properties/Resources.Designer.cs b/TimeHACK.Main/Properties/Resources.Designer.cs index cf09010..e4ca9c9 100644 --- a/TimeHACK.Main/Properties/Resources.Designer.cs +++ b/TimeHACK.Main/Properties/Resources.Designer.cs @@ -475,6 +475,16 @@ namespace TimeHACK.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap minesweepSquare5 { + get { + object obj = ResourceManager.GetObject("minesweepSquare5", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -495,6 +505,16 @@ namespace TimeHACK.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap minesweepSquareWrong { + get { + object obj = ResourceManager.GetObject("minesweepSquareWrong", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. /// diff --git a/TimeHACK.Main/Properties/Resources.resx b/TimeHACK.Main/Properties/Resources.resx index 0ccafe4..0ece129 100644 --- a/TimeHACK.Main/Properties/Resources.resx +++ b/TimeHACK.Main/Properties/Resources.resx @@ -738,10 +738,16 @@ ..\Resources\minesweepSquare4.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\minesweepSquare5.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\minesweepSquareExploded.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\minesweepSquareMine.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\minesweepSquareWrong.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/TimeHACK.Main/Resources/minesweepSquare5.png b/TimeHACK.Main/Resources/minesweepSquare5.png new file mode 100644 index 0000000..f683d90 Binary files /dev/null and b/TimeHACK.Main/Resources/minesweepSquare5.png differ diff --git a/TimeHACK.Main/Resources/minesweepSquareWrong.png b/TimeHACK.Main/Resources/minesweepSquareWrong.png new file mode 100644 index 0000000..ad6bbf2 Binary files /dev/null and b/TimeHACK.Main/Resources/minesweepSquareWrong.png differ diff --git a/TimeHACK.Main/TimeHACK.Main.csproj b/TimeHACK.Main/TimeHACK.Main.csproj index a85279f..806628a 100644 --- a/TimeHACK.Main/TimeHACK.Main.csproj +++ b/TimeHACK.Main/TimeHACK.Main.csproj @@ -548,6 +548,8 @@ + + -- cgit v1.2.3