aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications/ShiftSweeper.cs
diff options
context:
space:
mode:
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();
+ }
+ }
}
}