aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications/ShiftSweeper.cs
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-02-26 13:36:01 -0500
committerlempamo <[email protected]>2017-02-26 13:36:01 -0500
commit4fba2d86af9c960fb78b1c0a912b6371f21b487d (patch)
tree4df4d34284ca6a629d9a2f5f0991277faff9edaa /ShiftOS.WinForms/Applications/ShiftSweeper.cs
parentca703e314d596b7c44f83e1a5ca416ded9576673 (diff)
downloadshiftos_thereturn-4fba2d86af9c960fb78b1c0a912b6371f21b487d.tar.gz
shiftos_thereturn-4fba2d86af9c960fb78b1c0a912b6371f21b487d.tar.bz2
shiftos_thereturn-4fba2d86af9c960fb78b1c0a912b6371f21b487d.zip
setting up minefield
Diffstat (limited to 'ShiftOS.WinForms/Applications/ShiftSweeper.cs')
-rw-r--r--ShiftOS.WinForms/Applications/ShiftSweeper.cs27
1 files changed, 25 insertions, 2 deletions
diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.cs
index c61f3eb..d7c22b4 100644
--- a/ShiftOS.WinForms/Applications/ShiftSweeper.cs
+++ b/ShiftOS.WinForms/Applications/ShiftSweeper.cs
@@ -11,13 +11,14 @@ using ShiftOS.Engine;
namespace ShiftOS.WinForms.Applications
{
- [Launcher("ShiftSweeper", false, null, "Games")]
+ [Launcher("ShiftSweeper", true, "shiftsweeper", "Games")]
[RequiresUpgrade("shiftsweeper")]
[WinOpen("shiftsweeper")]
[DefaultIcon("iconShiftSweeper")]
public partial class ShiftSweeper : UserControl, IShiftOSWindow
{
private bool gameplayed = false;
+ private int mineCount = 0;
public ShiftSweeper()
{
@@ -26,7 +27,9 @@ namespace ShiftOS.WinForms.Applications
public void OnLoad()
{
-
+ buttonE.Visible = true;
+ buttonM.Visible = ShiftoriumFrontend.UpgradeInstalled("shiftsweeper_medium");
+ buttonH.Visible = ShiftoriumFrontend.UpgradeInstalled("shiftsweeper_hard");
}
public void OnSkinLoad() { }
@@ -37,5 +40,25 @@ namespace ShiftOS.WinForms.Applications
{
}
+
+ private void buttonE_Click(object sender, EventArgs e)
+ {
+ startGame(0);
+ }
+
+ private void startGame(int d)
+ {
+ switch (d)
+ {
+ case 0:
+ mineCount = 10;
+ minefieldPanel.ColumnCount = 9;
+ minefieldPanel.RowCount = 9;
+ break;
+
+ default:
+ throw new NullReferenceException();
+ }
+ }
}
}