From 281382f120dcaba79b082d010771e193d7a6e9cc Mon Sep 17 00:00:00 2001 From: lempamo Date: Sun, 26 Feb 2017 11:52:38 -0500 Subject: [PATCH 1/9] ShiftSweeper basics --- ShiftOS.WinForms/Applications/Calculator.cs | 5 +- .../Applications/ShiftSweeper.Designer.cs | 61 ++++++ ShiftOS.WinForms/Applications/ShiftSweeper.cs | 41 ++++ .../Applications/ShiftSweeper.resx | 120 ++++++++++++ .../Properties/Resources.Designer.cs | 84 ++++++-- ShiftOS.WinForms/Properties/Resources.resx | 184 ++++++++++-------- ShiftOS.WinForms/Resources/Shiftorium.txt | 19 +- .../Resources/SweeperClickFace.png | Bin 0 -> 680 bytes .../Resources/SweeperLoseFace.png | Bin 0 -> 713 bytes .../Resources/SweeperNormalFace.png | Bin 0 -> 680 bytes ShiftOS.WinForms/Resources/SweeperWinFace.png | Bin 0 -> 670 bytes .../SystemIcons/iconShiftSweeper.png | Bin 0 -> 278 bytes 12 files changed, 408 insertions(+), 106 deletions(-) create mode 100644 ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs create mode 100644 ShiftOS.WinForms/Applications/ShiftSweeper.cs create mode 100644 ShiftOS.WinForms/Applications/ShiftSweeper.resx create mode 100644 ShiftOS.WinForms/Resources/SweeperClickFace.png create mode 100644 ShiftOS.WinForms/Resources/SweeperLoseFace.png create mode 100644 ShiftOS.WinForms/Resources/SweeperNormalFace.png create mode 100644 ShiftOS.WinForms/Resources/SweeperWinFace.png create mode 100644 ShiftOS.WinForms/SystemIcons/iconShiftSweeper.png diff --git a/ShiftOS.WinForms/Applications/Calculator.cs b/ShiftOS.WinForms/Applications/Calculator.cs index afd09f5..4fa84de 100644 --- a/ShiftOS.WinForms/Applications/Calculator.cs +++ b/ShiftOS.WinForms/Applications/Calculator.cs @@ -69,10 +69,7 @@ namespace ShiftOS.WinForms.Applications prepareButtons(); } - public void OnSkinLoad() - { - - } + public void OnSkinLoad() { } public bool OnUnload() { diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs new file mode 100644 index 0000000..374784a --- /dev/null +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs @@ -0,0 +1,61 @@ +namespace ShiftOS.WinForms.Applications +{ + partial class ShiftSweeper + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // pictureBox1 + // + this.pictureBox1.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.SweeperNormalFace; + this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.pictureBox1.Location = new System.Drawing.Point(110, 3); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(32, 32); + this.pictureBox1.TabIndex = 0; + this.pictureBox1.TabStop = false; + // + // ShiftSweeper + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.pictureBox1); + this.Name = "ShiftSweeper"; + this.Size = new System.Drawing.Size(270, 333); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.PictureBox pictureBox1; + } +} diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.cs new file mode 100644 index 0000000..c61f3eb --- /dev/null +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.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 ShiftOS.Engine; + +namespace ShiftOS.WinForms.Applications +{ + [Launcher("ShiftSweeper", false, null, "Games")] + [RequiresUpgrade("shiftsweeper")] + [WinOpen("shiftsweeper")] + [DefaultIcon("iconShiftSweeper")] + public partial class ShiftSweeper : UserControl, IShiftOSWindow + { + private bool gameplayed = false; + + public ShiftSweeper() + { + InitializeComponent(); + } + + public void OnLoad() + { + + } + + public void OnSkinLoad() { } + + public bool OnUnload() { return true; } + + public void OnUpgrade() + { + + } + } +} diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.resx b/ShiftOS.WinForms/Applications/ShiftSweeper.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ShiftOS.WinForms/Properties/Resources.Designer.cs b/ShiftOS.WinForms/Properties/Resources.Designer.cs index 767d75d..05c6c07 100644 --- a/ShiftOS.WinForms/Properties/Resources.Designer.cs +++ b/ShiftOS.WinForms/Properties/Resources.Designer.cs @@ -719,6 +719,16 @@ namespace ShiftOS.WinForms.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap iconShiftLetters { + get { + object obj = ResourceManager.GetObject("iconShiftLetters", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -739,6 +749,16 @@ namespace ShiftOS.WinForms.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap iconShiftSweeper { + get { + object obj = ResourceManager.GetObject("iconShiftSweeper", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -749,6 +769,16 @@ namespace ShiftOS.WinForms.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap iconshutdown1 { + get { + object obj = ResourceManager.GetObject("iconshutdown1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -792,19 +822,9 @@ namespace ShiftOS.WinForms.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap IconTerminal { + internal static System.Drawing.Bitmap iconTerminal { get { - object obj = ResourceManager.GetObject("IconTerminal", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap iconTerminal1 { - get { - object obj = ResourceManager.GetObject("iconTerminal1", resourceCulture); + object obj = ResourceManager.GetObject("iconTerminal", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -976,6 +996,46 @@ namespace ShiftOS.WinForms.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SweeperClickFace { + get { + object obj = ResourceManager.GetObject("SweeperClickFace", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SweeperLoseFace { + get { + object obj = ResourceManager.GetObject("SweeperLoseFace", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SweeperNormalFace { + get { + object obj = ResourceManager.GetObject("SweeperNormalFace", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SweeperWinFace { + get { + object obj = ResourceManager.GetObject("SweeperWinFace", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized string similar to { /// Character: "sys", diff --git a/ShiftOS.WinForms/Properties/Resources.resx b/ShiftOS.WinForms/Properties/Resources.resx index 000157a..aad84ee 100644 --- a/ShiftOS.WinForms/Properties/Resources.resx +++ b/ShiftOS.WinForms/Properties/Resources.resx @@ -118,50 +118,53 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\fileicon16.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\ArtPadsquarerubberselected.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\ArtPadlinetool.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\fileiconsaa.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\SystemIcons\iconshutdown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\fileicon3.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\fileicon6.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon17.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\SystemIcons\iconVideoPlayer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\SystemIcons\iconTerminal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\fileicon11.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\strings_en.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - ..\Resources\fileicon7.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ArtPadtexttool.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\fileicon19.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\SystemIcons\iconorcwrite.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\fileicon9.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\SystemIcons\iconTextPad.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\fileicon14.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\Shiftorium.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 ..\SystemIcons\iconAudioPlayer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\fileicon4.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ArtPadsquarerubber.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon8.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\fileicon0.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -172,9 +175,6 @@ ..\Resources\DefaultMouse.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\fileicon10.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\SystemIcons\iconSnakey.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -184,26 +184,20 @@ ..\SystemIcons\iconFileSkimmer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\fileicon15.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\ArtPadundo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\SystemIcons\iconSkinShifter.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\SystemIcons\iconshutdown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\justthes.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\SystemIcons\iconIconManager.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\ArtPadtexttool.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\sys_shiftoriumstory.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + ..\Resources\fileicon13.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\SystemIcons\iconSkinLoader.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -220,32 +214,41 @@ ..\Resources\FloppyDriveIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ArtPadpaintbrush.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\ArtPadOval.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\fileicon5.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\fileicon3.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon7.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\SystemIcons\iconoctocat.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\ArtPadpencil.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\SystemIcons\iconWebBrowser.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\SystemIcons\iconArtpad.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\SystemIcons\iconPong.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ShiftOS.rtf;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ..\Resources\RegularDesktopGlyph.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\fileicon1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\fileicon12.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\SystemIcons\iconfloodgate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\fileicon2.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\SystemIcons\iconPong.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\ArtPadpixelplacer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -268,15 +271,15 @@ ..\Resources\ArtPaderacer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\fileicon13.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\SystemIcons\iconWebBrowser.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\fileiconsaa.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\SystemIcons\iconInfoBox.fw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\SystemIcons\iconTerminal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\SystemIcons\iconFileOpener.fw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -286,32 +289,29 @@ ..\Resources\fileicon18.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\fileicon17.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\SystemIcons\iconKnowledgeInput.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\SystemIcons\iconDownloader.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\Songs.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - ..\Resources\fileicon6.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\fileicon4.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\fileicon8.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\fileicon19.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\hello.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 - - ..\Resources\ArtPadpaintbrush.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ArtPadpencil.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\fileicon2.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\fileicon14.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\ArtPadcirclerubberselected.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -322,47 +322,44 @@ ..\Resources\ArtPadnew.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\ShiftOS.rtf;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\sys_shiftoriumstory.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 ..\Resources\ArtPadmagnify.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ArtPadredo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon10.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\SystemIcons\iconBitnoteWallet.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\ArtPadsquarerubber.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\fileicon15.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\SystemIcons\icongraphicpicker.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\fileicon12.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\SystemIcons\iconvirusscanner.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\fileicon11.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\strings_de.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - ..\Resources\ArtPadredo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\SystemIcons\iconKnowledgeInput.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\ArtPadopen.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\SystemIcons\iconorcwrite.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\SystemIcons\iconunitytoggle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\fileicon9.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\fileicon16.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\SystemIcons\iconfloodgate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\SystemIcons\iconBitnoteDigger.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -370,6 +367,12 @@ ..\SystemIcons\iconColourPicker.fw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ArtPadopen.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon5.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\ArtPadfloodfill.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -379,10 +382,25 @@ ..\Resources\ArtPadRectangle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\IconTerminal.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\SweeperClickFace.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\justthes.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\SweeperLoseFace.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\SweeperNormalFace.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\SweeperWinFace.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\SystemIcons\iconShiftLetters.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\SystemIcons\iconShiftSweeper.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\SystemIcons\iconshutdown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/ShiftOS.WinForms/Resources/Shiftorium.txt b/ShiftOS.WinForms/Resources/Shiftorium.txt index 04cf6ac..2968883 100644 --- a/ShiftOS.WinForms/Resources/Shiftorium.txt +++ b/ShiftOS.WinForms/Resources/Shiftorium.txt @@ -6,12 +6,6 @@ Dependencies: "wm_free_placement;desktop", Description: "Crazy math problems getting you down? Well, this calculator will take care of that!" }, - { - Name: "SL Operating Systems Wordlist", - Cost: 500, - Dependencies: "shiftletters", - Description: "Know a lot about computer operating systems? This upgrade adds a wordlist to ShiftLetters, full of various Linux distros, Windows codenames and other OS names. All for the low price of 500 Codepoints! It's an incredible value but it's true! Upgrade today... except out of ShiftOS!" - }, { Name: "AL Calculator", Cost: 350, @@ -98,6 +92,12 @@ Dependencies: "shiftletters", Description: "This nice wordlist lets you find out the people who contributed to the development of ShiftOS!" }, + { + Name: "SL Operating Systems Wordlist", + Cost: 500, + Dependencies: "shiftletters", + Description: "Know a lot about computer operating systems? This upgrade adds a wordlist to ShiftLetters, full of various Linux distros, Windows codenames and other OS names. All for the low price of 500 Codepoints! It's an incredible value but it's true! Upgrade today... except out of ShiftOS!" + }, { Name: "Panel Notifications", Cost: 150, @@ -779,5 +779,10 @@ Dependencies: "shiftorium_gui", Description: "In the shiftorium GUI but dont know what you can spend because you can't see how many code points are on hand? Well shop easy, because with this upgrade that is now possible! You have to restart the shiftorium for it to work." } - + { + Name: "ShiftSweeper", + Cost: 800, + Dependencies: "app_launcher;shiftletters", + Description: "Getting bored with Pong and ShiftLetters? Try this BRAND NEW game called ShiftSweeper!" + }, ] \ No newline at end of file diff --git a/ShiftOS.WinForms/Resources/SweeperClickFace.png b/ShiftOS.WinForms/Resources/SweeperClickFace.png new file mode 100644 index 0000000000000000000000000000000000000000..c7dee96add9498d8cfc80fe96e5745197c857d7c GIT binary patch literal 680 zcmV;Z0$2TsP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E-^DS16z6k00J0EL_t(oN5z++l>#vkhA99+0Th5hAP`7O zpa4ohAm{;sL?S4G0uTrUMIaDJBm#k$&b99l*we08Naz# zuh%mT+7yx!;BEW;zH~YrSu7TEI-T6eD~zE*%QL&(&W(gAO<+EsOS9R`ruZGM*K76+ z&*CFSVFIJkNLsCy?Du*BZ3n)IinNOKRONyQt!~(`{mJ28n zTB?r|xU1J|ONyQtTI6m#7qF?&*DdNqt&B1~F^C0DlZ&R)X)u9L6HOrW3BEz}6Rg+k zmm>TI#Ng}zPYKYo+0Q@G|6|~r7RF-HbwL zKx;+dvve~8-HzEpV`xBYF^Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E-^DS16z6k00KElL_t(oN5z++kpeLkhA99+0Th5>1_T00 z2T%YdFav@f5J)6~5-0$HKp-gqfj}Y<2n6EYe%a&*OR~w{akt-0W|rj7dvCKZFQJkk zCAW%{#g78G-|w>9?PRrD$$UOnjpyxlE4SNCtKujWzHx+xB`rX}8<5TrTBux#*F17(;`WIs5%ykGKg2uvjdlUazYqF2dvS zP;;1z4IjAyj7B4AG#YX|9(7M~PN$PJn@yQaCc5VpZvaG%^StGbg~TKX*Gf18;G45_ zzj^a4tOPc*IpGX|AXjE_?=kj3CTP`~=<{=Y_9i2BK!^?3{?EFwhw#w-~X6oDebS>U+^73d95N}`5*AXc=M1D00000NkvXXu0mjfrb{$s literal 0 HcmV?d00001 diff --git a/ShiftOS.WinForms/Resources/SweeperNormalFace.png b/ShiftOS.WinForms/Resources/SweeperNormalFace.png new file mode 100644 index 0000000000000000000000000000000000000000..475629885ce3060ee8d20dd806086b4c79209895 GIT binary patch literal 680 zcmV;Z0$2TsP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E-^DS16z6k00J0EL_t(oN5z+~mBK&}hbaI-0Th5hAP`7O zpa4ohAm{;sL?S4G0uTrUMIaDJBm#k$<4bm6Z`fovcgN*>Z{JHYznz(EX8)w|Kx%Fc zsf!;aaJ$`Pzu(Jxy_Usdku|P&yPaIGSEov&QUaUJMnn^WQk~Q3B;9UTrqii=@}0s2$eQ3~!<`C+NfM!v2qwTcXXt+O z<`zZ*pSC7~2~a%#H+Q0Ei&3PT(Cm5*c!Su=E@nkeH>4y8)1$8sO04|Dk6e@ra3{hED(X9D%LhI|1k6}S&dWQ3sr O0000Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E-^DS16z6k00It4L_t(oN5z++l>$KwKq&x00Th5hAP`7O zpa4ohAm{;sL?S4G0uTrUMIaDJBm#lR-QS%Y!)#`my@T8TUf$zvGD&telL?J)q-JSI zUHmG6+wCU%{a)7VwJa8kO!&Rq?c{pBI;%7)C9v6SWHcH{tJRXhU?Ai1SZ1?XCj91E zv)RmSuuUN;0p4~v97?a(lhtY^m&?UzilD;=Th<&72dA-lnZR)^Ev%G28IWQh^kYr1wQ)ye)>S7Fp`l(Y$sCS%?Vz4BvZ(m zt+Q&PjJFJ>O08qL566cy{O^BELTdYK_6dFxs81U51v|M|Zy}HCQvd(}07*qoM6N<$ Ef|eW@qW}N^ literal 0 HcmV?d00001 diff --git a/ShiftOS.WinForms/SystemIcons/iconShiftSweeper.png b/ShiftOS.WinForms/SystemIcons/iconShiftSweeper.png new file mode 100644 index 0000000000000000000000000000000000000000..e5f0ec33477fa2881a21262f1ba15375347a4bac GIT binary patch literal 278 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucLCF%=h?3y^w370~qEv>0#LT=By}Z;C1rt33 zJwsy?=IAP*qBc(##}EturQV!;4F(*a|Ia^mk&*dLNvDdct-jz-)-0=IFQunE?{f9{ zd8C>}F72$%)emzVmK>5krN%9>xxt$`M*gst67QV+FSpL*w1ypcTk`26`})SDW!1TI zbqiV#?hbp!A=EbY>m`Qk$2W9sI4FKf%|kl{WJ=SP2Uofq7EYI3QOUP6@9-bzo2JWm Rtp~b@!PC{xWt~$(69C}`W`O_z literal 0 HcmV?d00001 From f765e3ef33129f6a21641f7ccdb667ea157d7eed Mon Sep 17 00:00:00 2001 From: lempamo Date: Sun, 26 Feb 2017 12:09:52 -0500 Subject: [PATCH 2/9] ss things 2 --- .../Applications/ShiftSweeper.Designer.cs | 54 ++++++++++++++++++- ShiftOS.WinForms/Resources/Shiftorium.txt | 11 +++- 2 files changed, 63 insertions(+), 2 deletions(-) diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs index 374784a..1b75d75 100644 --- a/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs @@ -29,6 +29,10 @@ private void InitializeComponent() { this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.buttonE = new System.Windows.Forms.Button(); + this.buttonM = new System.Windows.Forms.Button(); + this.buttonH = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // @@ -42,13 +46,57 @@ this.pictureBox1.TabIndex = 0; this.pictureBox1.TabStop = false; // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 2; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 39); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 2; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(244, 215); + this.tableLayoutPanel1.TabIndex = 1; + // + // buttonE + // + this.buttonE.Location = new System.Drawing.Point(4, 261); + this.buttonE.Name = "buttonE"; + this.buttonE.Size = new System.Drawing.Size(75, 23); + this.buttonE.TabIndex = 2; + this.buttonE.Text = "Easy"; + this.buttonE.UseVisualStyleBackColor = true; + // + // buttonM + // + this.buttonM.Location = new System.Drawing.Point(86, 261); + this.buttonM.Name = "buttonM"; + this.buttonM.Size = new System.Drawing.Size(75, 23); + this.buttonM.TabIndex = 3; + this.buttonM.Text = "Medium"; + this.buttonM.UseVisualStyleBackColor = true; + // + // buttonH + // + this.buttonH.Location = new System.Drawing.Point(168, 261); + this.buttonH.Name = "buttonH"; + this.buttonH.Size = new System.Drawing.Size(75, 23); + this.buttonH.TabIndex = 4; + this.buttonH.Text = "Hard"; + this.buttonH.UseVisualStyleBackColor = true; + // // ShiftSweeper // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.buttonH); + this.Controls.Add(this.buttonM); + this.Controls.Add(this.buttonE); + this.Controls.Add(this.tableLayoutPanel1); this.Controls.Add(this.pictureBox1); this.Name = "ShiftSweeper"; - this.Size = new System.Drawing.Size(270, 333); + this.Size = new System.Drawing.Size(275, 333); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); @@ -57,5 +105,9 @@ #endregion private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.Button buttonE; + private System.Windows.Forms.Button buttonM; + private System.Windows.Forms.Button buttonH; } } diff --git a/ShiftOS.WinForms/Resources/Shiftorium.txt b/ShiftOS.WinForms/Resources/Shiftorium.txt index 2968883..1c8ca17 100644 --- a/ShiftOS.WinForms/Resources/Shiftorium.txt +++ b/ShiftOS.WinForms/Resources/Shiftorium.txt @@ -778,11 +778,20 @@ Cost: 2500, Dependencies: "shiftorium_gui", Description: "In the shiftorium GUI but dont know what you can spend because you can't see how many code points are on hand? Well shop easy, because with this upgrade that is now possible! You have to restart the shiftorium for it to work." - } + }, + + // SHIFTSWEEPER + { Name: "ShiftSweeper", Cost: 800, Dependencies: "app_launcher;shiftletters", Description: "Getting bored with Pong and ShiftLetters? Try this BRAND NEW game called ShiftSweeper!" }, + { + Name: "ShiftSweeper Medium", + Cost: 900, + Dependencies: "shiftsweeper", + Description: "ShiftSweeper getting too easy? Obviously, since you can only play Easy difficulty! However, with this Medium button, you can get a better challenge, and more codepoints!" + }, ] \ No newline at end of file From 4fba2d86af9c960fb78b1c0a912b6371f21b487d Mon Sep 17 00:00:00 2001 From: lempamo Date: Sun, 26 Feb 2017 13:36:01 -0500 Subject: [PATCH 3/9] setting up minefield --- .../Applications/ShiftSweeper.Designer.cs | 64 +++++++++++++------ ShiftOS.WinForms/Applications/ShiftSweeper.cs | 27 +++++++- ShiftOS.WinForms/Resources/Shiftorium.txt | 6 ++ ShiftOS.WinForms/ShiftOS.WinForms.csproj | 27 ++++++-- 4 files changed, 98 insertions(+), 26 deletions(-) diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs index 1b75d75..f5d7ddd 100644 --- a/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs @@ -29,10 +29,11 @@ private void InitializeComponent() { this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.minefieldPanel = new System.Windows.Forms.TableLayoutPanel(); this.buttonE = new System.Windows.Forms.Button(); this.buttonM = new System.Windows.Forms.Button(); this.buttonH = new System.Windows.Forms.Button(); + this.lblmines = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // @@ -40,24 +41,38 @@ // this.pictureBox1.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.SweeperNormalFace; this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.pictureBox1.Location = new System.Drawing.Point(110, 3); + this.pictureBox1.Location = new System.Drawing.Point(150, 3); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(32, 32); this.pictureBox1.TabIndex = 0; this.pictureBox1.TabStop = false; // - // tableLayoutPanel1 + // minefieldPanel // - this.tableLayoutPanel1.ColumnCount = 2; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 39); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 2; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(244, 215); - this.tableLayoutPanel1.TabIndex = 1; + this.minefieldPanel.ColumnCount = 9; + this.minefieldPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.minefieldPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.minefieldPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.minefieldPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.minefieldPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.minefieldPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.minefieldPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.minefieldPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.minefieldPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.minefieldPanel.Location = new System.Drawing.Point(4, 40); + this.minefieldPanel.Name = "minefieldPanel"; + this.minefieldPanel.RowCount = 9; + this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.minefieldPanel.Size = new System.Drawing.Size(329, 215); + this.minefieldPanel.TabIndex = 1; // // buttonE // @@ -67,10 +82,11 @@ this.buttonE.TabIndex = 2; this.buttonE.Text = "Easy"; this.buttonE.UseVisualStyleBackColor = true; + this.buttonE.Click += new System.EventHandler(this.buttonE_Click); // // buttonM // - this.buttonM.Location = new System.Drawing.Point(86, 261); + this.buttonM.Location = new System.Drawing.Point(129, 261); this.buttonM.Name = "buttonM"; this.buttonM.Size = new System.Drawing.Size(75, 23); this.buttonM.TabIndex = 3; @@ -79,35 +95,47 @@ // // buttonH // - this.buttonH.Location = new System.Drawing.Point(168, 261); + this.buttonH.Location = new System.Drawing.Point(258, 261); this.buttonH.Name = "buttonH"; this.buttonH.Size = new System.Drawing.Size(75, 23); this.buttonH.TabIndex = 4; this.buttonH.Text = "Hard"; this.buttonH.UseVisualStyleBackColor = true; // + // lblmines + // + this.lblmines.AutoSize = true; + this.lblmines.Location = new System.Drawing.Point(188, 3); + this.lblmines.Name = "lblmines"; + this.lblmines.Size = new System.Drawing.Size(47, 13); + this.lblmines.TabIndex = 5; + this.lblmines.Text = "Mines: 0"; + // // ShiftSweeper // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.lblmines); this.Controls.Add(this.buttonH); this.Controls.Add(this.buttonM); this.Controls.Add(this.buttonE); - this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.minefieldPanel); this.Controls.Add(this.pictureBox1); this.Name = "ShiftSweeper"; - this.Size = new System.Drawing.Size(275, 333); + this.Size = new System.Drawing.Size(366, 328); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); + this.PerformLayout(); } #endregion private System.Windows.Forms.PictureBox pictureBox1; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.TableLayoutPanel minefieldPanel; private System.Windows.Forms.Button buttonE; private System.Windows.Forms.Button buttonM; private System.Windows.Forms.Button buttonH; + private System.Windows.Forms.Label lblmines; } } 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(); + } + } } } diff --git a/ShiftOS.WinForms/Resources/Shiftorium.txt b/ShiftOS.WinForms/Resources/Shiftorium.txt index 1c8ca17..dccbd9d 100644 --- a/ShiftOS.WinForms/Resources/Shiftorium.txt +++ b/ShiftOS.WinForms/Resources/Shiftorium.txt @@ -794,4 +794,10 @@ Dependencies: "shiftsweeper", Description: "ShiftSweeper getting too easy? Obviously, since you can only play Easy difficulty! However, with this Medium button, you can get a better challenge, and more codepoints!" }, + { + Name: "ShiftSweeper Hard", + Cost: 900, + Dependencies: "shiftsweeper_medium", + Description: "Is ShiftSweeper still too easy for you? Buy the Hard difficulty and you can try to find 99 mines! It may be extremely difficult, but the reward is massive!" + }, ] \ No newline at end of file diff --git a/ShiftOS.WinForms/ShiftOS.WinForms.csproj b/ShiftOS.WinForms/ShiftOS.WinForms.csproj index e458704..1802675 100644 --- a/ShiftOS.WinForms/ShiftOS.WinForms.csproj +++ b/ShiftOS.WinForms/ShiftOS.WinForms.csproj @@ -178,6 +178,12 @@ ShiftoriumFrontend.cs + + UserControl + + + ShiftSweeper.cs + UserControl @@ -239,6 +245,11 @@ Oobe.cs + + True + True + Resources.resx + @@ -322,6 +333,9 @@ ShiftoriumFrontend.cs + + ShiftSweeper.cs + ShopItemCreator.cs @@ -345,14 +359,9 @@ ResXFileCodeGenerator - Resources.Designer.cs Designer + Resources.Designer.cs - - True - Resources.resx - True - WindowBorder.cs @@ -528,6 +537,10 @@ + + + + @@ -551,8 +564,10 @@ + + From c49c7ac9c68a1815910a80afc45b43e05009137f Mon Sep 17 00:00:00 2001 From: lempamo Date: Sun, 26 Feb 2017 15:02:40 -0500 Subject: [PATCH 4/9] more shiftsweeper stuffs --- ShiftOS.WinForms/Applications/ShiftSweeper.cs | 53 ++++++++ .../Properties/Resources.Designer.cs | 120 ++++++++++++++++++ ShiftOS.WinForms/Properties/Resources.resx | 36 ++++++ ShiftOS.WinForms/Resources/SweeperTile0.png | Bin 0 -> 259 bytes ShiftOS.WinForms/Resources/SweeperTile1.png | Bin 0 -> 285 bytes ShiftOS.WinForms/Resources/SweeperTile2.png | Bin 0 -> 286 bytes ShiftOS.WinForms/Resources/SweeperTile3.png | Bin 0 -> 284 bytes ShiftOS.WinForms/Resources/SweeperTile4.png | Bin 0 -> 285 bytes ShiftOS.WinForms/Resources/SweeperTile5.png | Bin 0 -> 287 bytes ShiftOS.WinForms/Resources/SweeperTile6.png | Bin 0 -> 292 bytes ShiftOS.WinForms/Resources/SweeperTile7.png | Bin 0 -> 282 bytes ShiftOS.WinForms/Resources/SweeperTile8.png | Bin 0 -> 293 bytes .../Resources/SweeperTileBlock.png | Bin 0 -> 185 bytes .../Resources/SweeperTileBomb.png | Bin 0 -> 284 bytes .../Resources/SweeperTileFlag.png | Bin 0 -> 243 bytes 15 files changed, 209 insertions(+) create mode 100644 ShiftOS.WinForms/Resources/SweeperTile0.png create mode 100644 ShiftOS.WinForms/Resources/SweeperTile1.png create mode 100644 ShiftOS.WinForms/Resources/SweeperTile2.png create mode 100644 ShiftOS.WinForms/Resources/SweeperTile3.png create mode 100644 ShiftOS.WinForms/Resources/SweeperTile4.png create mode 100644 ShiftOS.WinForms/Resources/SweeperTile5.png create mode 100644 ShiftOS.WinForms/Resources/SweeperTile6.png create mode 100644 ShiftOS.WinForms/Resources/SweeperTile7.png create mode 100644 ShiftOS.WinForms/Resources/SweeperTile8.png create mode 100644 ShiftOS.WinForms/Resources/SweeperTileBlock.png create mode 100644 ShiftOS.WinForms/Resources/SweeperTileBomb.png create mode 100644 ShiftOS.WinForms/Resources/SweeperTileFlag.png diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.cs index d7c22b4..70c69d7 100644 --- a/ShiftOS.WinForms/Applications/ShiftSweeper.cs +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.cs @@ -19,6 +19,7 @@ namespace ShiftOS.WinForms.Applications { private bool gameplayed = false; private int mineCount = 0; + private int[,] minemap; public ShiftSweeper() { @@ -59,6 +60,58 @@ namespace ShiftOS.WinForms.Applications default: throw new NullReferenceException(); } + makegrid(); + } + + private void makegrid() + { + Random rnd1 = new Random(); + minemap = new int[minefieldPanel.ColumnCount, minefieldPanel.RowCount]; + + for (int x = 0; x < minefieldPanel.ColumnCount; x++) + { + for (int y = 0; y < minefieldPanel.RowCount; y++) + { + minemap[x, y] = 0; + minefieldPanel.Controls.Add(makeButton(x, y), x, y); + } + } + } + + private Button makeButton(int col, int row) + { + Button bttn = new Button(); + + bttn.Text = ""; + bttn.Name = col.ToString() + " " + row.ToString(); + Controls.AddRange(new System.Windows.Forms.Control[] { bttn, }); + bttn.Click += new System.EventHandler(bttnOnclick); + bttn.MouseDown += new MouseEventHandler(mouseDwn); + bttn.MouseUp += new MouseEventHandler(mauseUp); + bttn.MouseHover += new EventHandler(mauseHov); + bttn.BackgroundImage = Properties.Resources.SweeperTileBlock; + + return bttn; + } + + private void mauseHov(object sender, EventArgs e) + { + pictureBox1.BackgroundImage = Properties.Resources.SweeperNormalFace; + } + + private void mauseUp(object sender, MouseEventArgs e) + { + pictureBox1.BackgroundImage = Properties.Resources.SweeperNormalFace; + } + + private void mouseDwn(object sender, EventArgs e) + { + pictureBox1.BackgroundImage = Properties.Resources.SweeperClickFace; + } + + private void bttnOnclick(object sender, EventArgs e) + { + } } } diff --git a/ShiftOS.WinForms/Properties/Resources.Designer.cs b/ShiftOS.WinForms/Properties/Resources.Designer.cs index 05c6c07..beef6ff 100644 --- a/ShiftOS.WinForms/Properties/Resources.Designer.cs +++ b/ShiftOS.WinForms/Properties/Resources.Designer.cs @@ -1026,6 +1026,126 @@ namespace ShiftOS.WinForms.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SweeperTile0 { + get { + object obj = ResourceManager.GetObject("SweeperTile0", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SweeperTile1 { + get { + object obj = ResourceManager.GetObject("SweeperTile1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SweeperTile2 { + get { + object obj = ResourceManager.GetObject("SweeperTile2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SweeperTile3 { + get { + object obj = ResourceManager.GetObject("SweeperTile3", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SweeperTile4 { + get { + object obj = ResourceManager.GetObject("SweeperTile4", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SweeperTile5 { + get { + object obj = ResourceManager.GetObject("SweeperTile5", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SweeperTile6 { + get { + object obj = ResourceManager.GetObject("SweeperTile6", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SweeperTile7 { + get { + object obj = ResourceManager.GetObject("SweeperTile7", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SweeperTile8 { + get { + object obj = ResourceManager.GetObject("SweeperTile8", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SweeperTileBlock { + get { + object obj = ResourceManager.GetObject("SweeperTileBlock", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SweeperTileBomb { + get { + object obj = ResourceManager.GetObject("SweeperTileBomb", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SweeperTileFlag { + get { + object obj = ResourceManager.GetObject("SweeperTileFlag", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/ShiftOS.WinForms/Properties/Resources.resx b/ShiftOS.WinForms/Properties/Resources.resx index aad84ee..8c4b52b 100644 --- a/ShiftOS.WinForms/Properties/Resources.resx +++ b/ShiftOS.WinForms/Properties/Resources.resx @@ -403,4 +403,40 @@ ..\SystemIcons\iconshutdown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\SweeperTile0.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\SweeperTile1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\SweeperTile2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\SweeperTile3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\SweeperTile4.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\SweeperTile5.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\SweeperTile6.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\SweeperTile7.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\SweeperTile8.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\SweeperTileBlock.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\SweeperTileBomb.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\SweeperTileFlag.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/ShiftOS.WinForms/Resources/SweeperTile0.png b/ShiftOS.WinForms/Resources/SweeperTile0.png new file mode 100644 index 0000000000000000000000000000000000000000..c48c3774ee52a73b073ae8dd93d7080d0ca9ddab GIT binary patch literal 259 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}c0*}aI1_r*vAk26?e?qM z&(PR}Il2m{sMyoRF~q`u>$yO#0}4FM7w-MPq?dfQUG=a?XhjOkVV*gK5k24MocL0^ z;g0VI{q;s?_1`?|TBpt4O{3Xiiy rZkqyEVm^I0=f9_+%eeJz)Q>TT-Jad}#Xv(8Xg!0ctDnm{r-UW|73EnX literal 0 HcmV?d00001 diff --git a/ShiftOS.WinForms/Resources/SweeperTile1.png b/ShiftOS.WinForms/Resources/SweeperTile1.png new file mode 100644 index 0000000000000000000000000000000000000000..06819d0930630268a4906b60adc88f02c8bd8dbd GIT binary patch literal 285 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}c0*}aI1_r*vAk26?e?qM z&(PR}Il2m{sMpiQF~q`uYhNQ@gMxt5-~aQ?OfuyTU&_qMk15#h6JY0a%2j<&AwN&K z>>2&~O67e8qW3Ny{NV5Jmg&A^^TWwsFU_;w%Pf5@@~Gd$b8U=SSHAM)NGym6pMb{s z`rEh4o!xBB=h-`!mmg@m{GpF8XGhDOqXpLw{`oZBysqM*Wzaqb-fDK01H1LofDU8u MboFyt=akR{0L;K=<^TWy literal 0 HcmV?d00001 diff --git a/ShiftOS.WinForms/Resources/SweeperTile2.png b/ShiftOS.WinForms/Resources/SweeperTile2.png new file mode 100644 index 0000000000000000000000000000000000000000..eec00e9d4ea3f0ac3171f5ef3510f2e25eff570e GIT binary patch literal 286 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}c0*}aI1_r*vAk26?e?qM z&(PR}Il2m{sL#{IF~q`uYhNQDvm%ev-~aQ=&U88+v(bO<5torEts7wLvoe3~hjYsl zeq1^D@6*)sXY%)2%S%3dUOI7Q%{keZ$rhVb?gz3P=6vNS%G}c0*}aI1_r*vAk26?e?qM z&(PR}Il2m{sK?XAF~q`uYhNQ@gMxt5-~aQ?j513e+DzZL_o1S>ZoplimCMU2o?99G zd8H6Puk!iN!=XFe*$+>@)M6{W?WU*oo0ZJc+dg}|$p}xA-WPB*M)t;sd2_cMo_EG< zkMZ&wf$U~A3yaE)Zf`iNd~}}GhD2-Yk8zwkc`q0A^X2Stxl!E~FZ<-Q@%uj?4%bep ZV$gdb&oe<+GYRM}22WQ%mvv4FO#rG4XpaB@ literal 0 HcmV?d00001 diff --git a/ShiftOS.WinForms/Resources/SweeperTile4.png b/ShiftOS.WinForms/Resources/SweeperTile4.png new file mode 100644 index 0000000000000000000000000000000000000000..f8c3d2b7d75ea3830f1fb17a9064f0956923f7a3 GIT binary patch literal 285 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}c0*}aI1_r*vAk26?e?qM z&(PR}Il2m{sMpiQF~q`uYab)m0Rzopr074FDmH+?% literal 0 HcmV?d00001 diff --git a/ShiftOS.WinForms/Resources/SweeperTile5.png b/ShiftOS.WinForms/Resources/SweeperTile5.png new file mode 100644 index 0000000000000000000000000000000000000000..2b2e4fd5117821f9ec1cecdbe3b2057c02501705 GIT binary patch literal 287 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}c0*}aI1_r*vAk26?e?qM z&(PR}Il2m{sNd7YF~q`uYach)0RtYV>i^#5W~(Q#Ugm$>(jLka-S{fiD|gq!x!(_d zx^nPW#k0BZ<=-8$wz?2Mt8;e+drD^Ik_vbBO+xK*3^Vg4OtnL3i cwDqcGC}p;J=c_Mp6X-MsPgg&ebxsLQ00UoYo&W#< literal 0 HcmV?d00001 diff --git a/ShiftOS.WinForms/Resources/SweeperTile6.png b/ShiftOS.WinForms/Resources/SweeperTile6.png new file mode 100644 index 0000000000000000000000000000000000000000..d8698d069c779edc907a6f2003e5d0f6e7c6009a GIT binary patch literal 292 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}c0*}aI1_r*vAk26?e?qM z&(PR}Il2m{Xo{zcV~BnA1_K`E@BjVJZ_x|#zNUHZz(lo_jOJfyQRZ(y9IV{% z=hcIs6;GRg%kOJ_|03a+>Ura*u_rctiP7A@m^t!SZqhmr>&Pmzqkac@WlvmsKXXUt z?Fp$bcLvqDvv2xx`$)`J&C{1QYnH8g?hEAa7ApTKJK^b7&8NO43a7)Dlz;!Uy7~Fz hsr+?64%cp}W8f8WdU03I*%IhJ22WQ%mvv4FO#o^3bJPF; literal 0 HcmV?d00001 diff --git a/ShiftOS.WinForms/Resources/SweeperTile7.png b/ShiftOS.WinForms/Resources/SweeperTile7.png new file mode 100644 index 0000000000000000000000000000000000000000..ff02afd02a5818e86b5a5ec86e97c32dcadeb97e GIT binary patch literal 282 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}c0*}aI1_r*vAk26?e?qM z&(PR}Il2m{sLRvEF~q`uYab(Di-G|2&;QFeYMCyb=B#`@C8#_>nRR8iX6gB^ygBky z;-zi&+q`!Be`tF_KkujcX%B7hGY86jUjIW*+QqV^P`!AHv&7u3j#C7Ct7k6Wv#@YI z@1i#sdd{WxeR49ky3Q6DXT12{#?Ko4GXvj$n8UlMruFUDPub1Sr>EcjahUsh;48MA XNM5-d)5o)bu43?X^>bP0l+XkKHA!Yg literal 0 HcmV?d00001 diff --git a/ShiftOS.WinForms/Resources/SweeperTile8.png b/ShiftOS.WinForms/Resources/SweeperTile8.png new file mode 100644 index 0000000000000000000000000000000000000000..9703491b82d41eaf3bde9df577677583c19d328a GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}c0*}aI1_r*vAk26?e?qM z&(PR}Il2m{XsV}+V~Bw{IIF_D~q9>&@INZXXT8yC{N$t z{NQ%Wd;R#QpMJLcueDbF^I5fQ`JTmlujr<{4|zXjL+c#pSF-wdoxTO6^<{@05-WPQ zWN#IF^oe^b?`bA-Tee@Zj@#AxX5kr`>uXwcpWN}R{>r!QLxNwax_Zt-<>|YPYi57= j`*d~8zr+0BE6?yNIQreWt^LXp=s*TfS3j3^P6NS%G}c0*}aI1_r*vAk26?e?qM z&(PR}Il2m{NYm5BF~q_@nW5=_$T6P(D_Pxmm&o);d00xAPAD?SQh3@>#umhH{D+-k YD_7WunatNN0yQysy85}Sb4q9e0EWUb#Q*>R literal 0 HcmV?d00001 diff --git a/ShiftOS.WinForms/Resources/SweeperTileBomb.png b/ShiftOS.WinForms/Resources/SweeperTileBomb.png new file mode 100644 index 0000000000000000000000000000000000000000..c03a4a3283ca2a4ec133c0985dfb05a25bed69ca GIT binary patch literal 284 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}c0*}aI1_r*vAk26?e?qM z&(PR}Il2m{sK?XAF~q`uYab(Dg8~op&;QFeDyc4>#vnL7rt7+(=Zu;eQ{G!noci41 zr|H38pLDeUa+g1}Rg?IaDY-NKDRh literal 0 HcmV?d00001 diff --git a/ShiftOS.WinForms/Resources/SweeperTileFlag.png b/ShiftOS.WinForms/Resources/SweeperTileFlag.png new file mode 100644 index 0000000000000000000000000000000000000000..11cedbec49bdc2c94f6f5452ec6981c81f6f5daf GIT binary patch literal 243 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}c0*}aI1_r*vAk26?e?qM z&(PR}Il2m{DB07+F~q|EZJ#680Rs+}zyFu#YVJOGVe7UlcZ@bHKj>)v@!8DskCq+H z*<3rUPI$~=(&PUW;mcS)-KJ_5Q{FV270Vi;|0K2?&*Iu);~~)*eBi3%p@=f(?{*$# i1sj_GOCH=eQ$F?VlqK8Oi_ZXB$KdJe=d#Wzp$P!DGE-Fm literal 0 HcmV?d00001 From 077e0e527106a6d6ab27b31dc07cfd980198d757 Mon Sep 17 00:00:00 2001 From: lempamo Date: Sun, 26 Feb 2017 17:31:19 -0500 Subject: [PATCH 5/9] working so hard --- .../Applications/ShiftSweeper.Designer.cs | 14 ++ ShiftOS.WinForms/Applications/ShiftSweeper.cs | 174 ++++++++++++++++-- ShiftOS.WinForms/Resources/SweeperTile1.png | Bin 285 -> 273 bytes ShiftOS.WinForms/Resources/SweeperTile2.png | Bin 286 -> 275 bytes 4 files changed, 174 insertions(+), 14 deletions(-) diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs index f5d7ddd..729bc95 100644 --- a/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs @@ -34,6 +34,7 @@ this.buttonM = new System.Windows.Forms.Button(); this.buttonH = new System.Windows.Forms.Button(); this.lblmines = new System.Windows.Forms.Label(); + this.lbltime = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // @@ -92,6 +93,7 @@ this.buttonM.TabIndex = 3; this.buttonM.Text = "Medium"; this.buttonM.UseVisualStyleBackColor = true; + this.buttonM.Click += new System.EventHandler(this.buttonM_Click); // // buttonH // @@ -101,6 +103,7 @@ this.buttonH.TabIndex = 4; this.buttonH.Text = "Hard"; this.buttonH.UseVisualStyleBackColor = true; + this.buttonH.Click += new System.EventHandler(this.buttonH_Click); // // lblmines // @@ -111,10 +114,20 @@ this.lblmines.TabIndex = 5; this.lblmines.Text = "Mines: 0"; // + // lbltime + // + this.lbltime.AutoSize = true; + this.lbltime.Location = new System.Drawing.Point(188, 22); + this.lbltime.Name = "lbltime"; + this.lbltime.Size = new System.Drawing.Size(42, 13); + this.lbltime.TabIndex = 6; + this.lbltime.Text = "Time: 0"; + // // ShiftSweeper // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.lbltime); this.Controls.Add(this.lblmines); this.Controls.Add(this.buttonH); this.Controls.Add(this.buttonM); @@ -137,5 +150,6 @@ private System.Windows.Forms.Button buttonM; private System.Windows.Forms.Button buttonH; private System.Windows.Forms.Label lblmines; + private System.Windows.Forms.Label lbltime; } } diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.cs index 70c69d7..360ef16 100644 --- a/ShiftOS.WinForms/Applications/ShiftSweeper.cs +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.cs @@ -19,36 +19,33 @@ namespace ShiftOS.WinForms.Applications { private bool gameplayed = false; private int mineCount = 0; - private int[,] minemap; + private int[,] minemap; //Represents status of tiles. 0-8 = how many mines surrounding. -1 = mine. -2 = flagged mine. -3 to -11 = flagged safe. + private Timer ticking = new Timer(); + private int minetimer; - public ShiftSweeper() - { - InitializeComponent(); - } + public ShiftSweeper() { InitializeComponent(); } public void OnLoad() { buttonE.Visible = true; buttonM.Visible = ShiftoriumFrontend.UpgradeInstalled("shiftsweeper_medium"); buttonH.Visible = ShiftoriumFrontend.UpgradeInstalled("shiftsweeper_hard"); + ticking.Interval = 1000; } public void OnSkinLoad() { } public bool OnUnload() { return true; } - public void OnUpgrade() - { - - } + public void OnUpgrade() { } - private void buttonE_Click(object sender, EventArgs e) - { - startGame(0); - } + private void buttonE_Click(object sender, EventArgs e) { startGame(0); } private void startGame(int d) { + lbltime.Text = "Time: 0"; + minetimer = 0; + ticking.Start(); switch (d) { case 0: @@ -57,9 +54,26 @@ namespace ShiftOS.WinForms.Applications minefieldPanel.RowCount = 9; break; + case 1: + mineCount = 40; + minefieldPanel.ColumnCount = 16; + minefieldPanel.RowCount = 16; + break; + + case 2: + mineCount = 99; + minefieldPanel.ColumnCount = 30; + minefieldPanel.RowCount = 16; + break; + default: throw new NullReferenceException(); } + lblmines.Text = "Mines: " + mineCount.ToString(); + buttonE.Enabled = false; + buttonM.Enabled = false; + buttonH.Enabled = false; + gameplayed = true; makegrid(); } @@ -68,6 +82,7 @@ namespace ShiftOS.WinForms.Applications Random rnd1 = new Random(); minemap = new int[minefieldPanel.ColumnCount, minefieldPanel.RowCount]; + // Makes the minefield full of buttons for (int x = 0; x < minefieldPanel.ColumnCount; x++) { for (int y = 0; y < minefieldPanel.RowCount; y++) @@ -76,6 +91,43 @@ namespace ShiftOS.WinForms.Applications minefieldPanel.Controls.Add(makeButton(x, y), x, y); } } + + // Placing the mines + int currminecount = mineCount; + while (currminecount > 0) + { + int mineX = rnd1.Next(minefieldPanel.ColumnCount); + int mineY = rnd1.Next(minefieldPanel.RowCount); + + if (minemap[mineX, mineY] == 0) + { + minemap[mineX, mineY] = -1; + currminecount--; + } + } + + // Setting the numbers + for (int x = 0; x < minefieldPanel.ColumnCount; x++) + { + for (int y = 0; y < minefieldPanel.RowCount; y++) + { + if (minemap[x, y] != -1) + { + int numMines = 0; + for (int xx = -1; xx < 2; xx++) + { + for (int yy = -1; yy < 2; yy++) + { + if (x + xx >= 0 && y + yy >= 0 && x + xx < minefieldPanel.ColumnCount && y + yy < minefieldPanel.RowCount) + { + if (minemap[x + xx, y + yy] == -1) numMines++; + } + } + } + minemap[x, y] = numMines; + } + } + } } private Button makeButton(int col, int row) @@ -85,15 +137,28 @@ namespace ShiftOS.WinForms.Applications bttn.Text = ""; bttn.Name = col.ToString() + " " + row.ToString(); Controls.AddRange(new System.Windows.Forms.Control[] { bttn, }); + bttn.Size = new System.Drawing.Size(minefieldPanel.Width / minefieldPanel.ColumnCount, minefieldPanel.Height / minefieldPanel.RowCount); bttn.Click += new System.EventHandler(bttnOnclick); bttn.MouseDown += new MouseEventHandler(mouseDwn); bttn.MouseUp += new MouseEventHandler(mauseUp); bttn.MouseHover += new EventHandler(mauseHov); bttn.BackgroundImage = Properties.Resources.SweeperTileBlock; + bttn.MouseClick += new System.Windows.Forms.MouseEventHandler(this.bttnOnRightClick); return bttn; } + private void bttnOnRightClick(object sender, MouseEventArgs e) + { + if (!ticking.Enabled) return; + + Button bttnClick = sender as Button; + + if (bttnClick == null) return; + + if (e.Button == MouseButtons.Left | e.Button == MouseButtons.Middle) return; + } + private void mauseHov(object sender, EventArgs e) { pictureBox1.BackgroundImage = Properties.Resources.SweeperNormalFace; @@ -111,7 +176,88 @@ namespace ShiftOS.WinForms.Applications private void bttnOnclick(object sender, EventArgs e) { - + if (!ticking.Enabled) return; + + Button bttnClick = sender as Button; + + if (bttnClick == null) return; //not a button. + + string[] split = bttnClick.Name.Split(new Char[] { ' ' }); + + int x = System.Convert.ToInt32(split[0]); + int y = System.Convert.ToInt32(split[1]); + + + + if (minemap[x, y] == -1) + { + ticking.Enabled = false; + + buttonE.Enabled = true; + buttonM.Enabled = true; + buttonH.Enabled = true; + + for (int xx = 0; xx < minefieldPanel.ColumnCount; xx++) + { + for (int yy = 0; yy < minefieldPanel.RowCount; yy++) + { + minefieldPanel.GetControlFromPosition(xx, yy).Enabled = false; + if (minemap[xx, yy] == -1) + { + minefieldPanel.GetControlFromPosition(xx, yy).BackgroundImage = Properties.Resources.SweeperTileBomb; + } + + } + } + } + else if (minemap[x, y] < -1) return; + else removeBlank(x, y); } + + private void removeBlank(int x, int y) + { + if (!minefieldPanel.GetControlFromPosition(x, y).Enabled) return; + else + { + minefieldPanel.GetControlFromPosition(x, y).Enabled = false; + trueform(x, y); + for (int xx = -1; xx < 2; xx++) + { + for (int yy = -1; yy < 2; yy++) + { + if (x + xx >= 0 && y + yy >= 0 && x + xx < minefieldPanel.ColumnCount && y + yy < minefieldPanel.RowCount) + { + if (minefieldPanel.GetControlFromPosition(x + xx, y + yy).Enabled && minemap[x+xx,y+yy] != -1 && minemap[x + xx, y + yy] != -2) + { + minefieldPanel.GetControlFromPosition(x, y).Enabled = false; + if (minemap[x, y] == 0) + { + removeBlank(x + xx, y + yy); + } + } + + } + } + } + } + } + + private void trueform(int x, int y) + { + Button bttn = (Button)minefieldPanel.GetControlFromPosition(x, y); + if (minemap[x,y] == 0) bttn.BackgroundImage = Properties.Resources.SweeperTile0; + else if (minemap[x, y] == 1) bttn.BackgroundImage = Properties.Resources.SweeperTile1; + else if (minemap[x, y] == 2) bttn.BackgroundImage = Properties.Resources.SweeperTile2; + else if (minemap[x, y] == 3) bttn.BackgroundImage = Properties.Resources.SweeperTile3; + else if (minemap[x, y] == 4) bttn.BackgroundImage = Properties.Resources.SweeperTile4; + else if (minemap[x, y] == 5) bttn.BackgroundImage = Properties.Resources.SweeperTile5; + else if (minemap[x, y] == 6) bttn.BackgroundImage = Properties.Resources.SweeperTile6; + else if (minemap[x, y] == 7) bttn.BackgroundImage = Properties.Resources.SweeperTile7; + else if (minemap[x, y] == 8) bttn.BackgroundImage = Properties.Resources.SweeperTile8; + } + + private void buttonM_Click(object sender, EventArgs e) { startGame(1); } + + private void buttonH_Click(object sender, EventArgs e) { startGame(2); } } } diff --git a/ShiftOS.WinForms/Resources/SweeperTile1.png b/ShiftOS.WinForms/Resources/SweeperTile1.png index 06819d0930630268a4906b60adc88f02c8bd8dbd..5fc6871a858ef8d4c84c1929fa5c75f089654ecf 100644 GIT binary patch delta 188 zcmV;t07L(s0+9lcB#|)~3c>&Y4#EKyC`y2lQz(CqNklkh>GZx^prwCn`#F9cEzQJIr`Ie?`hfH;wvUPZ!4!3;(TsjeHFX z0#1Mb&o?v4lskMWGbcZ$V7pI%ozE#(^*x3BJms=y^y@2?_Z5iVyLj+}zrS0i`;yHM zCx5*(&w4Mj^tH&NeiP5NF=k!)%9kUtASQeQ8t3b8-zs-@vo)V*?^s@bpzZR9KE9kC qEq9cU7F<90=hJlax{8OELHihZtJzf!?AA+T00K`}KbLh*2~7ZnMOUu? diff --git a/ShiftOS.WinForms/Resources/SweeperTile2.png b/ShiftOS.WinForms/Resources/SweeperTile2.png index eec00e9d4ea3f0ac3171f5ef3510f2e25eff570e..22c5f0274506591d608f3da62aea0a98a7f619e6 100644 GIT binary patch delta 190 zcmV;v073tr0+RxeB#|)~3c>&Y4#EKyC`y2lQz(CsNkl zWm7pKHkp*2g=j+ZVN$+xqASmV@@s?j%d@WZf4B?ZvBB$?n$yHR@5pRrb1w0YHn6gs znUSNH*-DE>oi?ztBgXAzwz3i9_S(S8HfwaJgq@XT*62>*jt#6V=TUesz5`a4d6f8$ s4Xh^IBE0M6*9PmCXI=T>56_YE1*PdT_u&op9smFU07*qoM6N<$f~t&Mr2qf` delta 199 zcmV;&0671X0-gepBnkm@Qb$4nuFf3kks%uj!vFvd!vV){sAQ2wD1VMgL_t(IPqmJL z4g(hOsQ|3@Xn`T_|(Dv@|AbyAKry`bnx?~k*R#n z9qD5@vLxS82Qh5*O5F215W_EAnyZ5tPPo!s`WOyeX|4`pIC_=N6r07c^(*-u9mKHJ zD{;^7Kn%Cx9Ua8*79@5zhff{sFJF1*4?jFdsV{~wF#7$_SYQAE002ovPDHLkV1g(z BSmFQx From dd65c54eda491ce8ac6c035b983e52ec096ec74c Mon Sep 17 00:00:00 2001 From: lempamo Date: Sun, 26 Feb 2017 18:41:41 -0500 Subject: [PATCH 6/9] by george, i think ive finished it! --- .../Applications/ShiftSweeper.Designer.cs | 24 +++++ ShiftOS.WinForms/Applications/ShiftSweeper.cs | 93 +++++++++++++++++-- 2 files changed, 111 insertions(+), 6 deletions(-) diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs index 729bc95..b5cc13f 100644 --- a/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs @@ -35,6 +35,8 @@ this.buttonH = new System.Windows.Forms.Button(); this.lblmines = new System.Windows.Forms.Label(); this.lbltime = new System.Windows.Forms.Label(); + this.lblinfo = new System.Windows.Forms.Label(); + this.lblinfo2 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // @@ -123,10 +125,30 @@ this.lbltime.TabIndex = 6; this.lbltime.Text = "Time: 0"; // + // lblinfo + // + this.lblinfo.AutoSize = true; + this.lblinfo.Location = new System.Drawing.Point(4, 4); + this.lblinfo.Name = "lblinfo"; + this.lblinfo.Size = new System.Drawing.Size(129, 13); + this.lblinfo.TabIndex = 7; + this.lblinfo.Text = "Left Click to uncover tiles."; + // + // lblinfo2 + // + this.lblinfo2.AutoSize = true; + this.lblinfo2.Location = new System.Drawing.Point(4, 22); + this.lblinfo2.Name = "lblinfo2"; + this.lblinfo2.Size = new System.Drawing.Size(114, 13); + this.lblinfo2.TabIndex = 8; + this.lblinfo2.Text = "Right Click to flag tiles."; + // // ShiftSweeper // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.lblinfo2); + this.Controls.Add(this.lblinfo); this.Controls.Add(this.lbltime); this.Controls.Add(this.lblmines); this.Controls.Add(this.buttonH); @@ -151,5 +173,7 @@ private System.Windows.Forms.Button buttonH; private System.Windows.Forms.Label lblmines; private System.Windows.Forms.Label lbltime; + private System.Windows.Forms.Label lblinfo; + private System.Windows.Forms.Label lblinfo2; } } diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.cs index 360ef16..0f9c700 100644 --- a/ShiftOS.WinForms/Applications/ShiftSweeper.cs +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.cs @@ -19,6 +19,7 @@ namespace ShiftOS.WinForms.Applications { private bool gameplayed = false; private int mineCount = 0; + private int origminecount; private int[,] minemap; //Represents status of tiles. 0-8 = how many mines surrounding. -1 = mine. -2 = flagged mine. -3 to -11 = flagged safe. private Timer ticking = new Timer(); private int minetimer; @@ -41,8 +42,26 @@ namespace ShiftOS.WinForms.Applications private void buttonE_Click(object sender, EventArgs e) { startGame(0); } + private void clearPreviousGame() + { + if (minemap != null) for (int x = 0; x < minefieldPanel.ColumnCount; x++) + { + for (int y = 0; y < minefieldPanel.RowCount; y++) + { + minemap[x, y] = 0; + + if (minefieldPanel.GetControlFromPosition(x,y) != null) + { + minefieldPanel.Controls.Remove(minefieldPanel.GetControlFromPosition(x, y)); + } + } + } + + } + private void startGame(int d) { + clearPreviousGame(); lbltime.Text = "Time: 0"; minetimer = 0; ticking.Start(); @@ -69,6 +88,7 @@ namespace ShiftOS.WinForms.Applications default: throw new NullReferenceException(); } + origminecount = mineCount; lblmines.Text = "Mines: " + mineCount.ToString(); buttonE.Enabled = false; buttonM.Enabled = false; @@ -155,23 +175,82 @@ namespace ShiftOS.WinForms.Applications Button bttnClick = sender as Button; if (bttnClick == null) return; - if (e.Button == MouseButtons.Left | e.Button == MouseButtons.Middle) return; + if (!bttnClick.Enabled) return; + + string[] split = bttnClick.Name.Split(new Char[] { ' ' }); + + int x = System.Convert.ToInt32(split[0]); + int y = System.Convert.ToInt32(split[1]); + + if (minemap[x,y] < -1) + { + minemap[x, y] = (minemap[x, y] * -1) - 3; + bttnClick.BackgroundImage = Properties.Resources.SweeperTileBlock; + mineCount++; + } + else + { + minemap[x, y] = (minemap[x, y] * -1) - 3; + bttnClick.BackgroundImage = Properties.Resources.SweeperTileFlag; + mineCount--; + } + + bool wrongflags = false; + if (mineCount == 0) + { + for (int xx = 0; xx < minefieldPanel.ColumnCount; xx++) + { + if (wrongflags) break; + for (int yy = 0; yy < minefieldPanel.RowCount; yy++) + { + if (wrongflags) break; + if (minemap[xx,yy] == -1 | minemap[xx,yy] == -2) wrongflags = true; + } + } + if (!wrongflags) + { + ticking.Enabled = false; + + buttonE.Enabled = true; + buttonM.Enabled = true; + buttonH.Enabled = true; + + for (int xx = 0; xx < minefieldPanel.ColumnCount; xx++) + { + for (int yy = 0; yy < minefieldPanel.RowCount; yy++) + { + minefieldPanel.GetControlFromPosition(xx, yy).Enabled = false; + } + } + + Int32 cp = 0; + origminecount = origminecount * 10; + if (minetimer < 31) cp = (origminecount * 3); + if (minetimer < 61) cp = (Int32)(origminecount * 2.5); + if (minetimer < 91) cp = (origminecount * 2); + if (minetimer < 121) cp = (Int32)(origminecount * 1.5); + if (minetimer > 120) cp = (origminecount * 1); + SaveSystem.TransferCodepointsFrom("shiftsweeper", cp); + pictureBox1.BackgroundImage = Properties.Resources.SweeperWinFace; + //TODO add win + } + } } private void mauseHov(object sender, EventArgs e) { - pictureBox1.BackgroundImage = Properties.Resources.SweeperNormalFace; + if (ticking.Enabled) pictureBox1.BackgroundImage = Properties.Resources.SweeperNormalFace; } private void mauseUp(object sender, MouseEventArgs e) { - pictureBox1.BackgroundImage = Properties.Resources.SweeperNormalFace; + if (!ticking.Enabled) pictureBox1.BackgroundImage = Properties.Resources.SweeperNormalFace; } private void mouseDwn(object sender, EventArgs e) { - pictureBox1.BackgroundImage = Properties.Resources.SweeperClickFace; + if (!ticking.Enabled) pictureBox1.BackgroundImage = Properties.Resources.SweeperClickFace; } private void bttnOnclick(object sender, EventArgs e) @@ -197,6 +276,8 @@ namespace ShiftOS.WinForms.Applications buttonM.Enabled = true; buttonH.Enabled = true; + pictureBox1.BackgroundImage = Properties.Resources.SweeperLoseFace; + for (int xx = 0; xx < minefieldPanel.ColumnCount; xx++) { for (int yy = 0; yy < minefieldPanel.RowCount; yy++) @@ -229,8 +310,8 @@ namespace ShiftOS.WinForms.Applications { if (minefieldPanel.GetControlFromPosition(x + xx, y + yy).Enabled && minemap[x+xx,y+yy] != -1 && minemap[x + xx, y + yy] != -2) { - minefieldPanel.GetControlFromPosition(x, y).Enabled = false; - if (minemap[x, y] == 0) + minefieldPanel.GetControlFromPosition(x + xx, y + yy).Enabled = false; + if (minemap[x + xx, y + yy] == 0) { removeBlank(x + xx, y + yy); } From c37f4a7874416ff68e2e75f50f1c6802c9e3bb20 Mon Sep 17 00:00:00 2001 From: lempamo Date: Sun, 26 Feb 2017 20:36:01 -0500 Subject: [PATCH 7/9] almost there --- .../Applications/ShiftSweeper.Designer.cs | 40 ++- ShiftOS.WinForms/Applications/ShiftSweeper.cs | 235 +++++++++--------- ShiftOS.WinForms/ShiftOS.WinForms.csproj | 12 + 3 files changed, 154 insertions(+), 133 deletions(-) diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs index b5cc13f..691bdb4 100644 --- a/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs @@ -37,14 +37,17 @@ this.lbltime = new System.Windows.Forms.Label(); this.lblinfo = new System.Windows.Forms.Label(); this.lblinfo2 = new System.Windows.Forms.Label(); + this.flagButton = new System.Windows.Forms.PictureBox(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.flagButton)).BeginInit(); this.SuspendLayout(); // // pictureBox1 // this.pictureBox1.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.SweeperNormalFace; this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.pictureBox1.Location = new System.Drawing.Point(150, 3); + this.pictureBox1.Image = global::ShiftOS.WinForms.Properties.Resources.SweeperNormalFace; + this.pictureBox1.Location = new System.Drawing.Point(222, 3); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(32, 32); this.pictureBox1.TabIndex = 0; @@ -74,12 +77,12 @@ this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.Size = new System.Drawing.Size(329, 215); + this.minefieldPanel.Size = new System.Drawing.Size(471, 241); this.minefieldPanel.TabIndex = 1; // // buttonE // - this.buttonE.Location = new System.Drawing.Point(4, 261); + this.buttonE.Location = new System.Drawing.Point(4, 287); this.buttonE.Name = "buttonE"; this.buttonE.Size = new System.Drawing.Size(75, 23); this.buttonE.TabIndex = 2; @@ -89,7 +92,7 @@ // // buttonM // - this.buttonM.Location = new System.Drawing.Point(129, 261); + this.buttonM.Location = new System.Drawing.Point(201, 287); this.buttonM.Name = "buttonM"; this.buttonM.Size = new System.Drawing.Size(75, 23); this.buttonM.TabIndex = 3; @@ -99,7 +102,7 @@ // // buttonH // - this.buttonH.Location = new System.Drawing.Point(258, 261); + this.buttonH.Location = new System.Drawing.Point(400, 287); this.buttonH.Name = "buttonH"; this.buttonH.Size = new System.Drawing.Size(75, 23); this.buttonH.TabIndex = 4; @@ -110,7 +113,7 @@ // lblmines // this.lblmines.AutoSize = true; - this.lblmines.Location = new System.Drawing.Point(188, 3); + this.lblmines.Location = new System.Drawing.Point(272, 4); this.lblmines.Name = "lblmines"; this.lblmines.Size = new System.Drawing.Size(47, 13); this.lblmines.TabIndex = 5; @@ -119,7 +122,7 @@ // lbltime // this.lbltime.AutoSize = true; - this.lbltime.Location = new System.Drawing.Point(188, 22); + this.lbltime.Location = new System.Drawing.Point(272, 22); this.lbltime.Name = "lbltime"; this.lbltime.Size = new System.Drawing.Size(42, 13); this.lbltime.TabIndex = 6; @@ -130,23 +133,34 @@ this.lblinfo.AutoSize = true; this.lblinfo.Location = new System.Drawing.Point(4, 4); this.lblinfo.Name = "lblinfo"; - this.lblinfo.Size = new System.Drawing.Size(129, 13); + this.lblinfo.Size = new System.Drawing.Size(108, 13); this.lblinfo.TabIndex = 7; - this.lblinfo.Text = "Left Click to uncover tiles."; + this.lblinfo.Text = "Click to uncover tiles."; // // lblinfo2 // this.lblinfo2.AutoSize = true; this.lblinfo2.Location = new System.Drawing.Point(4, 22); this.lblinfo2.Name = "lblinfo2"; - this.lblinfo2.Size = new System.Drawing.Size(114, 13); + this.lblinfo2.Size = new System.Drawing.Size(128, 13); this.lblinfo2.TabIndex = 8; - this.lblinfo2.Text = "Right Click to flag tiles."; + this.lblinfo2.Text = "Right Button: Toggle Flag"; + // + // flagButton + // + this.flagButton.Image = global::ShiftOS.WinForms.Properties.Resources.SweeperTileBlock; + this.flagButton.Location = new System.Drawing.Point(455, 15); + this.flagButton.Name = "flagButton"; + this.flagButton.Size = new System.Drawing.Size(20, 20); + this.flagButton.TabIndex = 9; + this.flagButton.TabStop = false; + this.flagButton.Click += new System.EventHandler(this.flagButton_Click); // // ShiftSweeper // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.flagButton); this.Controls.Add(this.lblinfo2); this.Controls.Add(this.lblinfo); this.Controls.Add(this.lbltime); @@ -157,8 +171,9 @@ this.Controls.Add(this.minefieldPanel); this.Controls.Add(this.pictureBox1); this.Name = "ShiftSweeper"; - this.Size = new System.Drawing.Size(366, 328); + this.Size = new System.Drawing.Size(536, 358); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.flagButton)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -175,5 +190,6 @@ private System.Windows.Forms.Label lbltime; private System.Windows.Forms.Label lblinfo; private System.Windows.Forms.Label lblinfo2; + private System.Windows.Forms.PictureBox flagButton; } } diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.cs index 0f9c700..4b83b3f 100644 --- a/ShiftOS.WinForms/Applications/ShiftSweeper.cs +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.cs @@ -18,6 +18,7 @@ namespace ShiftOS.WinForms.Applications public partial class ShiftSweeper : UserControl, IShiftOSWindow { private bool gameplayed = false; + private bool flagtime = false; private int mineCount = 0; private int origminecount; private int[,] minemap; //Represents status of tiles. 0-8 = how many mines surrounding. -1 = mine. -2 = flagged mine. -3 to -11 = flagged safe. @@ -32,6 +33,13 @@ namespace ShiftOS.WinForms.Applications buttonM.Visible = ShiftoriumFrontend.UpgradeInstalled("shiftsweeper_medium"); buttonH.Visible = ShiftoriumFrontend.UpgradeInstalled("shiftsweeper_hard"); ticking.Interval = 1000; + ticking.Tick += Ticking_Tick; + } + + private void Ticking_Tick(object sender, EventArgs e) + { + minetimer++; + lbltime.Text = "Time: " + minetimer.ToString(); } public void OnSkinLoad() { } @@ -61,6 +69,7 @@ namespace ShiftOS.WinForms.Applications private void startGame(int d) { + pictureBox1.Image = Properties.Resources.SweeperNormalFace; clearPreviousGame(); lbltime.Text = "Time: 0"; minetimer = 0; @@ -157,102 +166,14 @@ namespace ShiftOS.WinForms.Applications bttn.Text = ""; bttn.Name = col.ToString() + " " + row.ToString(); Controls.AddRange(new System.Windows.Forms.Control[] { bttn, }); - bttn.Size = new System.Drawing.Size(minefieldPanel.Width / minefieldPanel.ColumnCount, minefieldPanel.Height / minefieldPanel.RowCount); + bttn.Size = new System.Drawing.Size(minefieldPanel.Width / minefieldPanel.ColumnCount, (minefieldPanel.Height / minefieldPanel.RowCount) + 10); bttn.Click += new System.EventHandler(bttnOnclick); - bttn.MouseDown += new MouseEventHandler(mouseDwn); - bttn.MouseUp += new MouseEventHandler(mauseUp); - bttn.MouseHover += new EventHandler(mauseHov); bttn.BackgroundImage = Properties.Resources.SweeperTileBlock; - bttn.MouseClick += new System.Windows.Forms.MouseEventHandler(this.bttnOnRightClick); + bttn.BackgroundImageLayout = ImageLayout.Stretch; return bttn; } - private void bttnOnRightClick(object sender, MouseEventArgs e) - { - if (!ticking.Enabled) return; - - Button bttnClick = sender as Button; - - if (bttnClick == null) return; - if (e.Button == MouseButtons.Left | e.Button == MouseButtons.Middle) return; - if (!bttnClick.Enabled) return; - - string[] split = bttnClick.Name.Split(new Char[] { ' ' }); - - int x = System.Convert.ToInt32(split[0]); - int y = System.Convert.ToInt32(split[1]); - - if (minemap[x,y] < -1) - { - minemap[x, y] = (minemap[x, y] * -1) - 3; - bttnClick.BackgroundImage = Properties.Resources.SweeperTileBlock; - mineCount++; - } - else - { - minemap[x, y] = (minemap[x, y] * -1) - 3; - bttnClick.BackgroundImage = Properties.Resources.SweeperTileFlag; - mineCount--; - } - - bool wrongflags = false; - if (mineCount == 0) - { - for (int xx = 0; xx < minefieldPanel.ColumnCount; xx++) - { - if (wrongflags) break; - for (int yy = 0; yy < minefieldPanel.RowCount; yy++) - { - if (wrongflags) break; - if (minemap[xx,yy] == -1 | minemap[xx,yy] == -2) wrongflags = true; - } - } - if (!wrongflags) - { - ticking.Enabled = false; - - buttonE.Enabled = true; - buttonM.Enabled = true; - buttonH.Enabled = true; - - for (int xx = 0; xx < minefieldPanel.ColumnCount; xx++) - { - for (int yy = 0; yy < minefieldPanel.RowCount; yy++) - { - minefieldPanel.GetControlFromPosition(xx, yy).Enabled = false; - } - } - - Int32 cp = 0; - origminecount = origminecount * 10; - if (minetimer < 31) cp = (origminecount * 3); - if (minetimer < 61) cp = (Int32)(origminecount * 2.5); - if (minetimer < 91) cp = (origminecount * 2); - if (minetimer < 121) cp = (Int32)(origminecount * 1.5); - if (minetimer > 120) cp = (origminecount * 1); - SaveSystem.TransferCodepointsFrom("shiftsweeper", cp); - pictureBox1.BackgroundImage = Properties.Resources.SweeperWinFace; - //TODO add win - } - } - } - - private void mauseHov(object sender, EventArgs e) - { - if (ticking.Enabled) pictureBox1.BackgroundImage = Properties.Resources.SweeperNormalFace; - } - - private void mauseUp(object sender, MouseEventArgs e) - { - if (!ticking.Enabled) pictureBox1.BackgroundImage = Properties.Resources.SweeperNormalFace; - } - - private void mouseDwn(object sender, EventArgs e) - { - if (!ticking.Enabled) pictureBox1.BackgroundImage = Properties.Resources.SweeperClickFace; - } - private void bttnOnclick(object sender, EventArgs e) { if (!ticking.Enabled) return; @@ -267,56 +188,114 @@ namespace ShiftOS.WinForms.Applications int y = System.Convert.ToInt32(split[1]); - - if (minemap[x, y] == -1) + if (!flagtime) { - ticking.Enabled = false; - - buttonE.Enabled = true; - buttonM.Enabled = true; - buttonH.Enabled = true; - - pictureBox1.BackgroundImage = Properties.Resources.SweeperLoseFace; - - for (int xx = 0; xx < minefieldPanel.ColumnCount; xx++) + if (minemap[x, y] == -1) { - for (int yy = 0; yy < minefieldPanel.RowCount; yy++) + ticking.Enabled = false; + + buttonE.Enabled = true; + buttonM.Enabled = true; + buttonH.Enabled = true; + + pictureBox1.BackgroundImage = Properties.Resources.SweeperLoseFace; + + for (int xx = 0; xx < minefieldPanel.ColumnCount; xx++) { - minefieldPanel.GetControlFromPosition(xx, yy).Enabled = false; - if (minemap[xx, yy] == -1) + for (int yy = 0; yy < minefieldPanel.RowCount; yy++) { - minefieldPanel.GetControlFromPosition(xx, yy).BackgroundImage = Properties.Resources.SweeperTileBomb; + pictureBox1.BackgroundImage = Properties.Resources.SweeperLoseFace; + minefieldPanel.GetControlFromPosition(xx, yy).Enabled = false; + if (minemap[xx, yy] == -1) + { + minefieldPanel.GetControlFromPosition(xx, yy).BackgroundImage = Properties.Resources.SweeperTileBomb; + } + + } + } + pictureBox1.Image = Properties.Resources.SweeperLoseFace; + } + else if (minemap[x, y] < -1) return; + else removeBlank(x, y); + } + else + { + if (!bttnClick.Enabled) return; + + if (minemap[x, y] < -1) + { + minemap[x, y] = (minemap[x, y] * -1) - 3; + bttnClick.BackgroundImage = Properties.Resources.SweeperTileBlock; + mineCount++; + } + else + { + minemap[x, y] = (minemap[x, y] * -1) - 3; + bttnClick.BackgroundImage = Properties.Resources.SweeperTileFlag; + mineCount--; + } + lblmines.Text = "Mines: " + mineCount.ToString(); + bool wrongflags = false; + if (mineCount == 0) + { + for (int xx = 0; xx < minefieldPanel.ColumnCount; xx++) + { + if (wrongflags) break; + for (int yy = 0; yy < minefieldPanel.RowCount; yy++) + { + if (wrongflags) break; + if (minemap[xx, yy] < -2) wrongflags = true; + } + } + if (!wrongflags) + { + ticking.Enabled = false; + + buttonE.Enabled = true; + buttonM.Enabled = true; + buttonH.Enabled = true; + + for (int xx = 0; xx < minefieldPanel.ColumnCount; xx++) + { + for (int yy = 0; yy < minefieldPanel.RowCount; yy++) + { + minefieldPanel.GetControlFromPosition(xx, yy).Enabled = false; + } } + Int32 cp = 0; + origminecount = origminecount * 10; + if (minetimer < 31) cp = (origminecount * 3); + if (minetimer < 61) cp = (Int32)(origminecount * 2.5); + if (minetimer < 91) cp = (origminecount * 2); + if (minetimer < 121) cp = (Int32)(origminecount * 1.5); + if (minetimer > 120) cp = (origminecount * 1); + SaveSystem.TransferCodepointsFrom("shiftsweeper", cp); + pictureBox1.Image = Properties.Resources.SweeperWinFace; } } } - else if (minemap[x, y] < -1) return; - else removeBlank(x, y); } private void removeBlank(int x, int y) { - if (!minefieldPanel.GetControlFromPosition(x, y).Enabled) return; - else + minefieldPanel.GetControlFromPosition(x, y).Enabled = false; + trueform(x, y); + if (minemap[x, y] != 0) return; + for (int xx = -1; xx < 2; xx++) { - minefieldPanel.GetControlFromPosition(x, y).Enabled = false; - trueform(x, y); - for (int xx = -1; xx < 2; xx++) + for (int yy = -1; yy < 2; yy++) { - for (int yy = -1; yy < 2; yy++) + if (x + xx >= 0 && y + yy >= 0 && x + xx < minefieldPanel.ColumnCount && y + yy < minefieldPanel.RowCount) { - if (x + xx >= 0 && y + yy >= 0 && x + xx < minefieldPanel.ColumnCount && y + yy < minefieldPanel.RowCount) + if (minefieldPanel.GetControlFromPosition(x + xx, y + yy).Enabled && minemap[x+xx,y+yy] != -1 && minemap[x + xx, y + yy] != -2) { - if (minefieldPanel.GetControlFromPosition(x + xx, y + yy).Enabled && minemap[x+xx,y+yy] != -1 && minemap[x + xx, y + yy] != -2) + minefieldPanel.GetControlFromPosition(x + xx, y + yy).Enabled = false; + trueform(x + xx, y + yy); + if (minemap[x + xx, y + yy] == 0) { - minefieldPanel.GetControlFromPosition(x + xx, y + yy).Enabled = false; - if (minemap[x + xx, y + yy] == 0) - { - removeBlank(x + xx, y + yy); - } + removeBlank(x + xx, y + yy); } - } } } @@ -340,5 +319,19 @@ namespace ShiftOS.WinForms.Applications private void buttonM_Click(object sender, EventArgs e) { startGame(1); } private void buttonH_Click(object sender, EventArgs e) { startGame(2); } + + private void flagButton_Click(object sender, EventArgs e) + { + if (flagtime) + { + flagButton.Image = Properties.Resources.SweeperTileBlock; + flagtime = false; + } + else + { + flagButton.Image = Properties.Resources.SweeperTileFlag; + flagtime = true; + } + } } } diff --git a/ShiftOS.WinForms/ShiftOS.WinForms.csproj b/ShiftOS.WinForms/ShiftOS.WinForms.csproj index 1802675..e061f82 100644 --- a/ShiftOS.WinForms/ShiftOS.WinForms.csproj +++ b/ShiftOS.WinForms/ShiftOS.WinForms.csproj @@ -541,6 +541,18 @@ + + + + + + + + + + + + From e1ddab3900172890bf38e1e2998a469dc77e1630 Mon Sep 17 00:00:00 2001 From: lempamo Date: Sun, 26 Feb 2017 21:37:06 -0500 Subject: [PATCH 8/9] finished shiftsweeper --- .../Applications/ShiftSweeper.Designer.cs | 177 ++++++++++++++---- ShiftOS.WinForms/Applications/ShiftSweeper.cs | 9 + 2 files changed, 150 insertions(+), 36 deletions(-) diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs index 691bdb4..3d6ab6e 100644 --- a/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs @@ -29,7 +29,7 @@ private void InitializeComponent() { this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.minefieldPanel = new System.Windows.Forms.TableLayoutPanel(); + this.easyPanel = new System.Windows.Forms.TableLayoutPanel(); this.buttonE = new System.Windows.Forms.Button(); this.buttonM = new System.Windows.Forms.Button(); this.buttonH = new System.Windows.Forms.Button(); @@ -38,6 +38,8 @@ this.lblinfo = new System.Windows.Forms.Label(); this.lblinfo2 = new System.Windows.Forms.Label(); this.flagButton = new System.Windows.Forms.PictureBox(); + this.mediumPanel = new System.Windows.Forms.TableLayoutPanel(); + this.hardPanel = new System.Windows.Forms.TableLayoutPanel(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.flagButton)).BeginInit(); this.SuspendLayout(); @@ -47,42 +49,43 @@ this.pictureBox1.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.SweeperNormalFace; this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.pictureBox1.Image = global::ShiftOS.WinForms.Properties.Resources.SweeperNormalFace; - this.pictureBox1.Location = new System.Drawing.Point(222, 3); + this.pictureBox1.Location = new System.Drawing.Point(264, 3); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(32, 32); this.pictureBox1.TabIndex = 0; this.pictureBox1.TabStop = false; // - // minefieldPanel + // easyPanel // - this.minefieldPanel.ColumnCount = 9; - this.minefieldPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.Location = new System.Drawing.Point(4, 40); - this.minefieldPanel.Name = "minefieldPanel"; - this.minefieldPanel.RowCount = 9; - this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.minefieldPanel.Size = new System.Drawing.Size(471, 241); - this.minefieldPanel.TabIndex = 1; + this.easyPanel.ColumnCount = 9; + this.easyPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.easyPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.easyPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.easyPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.easyPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.easyPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.easyPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.easyPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.easyPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.easyPanel.GrowStyle = System.Windows.Forms.TableLayoutPanelGrowStyle.FixedSize; + this.easyPanel.Location = new System.Drawing.Point(4, 40); + this.easyPanel.Name = "easyPanel"; + this.easyPanel.RowCount = 9; + this.easyPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11136F)); + this.easyPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11136F)); + this.easyPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11136F)); + this.easyPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11136F)); + this.easyPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11136F)); + this.easyPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11136F)); + this.easyPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11136F)); + this.easyPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11025F)); + this.easyPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11025F)); + this.easyPanel.Size = new System.Drawing.Size(553, 308); + this.easyPanel.TabIndex = 1; // // buttonE // - this.buttonE.Location = new System.Drawing.Point(4, 287); + this.buttonE.Location = new System.Drawing.Point(4, 354); this.buttonE.Name = "buttonE"; this.buttonE.Size = new System.Drawing.Size(75, 23); this.buttonE.TabIndex = 2; @@ -92,7 +95,7 @@ // // buttonM // - this.buttonM.Location = new System.Drawing.Point(201, 287); + this.buttonM.Location = new System.Drawing.Point(244, 354); this.buttonM.Name = "buttonM"; this.buttonM.Size = new System.Drawing.Size(75, 23); this.buttonM.TabIndex = 3; @@ -102,7 +105,7 @@ // // buttonH // - this.buttonH.Location = new System.Drawing.Point(400, 287); + this.buttonH.Location = new System.Drawing.Point(482, 354); this.buttonH.Name = "buttonH"; this.buttonH.Size = new System.Drawing.Size(75, 23); this.buttonH.TabIndex = 4; @@ -113,7 +116,7 @@ // lblmines // this.lblmines.AutoSize = true; - this.lblmines.Location = new System.Drawing.Point(272, 4); + this.lblmines.Location = new System.Drawing.Point(317, 4); this.lblmines.Name = "lblmines"; this.lblmines.Size = new System.Drawing.Size(47, 13); this.lblmines.TabIndex = 5; @@ -122,7 +125,7 @@ // lbltime // this.lbltime.AutoSize = true; - this.lbltime.Location = new System.Drawing.Point(272, 22); + this.lbltime.Location = new System.Drawing.Point(317, 22); this.lbltime.Name = "lbltime"; this.lbltime.Size = new System.Drawing.Size(42, 13); this.lbltime.TabIndex = 6; @@ -149,17 +152,117 @@ // flagButton // this.flagButton.Image = global::ShiftOS.WinForms.Properties.Resources.SweeperTileBlock; - this.flagButton.Location = new System.Drawing.Point(455, 15); + this.flagButton.Location = new System.Drawing.Point(537, 14); this.flagButton.Name = "flagButton"; this.flagButton.Size = new System.Drawing.Size(20, 20); this.flagButton.TabIndex = 9; this.flagButton.TabStop = false; this.flagButton.Click += new System.EventHandler(this.flagButton_Click); // + // mediumPanel + // + this.mediumPanel.ColumnCount = 16; + this.mediumPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.249042F)); + this.mediumPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.249044F)); + this.mediumPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.249044F)); + this.mediumPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.249044F)); + this.mediumPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.249044F)); + this.mediumPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.249044F)); + this.mediumPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.249044F)); + this.mediumPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.249044F)); + this.mediumPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.249044F)); + this.mediumPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.mediumPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.mediumPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.mediumPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.mediumPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.mediumPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.mediumPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.mediumPanel.GrowStyle = System.Windows.Forms.TableLayoutPanelGrowStyle.FixedSize; + this.mediumPanel.Location = new System.Drawing.Point(4, 41); + this.mediumPanel.Name = "mediumPanel"; + this.mediumPanel.RowCount = 16; + this.mediumPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.249183F)); + this.mediumPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.249182F)); + this.mediumPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.249182F)); + this.mediumPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.249182F)); + this.mediumPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.249182F)); + this.mediumPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.249182F)); + this.mediumPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.249182F)); + this.mediumPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.248558F)); + this.mediumPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.248558F)); + this.mediumPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.mediumPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.mediumPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.mediumPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.mediumPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.mediumPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.mediumPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.mediumPanel.Size = new System.Drawing.Size(553, 307); + this.mediumPanel.TabIndex = 2; + // + // hardPanel + // + this.hardPanel.ColumnCount = 30; + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.249042F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.249044F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.249044F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.249044F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.249044F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.249044F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.249044F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.249044F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.249044F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.hardPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.hardPanel.GrowStyle = System.Windows.Forms.TableLayoutPanelGrowStyle.FixedSize; + this.hardPanel.Location = new System.Drawing.Point(4, 40); + this.hardPanel.Name = "hardPanel"; + this.hardPanel.RowCount = 16; + this.hardPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.249183F)); + this.hardPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.249182F)); + this.hardPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.249182F)); + this.hardPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.249182F)); + this.hardPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.249182F)); + this.hardPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.249182F)); + this.hardPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.249182F)); + this.hardPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.248558F)); + this.hardPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.248558F)); + this.hardPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.hardPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.hardPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.hardPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.hardPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.hardPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.hardPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.251231F)); + this.hardPanel.Size = new System.Drawing.Size(553, 308); + this.hardPanel.TabIndex = 3; + // // ShiftSweeper // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.hardPanel); + this.Controls.Add(this.mediumPanel); this.Controls.Add(this.flagButton); this.Controls.Add(this.lblinfo2); this.Controls.Add(this.lblinfo); @@ -168,10 +271,10 @@ this.Controls.Add(this.buttonH); this.Controls.Add(this.buttonM); this.Controls.Add(this.buttonE); - this.Controls.Add(this.minefieldPanel); + this.Controls.Add(this.easyPanel); this.Controls.Add(this.pictureBox1); this.Name = "ShiftSweeper"; - this.Size = new System.Drawing.Size(536, 358); + this.Size = new System.Drawing.Size(624, 426); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.flagButton)).EndInit(); this.ResumeLayout(false); @@ -182,7 +285,7 @@ #endregion private System.Windows.Forms.PictureBox pictureBox1; - private System.Windows.Forms.TableLayoutPanel minefieldPanel; + private System.Windows.Forms.TableLayoutPanel easyPanel; private System.Windows.Forms.Button buttonE; private System.Windows.Forms.Button buttonM; private System.Windows.Forms.Button buttonH; @@ -191,5 +294,7 @@ private System.Windows.Forms.Label lblinfo; private System.Windows.Forms.Label lblinfo2; private System.Windows.Forms.PictureBox flagButton; + private System.Windows.Forms.TableLayoutPanel mediumPanel; + private System.Windows.Forms.TableLayoutPanel hardPanel; } } diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.cs index 4b83b3f..0aac2c1 100644 --- a/ShiftOS.WinForms/Applications/ShiftSweeper.cs +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.cs @@ -24,6 +24,7 @@ namespace ShiftOS.WinForms.Applications private int[,] minemap; //Represents status of tiles. 0-8 = how many mines surrounding. -1 = mine. -2 = flagged mine. -3 to -11 = flagged safe. private Timer ticking = new Timer(); private int minetimer; + private TableLayoutPanel minefieldPanel; public ShiftSweeper() { InitializeComponent(); } @@ -34,6 +35,9 @@ namespace ShiftOS.WinForms.Applications buttonH.Visible = ShiftoriumFrontend.UpgradeInstalled("shiftsweeper_hard"); ticking.Interval = 1000; ticking.Tick += Ticking_Tick; + easyPanel.Visible = false; + mediumPanel.Visible = false; + hardPanel.Visible = false; } private void Ticking_Tick(object sender, EventArgs e) @@ -74,21 +78,25 @@ namespace ShiftOS.WinForms.Applications lbltime.Text = "Time: 0"; minetimer = 0; ticking.Start(); + if (minefieldPanel != null) minefieldPanel.Visible = false; switch (d) { case 0: + minefieldPanel = easyPanel; mineCount = 10; minefieldPanel.ColumnCount = 9; minefieldPanel.RowCount = 9; break; case 1: + minefieldPanel = mediumPanel; mineCount = 40; minefieldPanel.ColumnCount = 16; minefieldPanel.RowCount = 16; break; case 2: + minefieldPanel = hardPanel; mineCount = 99; minefieldPanel.ColumnCount = 30; minefieldPanel.RowCount = 16; @@ -97,6 +105,7 @@ namespace ShiftOS.WinForms.Applications default: throw new NullReferenceException(); } + minefieldPanel.Visible = true; origminecount = mineCount; lblmines.Text = "Mines: " + mineCount.ToString(); buttonE.Enabled = false; From ba1519e3ce1c9710befcb4b36e0a2da21005ef31 Mon Sep 17 00:00:00 2001 From: lempamo Date: Sun, 26 Feb 2017 21:54:41 -0500 Subject: [PATCH 9/9] LIcenses --- .../Applications/About.Designer.cs | 26 ++++++++++++++++++- ShiftOS.WinForms/Applications/About.cs | 26 ++++++++++++++++++- .../Applications/AudioPlayer.Designer.cs | 26 ++++++++++++++++++- ShiftOS.WinForms/Applications/AudioPlayer.cs | 26 ++++++++++++++++++- .../Applications/Notifications.Designer.cs | 26 ++++++++++++++++++- .../Applications/Notifications.cs | 26 ++++++++++++++++++- .../Applications/ShiftSweeper.Designer.cs | 26 ++++++++++++++++++- ShiftOS.WinForms/Applications/ShiftSweeper.cs | 26 ++++++++++++++++++- .../Properties/Resources.Designer.cs | 26 ++++++++++++++++++- ShiftOS_TheReturn/NotificationDaemon.cs | 26 ++++++++++++++++++- 10 files changed, 250 insertions(+), 10 deletions(-) diff --git a/ShiftOS.WinForms/Applications/About.Designer.cs b/ShiftOS.WinForms/Applications/About.Designer.cs index e44b29e..ab76eab 100644 --- a/ShiftOS.WinForms/Applications/About.Designer.cs +++ b/ShiftOS.WinForms/Applications/About.Designer.cs @@ -1,4 +1,28 @@ -namespace ShiftOS.WinForms.Applications +/* + * MIT License + * + * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +namespace ShiftOS.WinForms.Applications { partial class About { diff --git a/ShiftOS.WinForms/Applications/About.cs b/ShiftOS.WinForms/Applications/About.cs index cd95296..f91e0cc 100644 --- a/ShiftOS.WinForms/Applications/About.cs +++ b/ShiftOS.WinForms/Applications/About.cs @@ -1,4 +1,28 @@ -using System; +/* + * MIT License + * + * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; diff --git a/ShiftOS.WinForms/Applications/AudioPlayer.Designer.cs b/ShiftOS.WinForms/Applications/AudioPlayer.Designer.cs index 3cc88df..83f41d2 100644 --- a/ShiftOS.WinForms/Applications/AudioPlayer.Designer.cs +++ b/ShiftOS.WinForms/Applications/AudioPlayer.Designer.cs @@ -1,4 +1,28 @@ -namespace ShiftOS.WinForms.Applications +/* + * MIT License + * + * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +namespace ShiftOS.WinForms.Applications { partial class AudioPlayer { diff --git a/ShiftOS.WinForms/Applications/AudioPlayer.cs b/ShiftOS.WinForms/Applications/AudioPlayer.cs index b7dc9ee..b8be6af 100644 --- a/ShiftOS.WinForms/Applications/AudioPlayer.cs +++ b/ShiftOS.WinForms/Applications/AudioPlayer.cs @@ -1,4 +1,28 @@ -using System; +/* + * MIT License + * + * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; diff --git a/ShiftOS.WinForms/Applications/Notifications.Designer.cs b/ShiftOS.WinForms/Applications/Notifications.Designer.cs index d88c25b..861795a 100644 --- a/ShiftOS.WinForms/Applications/Notifications.Designer.cs +++ b/ShiftOS.WinForms/Applications/Notifications.Designer.cs @@ -1,4 +1,28 @@ -namespace ShiftOS.WinForms.Applications +/* + * MIT License + * + * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +namespace ShiftOS.WinForms.Applications { partial class Notifications { diff --git a/ShiftOS.WinForms/Applications/Notifications.cs b/ShiftOS.WinForms/Applications/Notifications.cs index 9ed3587..30aec3d 100644 --- a/ShiftOS.WinForms/Applications/Notifications.cs +++ b/ShiftOS.WinForms/Applications/Notifications.cs @@ -1,4 +1,28 @@ -using System; +/* + * MIT License + * + * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs index 3d6ab6e..17b01b7 100644 --- a/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.Designer.cs @@ -1,4 +1,28 @@ -namespace ShiftOS.WinForms.Applications +/* + * MIT License + * + * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +namespace ShiftOS.WinForms.Applications { partial class ShiftSweeper { diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.cs index 0aac2c1..529a7e8 100644 --- a/ShiftOS.WinForms/Applications/ShiftSweeper.cs +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.cs @@ -1,4 +1,28 @@ -using System; +/* + * MIT License + * + * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; diff --git a/ShiftOS.WinForms/Properties/Resources.Designer.cs b/ShiftOS.WinForms/Properties/Resources.Designer.cs index beef6ff..43b445c 100644 --- a/ShiftOS.WinForms/Properties/Resources.Designer.cs +++ b/ShiftOS.WinForms/Properties/Resources.Designer.cs @@ -1,4 +1,28 @@ -//------------------------------------------------------------------------------ +/* + * MIT License + * + * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000 diff --git a/ShiftOS_TheReturn/NotificationDaemon.cs b/ShiftOS_TheReturn/NotificationDaemon.cs index 6eb0b7b..77a31fc 100644 --- a/ShiftOS_TheReturn/NotificationDaemon.cs +++ b/ShiftOS_TheReturn/NotificationDaemon.cs @@ -1,4 +1,28 @@ -using System; +/* + * MIT License + * + * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +using System; using System.Collections.Generic; using System.Linq; using System.Text;