diff options
| author | lempamo <[email protected]> | 2017-08-23 13:38:40 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-08-23 13:38:40 -0400 |
| commit | 3306d36ecbc024775972e5cf7971b2a7a70671d0 (patch) | |
| tree | 0a79e67b6723a8c75ffd66c7828bdd0ebb1bf74d /Histacom2/OS/Win95/Win95Apps/MineSweeper | |
| parent | 99fef5c57360f07259fc86f433bed8a9ab59c48e (diff) | |
| download | histacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.tar.gz histacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.tar.bz2 histacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.zip | |
Renaming the game!
Diffstat (limited to 'Histacom2/OS/Win95/Win95Apps/MineSweeper')
11 files changed, 1856 insertions, 0 deletions
diff --git a/Histacom2/OS/Win95/Win95Apps/MineSweeper/CustomMinefield.Designer.cs b/Histacom2/OS/Win95/Win95Apps/MineSweeper/CustomMinefield.Designer.cs new file mode 100644 index 0000000..3d5f121 --- /dev/null +++ b/Histacom2/OS/Win95/Win95Apps/MineSweeper/CustomMinefield.Designer.cs @@ -0,0 +1,140 @@ +namespace Histacom2.OS.Win95.Win95Apps.MineSweeper +{ + partial class CustomMinefield + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.comboBox2 = new System.Windows.Forms.ComboBox(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.comboBox3 = new System.Windows.Forms.ComboBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.button1 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(13, 7); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(38, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Width:"; + // + // comboBox2 + // + this.comboBox2.BackColor = System.Drawing.Color.White; + this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBox2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.comboBox2.FormattingEnabled = true; + this.comboBox2.Location = new System.Drawing.Point(57, 31); + this.comboBox2.Name = "comboBox2"; + this.comboBox2.Size = new System.Drawing.Size(78, 21); + this.comboBox2.TabIndex = 2; + // + // comboBox1 + // + this.comboBox1.BackColor = System.Drawing.Color.White; + this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Location = new System.Drawing.Point(57, 4); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(78, 21); + this.comboBox1.TabIndex = 3; + // + // comboBox3 + // + this.comboBox3.BackColor = System.Drawing.Color.White; + this.comboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBox3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.comboBox3.FormattingEnabled = true; + this.comboBox3.Location = new System.Drawing.Point(57, 58); + this.comboBox3.Name = "comboBox3"; + this.comboBox3.Size = new System.Drawing.Size(78, 21); + this.comboBox3.TabIndex = 4; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(10, 34); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(41, 13); + this.label2.TabIndex = 5; + this.label2.Text = "Height:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(13, 61); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(38, 13); + this.label3.TabIndex = 6; + this.label3.Text = "Mines:"; + // + // button1 + // + this.button1.BackColor = System.Drawing.Color.Silver; + this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button1.Location = new System.Drawing.Point(153, 4); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 7; + this.button1.Text = "OK"; + this.button1.UseVisualStyleBackColor = false; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // CustomMinefield + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.button1); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.comboBox3); + this.Controls.Add(this.comboBox1); + this.Controls.Add(this.comboBox2); + this.Controls.Add(this.label1); + this.Name = "CustomMinefield"; + this.Size = new System.Drawing.Size(231, 89); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ComboBox comboBox2; + private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.ComboBox comboBox3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Button button1; + } +} diff --git a/Histacom2/OS/Win95/Win95Apps/MineSweeper/CustomMinefield.cs b/Histacom2/OS/Win95/Win95Apps/MineSweeper/CustomMinefield.cs new file mode 100644 index 0000000..f8a375c --- /dev/null +++ b/Histacom2/OS/Win95/Win95Apps/MineSweeper/CustomMinefield.cs @@ -0,0 +1,42 @@ +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 Histacom2.Engine; + +namespace Histacom2.OS.Win95.Win95Apps.MineSweeper +{ + public partial class CustomMinefield : UserControl + { + private WinClassicMinesweeper _wcm; + private WindowManager wm; + + public CustomMinefield(WinClassicMinesweeper wcm) + { + InitializeComponent(); + _wcm = wcm; + wm = new WindowManager(); + for (int i = 8; i < 31; i++) comboBox1.Items.Add(i); + for (int i = 8; i < 25; i++) comboBox2.Items.Add(i); + for (int i = 10; i < 668; i++) comboBox3.Items.Add(i); + } + + private void button1_Click(object sender, EventArgs e) + { + if ((int)comboBox1.SelectedItem * (int)comboBox2.SelectedItem <= (int)comboBox3.SelectedItem) wm.StartInfobox95("Oops!", "Too many mines!", Engine.Template.InfoboxType.Warning, Engine.Template.InfoboxButtons.OK); + else + { + _wcm.customwidth = (int)comboBox1.SelectedItem; + _wcm.customheight = (int)comboBox2.SelectedItem; + _wcm.custommines = (int)comboBox3.SelectedItem; + _wcm.calculateFormSize((int)comboBox1.SelectedItem, (int)comboBox2.SelectedItem); + this.ParentForm.Close(); + } + } + } +} diff --git a/Histacom2/OS/Win95/Win95Apps/MineSweeper/CustomMinefield.resx b/Histacom2/OS/Win95/Win95Apps/MineSweeper/CustomMinefield.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Histacom2/OS/Win95/Win95Apps/MineSweeper/CustomMinefield.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/Histacom2/OS/Win95/Win95Apps/MineSweeper/Game.cs b/Histacom2/OS/Win95/Win95Apps/MineSweeper/Game.cs new file mode 100644 index 0000000..8f8d7e7 --- /dev/null +++ b/Histacom2/OS/Win95/Win95Apps/MineSweeper/Game.cs @@ -0,0 +1,208 @@ +using System; +using System.Drawing; +using System.Windows.Forms; + + +namespace Histacom2.OS.Win95.Win95Apps.MineSweeper +{ + public class Game + { + public event EventHandler DismantledMinesChanged; + public event EventHandler Tick; + + private int _dismantledMines; + private int _height; + private int _incorrectdismantledMines; + private int _mines; + private Panel _panel; + private Square[,] _squares; + public Timer _timer; + private int _width; + public bool ftime = true; + public int Time; + public bool win = false; + private WinClassicMinesweeper _window; + + public Game(WinClassicMinesweeper window, Panel panel, int width, int height, int mines) + { + _panel = panel; + _width = width; + _height = height; + _mines = mines; + _window = window; + win = false; + } + + private void Dismantle(object sender, EventArgs e) + { + + Square s = (Square)sender; + if (s.Dismantled) + { + if (s.Minded) _dismantledMines++; + else _incorrectdismantledMines++; + } + else + { + if (s.Minded) _dismantledMines--; + else _incorrectdismantledMines--; + } + + OnDismantledMinesChanged(); + + if (_dismantledMines == Mines) + { + _timer.Enabled = false; + Panel.Enabled = false; + win = true; + } + } + + public int DismantledMines + { + get { return _dismantledMines + _incorrectdismantledMines; } + } + + private void Explode(object sender, EventArgs e) + { + _panel.Enabled = false; + _window.button1.BackgroundImage = Properties.Resources.WinClassicMinesweeperSad; + if (_timer != null) _timer.Enabled = false; + foreach (Square s in _squares) + { + s.RemoveEvents(); + if (s.Minded && !s.Exploded && !s.Dismantled) + { + s.Button.BackgroundImage = Properties.Resources.minesweepSquareMine; + } + if (s.Dismantled && !s.Minded) + { + s.Button.BackgroundImage = Properties.Resources.minesweepSquareWrong; + } + } + _window.button1.BackgroundImage = Properties.Resources.WinClassicMinesweeperSad; + } + + public int Height + { + get { return (this._height); } + } + + public bool IsBomb(int x, int y) + { + if (x >= 0 && x < Width) + { + if (y >= 0 && y < Height) + { + return _squares[x, y].Minded; + } + } + return false; + } + + public bool IsDismantled(int x, int y) + { + if (x >= 0 && x < Width) + { + if (y >= 0 && y < Height) + { + return _squares[x, y].Dismantled; + } + } + return false; + } + + public int Mines + { + get { return (this._mines); } + } + + protected void OnDismantledMinesChanged() + { + + if (DismantledMinesChanged != null) + { + DismantledMinesChanged(this, new EventArgs()); + } + } + + protected void OnTick() + { + if (Tick != null) + { + Tick(this, new EventArgs()); + } + } + + public void OpenSpot(int x, int y) + { + if (x >= 0 && x < Width) + { + if (y >= 0 && y < Height) + { + _squares[x, y].Open(); + } + } + } + + public Panel Panel + { + get { return (this._panel); } + } + + public void Start() + { + + //Panel.SuspendLayout(); + Time = 0; + _dismantledMines = 0; + _incorrectdismantledMines = 0; + Panel.Enabled = true; + Panel.Controls.Clear(); + + // Create Spots + _squares = new Square[Width, Height]; + for (int x = 0; x < Width; x++) + { + for (int y = 0; y < Height; y++) + { + Square s = new Square(this, x, y); + s.Explode += new EventHandler(Explode); + s.Dismantle += new EventHandler(Dismantle); + s.Button.MouseDown += (send, args) => { if (_panel.Enabled) _window.button1.BackgroundImage = Properties.Resources.WinClassicMinesweeperGasp; }; + s.Button.MouseUp += (send, args) => { if (_panel.Enabled) _window.button1.BackgroundImage = Properties.Resources.WinClassicMinesweeperSmile; }; + _squares[x, y] = s; + } + } + + // Place Mines + int b = 0; + Random r = new Random(); + while (b < Mines) + { + int x = r.Next(Width); + int y = r.Next(Height); + + Square s = _squares[x, y]; + if (!s.Minded) + { + s.Minded = true; + b++; + } + } + + OnDismantledMinesChanged(); + } + + public void TimerTick(object sender, EventArgs e) + { + Time++; + OnTick(); + } + + public int Width + { + get { return (this._width); } + } + } +} diff --git a/Histacom2/OS/Win95/Win95Apps/MineSweeper/MineBestTimes.Designer.cs b/Histacom2/OS/Win95/Win95Apps/MineSweeper/MineBestTimes.Designer.cs new file mode 100644 index 0000000..5ef41bc --- /dev/null +++ b/Histacom2/OS/Win95/Win95Apps/MineSweeper/MineBestTimes.Designer.cs @@ -0,0 +1,201 @@ +namespace Histacom2.OS.Win95.Win95Apps.MineSweeper +{ + partial class MineBestTimes + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Segoe UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(20, 23); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(103, 25); + this.label1.TabIndex = 0; + this.label1.Text = "Begginner:"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Segoe UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.Location = new System.Drawing.Point(20, 71); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(123, 25); + this.label2.TabIndex = 1; + this.label2.Text = "Intermediate:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Segoe UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.Location = new System.Drawing.Point(20, 124); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(69, 25); + this.label3.TabIndex = 2; + this.label3.Text = "Expert:"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Segoe UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label4.Location = new System.Drawing.Point(95, 23); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(115, 25); + this.label4.TabIndex = 3; + this.label4.Text = "999 seconds"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("Segoe UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.Location = new System.Drawing.Point(95, 71); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(115, 25); + this.label5.TabIndex = 4; + this.label5.Text = "999 seconds"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("Segoe UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label6.Location = new System.Drawing.Point(95, 124); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(115, 25); + this.label6.TabIndex = 5; + this.label6.Text = "999 seconds"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("Segoe UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label7.Location = new System.Drawing.Point(160, 23); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(112, 25); + this.label7.TabIndex = 6; + this.label7.Text = "Anonymous"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("Segoe UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label8.Location = new System.Drawing.Point(160, 71); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(112, 25); + this.label8.TabIndex = 7; + this.label8.Text = "Anonymous"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("Segoe UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label9.Location = new System.Drawing.Point(160, 124); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(112, 25); + this.label9.TabIndex = 8; + this.label9.Text = "Anonymous"; + // + // button1 + // + this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button1.Location = new System.Drawing.Point(193, 167); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 9; + this.button1.Text = "OK"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Location = new System.Drawing.Point(45, 167); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(98, 23); + this.button2.TabIndex = 10; + this.button2.Text = "Reset Scores"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // timer1 + // + this.timer1.Interval = 1; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // MineBestTimes + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.label9); + this.Controls.Add(this.label8); + this.Controls.Add(this.label7); + this.Controls.Add(this.label6); + this.Controls.Add(this.label5); + this.Controls.Add(this.label4); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Name = "MineBestTimes"; + this.Size = new System.Drawing.Size(299, 209); + this.Load += new System.EventHandler(this.MineBestTimes_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Timer timer1; + } +} diff --git a/Histacom2/OS/Win95/Win95Apps/MineSweeper/MineBestTimes.cs b/Histacom2/OS/Win95/Win95Apps/MineSweeper/MineBestTimes.cs new file mode 100644 index 0000000..53f3ab2 --- /dev/null +++ b/Histacom2/OS/Win95/Win95Apps/MineSweeper/MineBestTimes.cs @@ -0,0 +1,71 @@ +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 Histacom2.Engine; + +namespace Histacom2.OS.Win95.Win95Apps.MineSweeper +{ + public partial class MineBestTimes : UserControl + { + public MineBestTimes() + { + InitializeComponent(); + foreach (Control c in Controls) + { + if (c is Button) + { + c.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(0))); + c.Paint += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2); + } + else + { + c.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); + } + } + } + + private void MineBestTimes_Load(object sender, EventArgs e) + { + timer1.Start(); + + } + + private void button1_Click(object sender, EventArgs e) + { + ParentForm.Close(); + } + + private void button2_Click(object sender, EventArgs e) + { + SaveSystem.CurrentSave.mineSweepE = 999; + SaveSystem.CurrentSave.mineSweepI = 999; + SaveSystem.CurrentSave.mineSweepH = 999; + SaveSystem.SaveGame(); + } + + private void timer1_Tick(object sender, EventArgs e) + { + label4.Text = (SaveSystem.CurrentSave.mineSweepE.ToString()) + " seconds"; + label5.Text = (SaveSystem.CurrentSave.mineSweepI.ToString()) + " seconds"; + label6.Text = (SaveSystem.CurrentSave.mineSweepH.ToString()) + " seconds"; + if(SaveSystem.CurrentSave.mineSweepE != 999) + { + label7.Text = SaveSystem.ProfileName; + } + if(SaveSystem.CurrentSave.mineSweepI != 999) + { + label8.Text = SaveSystem.ProfileName; + }; + if(SaveSystem.CurrentSave.mineSweepH != 999) + { + label9.Text = SaveSystem.ProfileName; + } + } + } +} diff --git a/Histacom2/OS/Win95/Win95Apps/MineSweeper/MineBestTimes.resx b/Histacom2/OS/Win95/Win95Apps/MineSweeper/MineBestTimes.resx new file mode 100644 index 0000000..1f666f2 --- /dev/null +++ b/Histacom2/OS/Win95/Win95Apps/MineSweeper/MineBestTimes.resx @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root>
\ No newline at end of file diff --git a/Histacom2/OS/Win95/Win95Apps/MineSweeper/Square.cs b/Histacom2/OS/Win95/Win95Apps/MineSweeper/Square.cs new file mode 100644 index 0000000..4f80240 --- /dev/null +++ b/Histacom2/OS/Win95/Win95Apps/MineSweeper/Square.cs @@ -0,0 +1,268 @@ +using System; +using System.Drawing; +using System.Threading.Tasks; +using System.Windows.Forms; +using Histacom2.Engine; + +namespace Histacom2.OS.Win95.Win95Apps.MineSweeper +{ + class Square + { + public event EventHandler Dismantle; + public event EventHandler Explode; + + private Button _button; + private bool _dismantled = false; + private bool _questioned = false; + private Game _game; + private bool _minded = false; + private bool _opened = false; + private bool _exploded = false; + private int _x; + private int _y; + + public Square(Game game, int x, int y) + { + _game = game; + _x = x; + _y = y; + _button = new Button(); + Button.Text = ""; + + int w = _game.Panel.Width / _game.Width; + int h = _game.Panel.Height / _game.Height; + + _button.Width = 16; + _button.Height = 16; + _button.Left = w * X; + _button.Top = h * Y; + _button.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(0))); + _button.Click += new EventHandler(Click); + _button.MouseDown += new MouseEventHandler(DismantleClick); + _button.MouseUp += new MouseEventHandler(MiddleClick); + _button.FlatStyle = FlatStyle.Flat; + _button.FlatAppearance.BorderSize = 0; + _button.BackgroundImage = Properties.Resources.minesweepSquare; + _button.BackgroundImageLayout = ImageLayout.Stretch; + + _game.Panel.Controls.Add(Button); + } + + private void MiddleClick(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Middle && Opened) + { + int c = 0; + if (_game.IsBomb(X - 1, Y - 1)) c++; + if (_game.IsBomb(X - 0, Y - 1)) c++; + if (_game.IsBomb(X + 1, Y - 1)) c++; + if (_game.IsBomb(X - 1, Y - 0)) c++; + if (_game.IsBomb(X + 1, Y - 0)) c++; + if (_game.IsBomb(X - 1, Y + 1)) c++; + if (_game.IsBomb(X - 0, Y + 1)) c++; + if (_game.IsBomb(X + 1, Y + 1)) c++; + + int s = 0; + if (_game.IsDismantled(X - 1, Y - 1) && _game.IsBomb(X - 1, Y - 1)) s++; + if (_game.IsDismantled(X - 0, Y - 1) && _game.IsBomb(X - 0, Y - 1)) s++; + if (_game.IsDismantled(X + 1, Y - 1) && _game.IsBomb(X + 1, Y - 1)) s++; + if (_game.IsDismantled(X - 1, Y - 0) && _game.IsBomb(X - 1, Y - 0)) s++; + if (_game.IsDismantled(X + 1, Y - 0) && _game.IsBomb(X + 1, Y - 0)) s++; + if (_game.IsDismantled(X - 1, Y + 1) && _game.IsBomb(X - 1, Y + 1)) s++; + if (_game.IsDismantled(X - 0, Y + 1) && _game.IsBomb(X - 0, Y + 1)) s++; + if (_game.IsDismantled(X + 1, Y + 1) && _game.IsBomb(X + 1, Y + 1)) s++; + + if (s == c) + { + _game.OpenSpot(X - 1, Y - 1); + _game.OpenSpot(X - 0, Y - 1); + _game.OpenSpot(X + 1, Y - 1); + _game.OpenSpot(X - 1, Y - 0); + _game.OpenSpot(X - 0, Y - 0); + _game.OpenSpot(X + 1, Y - 0); + _game.OpenSpot(X - 1, Y + 1); + _game.OpenSpot(X - 0, Y + 1); + _game.OpenSpot(X + 1, Y + 1); + } + } + } + + public Button Button + { + get { return (this._button); } + } + + private void Click(object sender, EventArgs e) + { + + if (!Dismantled) + { + if (Minded) + { + Button.BackgroundImage = Properties.Resources.minesweepSquareExploded; + _exploded = true; + OnExplode(); + } + else + { + this.Open(); + } + } + if (_game.ftime == true && !Minded) + { + _game.ftime = false; + _game._timer = new Timer(); + _game._timer.Interval = 1000; + _game._timer.Tick += new EventHandler(_game.TimerTick); + _game._timer.Enabled = true; + } + } + + private void DismantleClick(object sender, MouseEventArgs e) + { + if (!Opened && e.Button == MouseButtons.Right) + { + if (Dismantled) + { + _dismantled = false; + _questioned = true; + Button.BackgroundImage = Properties.Resources.minesweepSquareQuestion; + } + else if(_questioned) + { + _questioned = false; + Button.BackgroundImage = Properties.Resources.minesweepSquare; + return; + } + else + { + _dismantled = true; + Button.BackgroundImage = Properties.Resources.WinClassicMinesweeperFlag; + } + OnDismantle(); + } + } + + public bool Dismantled + { + get { return (this._dismantled); } + } + + public bool Minded + { + get { return (this._minded); } + set { this._minded = value; } + } + + protected void OnDismantle() + { + if (Dismantle != null) + { + Dismantle(this, new EventArgs()); + } + } + + protected void OnExplode() + { + if (Explode != null) + { + Explode(this, new EventArgs()); + } + } + + public void Open() + { + if (!Minded) + { + if (!Opened && !Dismantled) + { + _opened = true; + // Count Bombs + int c = 0; + if (_game.IsBomb(X - 1, Y - 1)) c++; + if (_game.IsBomb(X - 0, Y - 1)) c++; + if (_game.IsBomb(X + 1, Y - 1)) c++; + if (_game.IsBomb(X - 1, Y - 0)) c++; + if (_game.IsBomb(X - 0, Y - 0)) c++; + if (_game.IsBomb(X + 1, Y - 0)) c++; + if (_game.IsBomb(X - 1, Y + 1)) c++; + if (_game.IsBomb(X - 0, Y + 1)) c++; + if (_game.IsBomb(X + 1, Y + 1)) c++; + + if (c > 0) + { + switch (c) + { + case 1: + Button.BackgroundImage = Properties.Resources.minesweepSquare1; + break; + case 2: + Button.BackgroundImage = Properties.Resources.minesweepSquare2; + break; + case 3: + Button.BackgroundImage = Properties.Resources.minesweepSquare3; + break; + case 4: + Button.BackgroundImage = Properties.Resources.minesweepSquare4; + break; + case 5: + Button.BackgroundImage = Properties.Resources.minesweepSquare5; + break; + case 6: + Button.BackgroundImage = Properties.Resources.minesweepSquare6; + break; + case 7: + Button.BackgroundImage = Properties.Resources.minesweepSquare7; + break; + case 8: + Button.BackgroundImage = Properties.Resources.minesweepSquare8; + break; + } + } + else + { + Button.BackgroundImage = Properties.Resources.minesweepSquare0; + Button.Enabled = false; + + _game.OpenSpot(X - 1, Y - 1); + _game.OpenSpot(X - 0, Y - 1); + _game.OpenSpot(X + 1, Y - 1); + _game.OpenSpot(X - 1, Y - 0); + _game.OpenSpot(X - 0, Y - 0); + _game.OpenSpot(X + 1, Y - 0); + _game.OpenSpot(X - 1, Y + 1); + _game.OpenSpot(X - 0, Y + 1); + _game.OpenSpot(X + 1, Y + 1); + } + } + } + } + + public bool Opened + { + get { return (this._opened); } + } + + public int X + { + get { return (this._x); } + } + + public int Y + { + get { return (this._y); } + } + + public bool Exploded + { + get { return (this._exploded); } + } + + public void RemoveEvents() + { + _button.Click -= new EventHandler(Click); + _button.MouseDown -= new MouseEventHandler(DismantleClick); + _button.MouseUp -= new MouseEventHandler(MiddleClick); + } + } +} diff --git a/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.Designer.cs b/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.Designer.cs new file mode 100644 index 0000000..bcb16de --- /dev/null +++ b/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.Designer.cs @@ -0,0 +1,383 @@ +namespace Histacom2.OS.Win95.Win95Apps +{ + partial class WinClassicMinesweeper + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.labelBombs = new System.Windows.Forms.Label(); + this.labelTime = new System.Windows.Forms.Label(); + this.panel1 = new System.Windows.Forms.Panel(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.gameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.begginnerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.intermediateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.expertToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.customToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.marksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.colorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.bestTimesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); + this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.helpTopicsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); + this.aboutMinesweeperToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.button1 = new System.Windows.Forms.Button(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.panel2 = new System.Windows.Forms.Panel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.panel4 = new System.Windows.Forms.Panel(); + this.menuStrip1.SuspendLayout(); + this.panel2.SuspendLayout(); + this.panel3.SuspendLayout(); + this.panel4.SuspendLayout(); + this.SuspendLayout(); + // + // labelBombs + // + this.labelBombs.BackColor = System.Drawing.Color.Silver; + this.labelBombs.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.labelBombs.Font = new System.Drawing.Font("Lemon\'s LCD", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelBombs.ForeColor = System.Drawing.Color.Red; + this.labelBombs.Image = global::Histacom2.Properties.Resources.MinesweepNumBox; + this.labelBombs.Location = new System.Drawing.Point(3, 6); + this.labelBombs.Name = "labelBombs"; + this.labelBombs.Size = new System.Drawing.Size(56, 25); + this.labelBombs.TabIndex = 9; + this.labelBombs.Text = "000"; + this.labelBombs.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // labelTime + // + this.labelTime.BackColor = System.Drawing.Color.Silver; + this.labelTime.Font = new System.Drawing.Font("Lemon\'s LCD", 15F); + this.labelTime.ForeColor = System.Drawing.Color.Red; + this.labelTime.Image = global::Histacom2.Properties.Resources.MinesweepNumBox; + this.labelTime.Location = new System.Drawing.Point(75, 6); + this.labelTime.Margin = new System.Windows.Forms.Padding(0); + this.labelTime.Name = "labelTime"; + this.labelTime.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.labelTime.Size = new System.Drawing.Size(56, 25); + this.labelTime.TabIndex = 6; + this.labelTime.Text = "000"; + this.labelTime.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // panel1 + // + this.panel1.Location = new System.Drawing.Point(3, 3); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(128, 128); + this.panel1.TabIndex = 4; + // + // menuStrip1 + // + this.menuStrip1.BackColor = System.Drawing.Color.Silver; + this.menuStrip1.ImageScalingSize = new System.Drawing.Size(0, 0); + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.gameToolStripMenuItem, + this.helpToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Padding = new System.Windows.Forms.Padding(2, 2, 0, 2); + this.menuStrip1.Size = new System.Drawing.Size(164, 24); + this.menuStrip1.TabIndex = 8; + this.menuStrip1.Text = "menuStrip1"; + // + // gameToolStripMenuItem + // + this.gameToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.gameToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.newToolStripMenuItem, + this.toolStripSeparator1, + this.begginnerToolStripMenuItem, + this.intermediateToolStripMenuItem, + this.expertToolStripMenuItem, + this.customToolStripMenuItem, + this.toolStripSeparator2, + this.marksToolStripMenuItem, + this.colorToolStripMenuItem, + this.toolStripSeparator3, + this.bestTimesToolStripMenuItem, + this.toolStripSeparator4, + this.exitToolStripMenuItem}); + this.gameToolStripMenuItem.Name = "gameToolStripMenuItem"; + this.gameToolStripMenuItem.Padding = new System.Windows.Forms.Padding(0); + this.gameToolStripMenuItem.Size = new System.Drawing.Size(42, 20); + this.gameToolStripMenuItem.Text = "&Game"; + this.gameToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay; + // + // newToolStripMenuItem + // + this.newToolStripMenuItem.BackColor = System.Drawing.Color.Silver; + this.newToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.newToolStripMenuItem.Name = "newToolStripMenuItem"; + this.newToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.newToolStripMenuItem.Text = "New"; + this.newToolStripMenuItem.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.newToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6); + // + // begginnerToolStripMenuItem + // + this.begginnerToolStripMenuItem.BackColor = System.Drawing.Color.Silver; + this.begginnerToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.begginnerToolStripMenuItem.Name = "begginnerToolStripMenuItem"; + this.begginnerToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.begginnerToolStripMenuItem.Text = "Beginner"; + this.begginnerToolStripMenuItem.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.begginnerToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; + this.begginnerToolStripMenuItem.Click += new System.EventHandler(this.begginnerToolStripMenuItem_Click); + // + // intermediateToolStripMenuItem + // + this.intermediateToolStripMenuItem.BackColor = System.Drawing.Color.Silver; + this.intermediateToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.intermediateToolStripMenuItem.Name = "intermediateToolStripMenuItem"; + this.intermediateToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.intermediateToolStripMenuItem.Text = "Intermediate"; + this.intermediateToolStripMenuItem.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.intermediateToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; + this.intermediateToolStripMenuItem.Click += new System.EventHandler(this.intermediateToolStripMenuItem_Click); + // + // expertToolStripMenuItem + // + this.expertToolStripMenuItem.BackColor = System.Drawing.Color.Silver; + this.expertToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.expertToolStripMenuItem.Name = "expertToolStripMenuItem"; + this.expertToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.expertToolStripMenuItem.Text = "Expert"; + this.expertToolStripMenuItem.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.expertToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; + this.expertToolStripMenuItem.Click += new System.EventHandler(this.expertToolStripMenuItem_Click); + // + // customToolStripMenuItem + // + this.customToolStripMenuItem.BackColor = System.Drawing.Color.Silver; + this.customToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.customToolStripMenuItem.Name = "customToolStripMenuItem"; + this.customToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.customToolStripMenuItem.Text = "Custom"; + this.customToolStripMenuItem.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.customToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; + this.customToolStripMenuItem.Click += new System.EventHandler(this.customToolStripMenuItem_Click); + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(149, 6); + // + // marksToolStripMenuItem + // + this.marksToolStripMenuItem.BackColor = System.Drawing.Color.Silver; + this.marksToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.marksToolStripMenuItem.Name = "marksToolStripMenuItem"; + this.marksToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.marksToolStripMenuItem.Text = "Marks {?}"; + this.marksToolStripMenuItem.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.marksToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; + // + // colorToolStripMenuItem + // + this.colorToolStripMenuItem.BackColor = System.Drawing.Color.Silver; + this.colorToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.colorToolStripMenuItem.Name = "colorToolStripMenuItem"; + this.colorToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.colorToolStripMenuItem.Text = "Color"; + this.colorToolStripMenuItem.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.colorToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(149, 6); + // + // bestTimesToolStripMenuItem + // + this.bestTimesToolStripMenuItem.BackColor = System.Drawing.Color.Silver; + this.bestTimesToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.bestTimesToolStripMenuItem.Name = "bestTimesToolStripMenuItem"; + this.bestTimesToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.bestTimesToolStripMenuItem.Text = "Best Times"; + this.bestTimesToolStripMenuItem.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.bestTimesToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; + this.bestTimesToolStripMenuItem.Click += new System.EventHandler(this.bestTimesToolStripMenuItem_Click); + // + // toolStripSeparator4 + // + this.toolStripSeparator4.Name = "toolStripSeparator4"; + this.toolStripSeparator4.Size = new System.Drawing.Size(149, 6); + // + // exitToolStripMenuItem + // + this.exitToolStripMenuItem.BackColor = System.Drawing.Color.Silver; + this.exitToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; + this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.exitToolStripMenuItem.Text = "Exit"; + this.exitToolStripMenuItem.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.exitToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; + this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); + // + // helpToolStripMenuItem + // + this.helpToolStripMenuItem.BackgroundImage = global::Histacom2.Properties.Resources.sliversilver; + this.helpToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.helpTopicsToolStripMenuItem, + this.toolStripSeparator5, + this.aboutMinesweeperToolStripMenuItem}); + this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; + this.helpToolStripMenuItem.Padding = new System.Windows.Forms.Padding(0); + this.helpToolStripMenuItem.Size = new System.Drawing.Size(36, 20); + this.helpToolStripMenuItem.Text = "&Help"; + // + // helpTopicsToolStripMenuItem + // + this.helpTopicsToolStripMenuItem.BackColor = System.Drawing.Color.Silver; + this.helpTopicsToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.helpTopicsToolStripMenuItem.Name = "helpTopicsToolStripMenuItem"; + this.helpTopicsToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.helpTopicsToolStripMenuItem.Text = "Help Topics"; + // + // toolStripSeparator5 + // + this.toolStripSeparator5.Name = "toolStripSeparator5"; + this.toolStripSeparator5.Size = new System.Drawing.Size(177, 6); + // + // aboutMinesweeperToolStripMenuItem + // + this.aboutMinesweeperToolStripMenuItem.BackColor = System.Drawing.Color.Silver; + this.aboutMinesweeperToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.aboutMinesweeperToolStripMenuItem.Name = "aboutMinesweeperToolStripMenuItem"; + this.aboutMinesweeperToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.aboutMinesweeperToolStripMenuItem.Text = "About Minesweeper"; + // + // button1 + // + this.button1.BackColor = System.Drawing.Color.Silver; + this.button1.BackgroundImage = global::Histacom2.Properties.Resources.WinClassicMinesweeperSmile; + this.button1.FlatAppearance.BorderColor = System.Drawing.Color.Gray; + this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button1.Location = new System.Drawing.Point(54, 5); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(25, 25); + this.button1.TabIndex = 7; + this.button1.UseVisualStyleBackColor = false; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // timer1 + // + this.timer1.Interval = 1; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // panel2 + // + this.panel2.Controls.Add(this.panel1); + this.panel2.Location = new System.Drawing.Point(15, 57); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(134, 134); + this.panel2.TabIndex = 10; + // + // panel3 + // + this.panel3.Controls.Add(this.panel4); + this.panel3.Controls.Add(this.panel2); + this.panel3.Location = new System.Drawing.Point(0, 25); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(164, 205); + this.panel3.TabIndex = 11; + // + // panel4 + // + this.panel4.Controls.Add(this.button1); + this.panel4.Controls.Add(this.labelTime); + this.panel4.Controls.Add(this.labelBombs); + this.panel4.Location = new System.Drawing.Point(15, 11); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(134, 37); + this.panel4.TabIndex = 11; + // + // WinClassicMinesweeper + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Silver; + this.Controls.Add(this.panel3); + this.Controls.Add(this.menuStrip1); + this.Name = "WinClassicMinesweeper"; + this.Size = new System.Drawing.Size(164, 230); + this.Load += new System.EventHandler(this.WinClassicMinesweeper_Load); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.panel2.ResumeLayout(false); + this.panel3.ResumeLayout(false); + this.panel4.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label labelBombs; + private System.Windows.Forms.Label labelTime; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem gameToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem helpTopicsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem aboutMinesweeperToolStripMenuItem; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.Panel panel2; + internal System.Windows.Forms.Button button1; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem begginnerToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem intermediateToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem expertToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem customToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem marksToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem colorToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem bestTimesToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator5; + } +} diff --git a/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs b/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs new file mode 100644 index 0000000..9b6595c --- /dev/null +++ b/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs @@ -0,0 +1,171 @@ +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 Histacom2.OS.Win95.Win95Apps.MineSweeper; +using Histacom2.Engine; +using System.Threading; +using Histacom2.Engine.Template; + +namespace Histacom2.OS.Win95.Win95Apps +{ + public partial class WinClassicMinesweeper : UserControl + { + private Game _game; + public int currentface = 1; + public string level = "easy"; + public int customwidth; + public int customheight; + public int custommines; + public WinClassicMinesweeper() + { + InitializeComponent(); + labelBombs.Font = new Font(TitleScreen.pfc.Families[2], 15, GraphicsUnit.Point); + labelTime.Font = new Font(TitleScreen.pfc.Families[2], 15, GraphicsUnit.Point); + panel2.Paint += (sender, args) => Paintbrush.PaintClassicBordersIndented(sender, args, 3); + panel3.Paint += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 3); + panel4.Paint += (sender, args) => Paintbrush.PaintClassicBordersIndented(sender, args, 2); + foreach (ToolStripMenuItem item in menuStrip1.Items) + { + item.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular); + item.BackColor = Color.Silver; + item.BackgroundImage = Properties.Resources.sliversilver; + item.BackgroundImageLayout = ImageLayout.Center; + item.DisplayStyle = ToolStripItemDisplayStyle.Text; + } + toolStripSeparator1.Paint += Paintbrush.ExtendedToolStripSeparator_Paint; + toolStripSeparator2.Paint += Paintbrush.ExtendedToolStripSeparator_Paint; + toolStripSeparator3.Paint += Paintbrush.ExtendedToolStripSeparator_Paint; + toolStripSeparator4.Paint += Paintbrush.ExtendedToolStripSeparator_Paint; + toolStripSeparator5.Paint += Paintbrush.ExtendedToolStripSeparator_Paint; + } + private void GameTick(object sender, EventArgs e) + { + labelTime.Text = _game.Time.ToString(); + } + private void GameDismantledMinesChanged(object sender, EventArgs e) + { + labelBombs.Text = (_game.Mines - _game.DismantledMines).ToString(); + } + public void calculateFormSize(int x, int y) + { + panel1.Size = new Size(x * 16, y * 16); + panel2.Size = new Size(x * 16 + 6, y * 16 + 6); + this.ParentForm.Size = new Size(x * 16 + 41, y * 16 + 128); + panel3.Size = new Size(Width, Height - 24); + panel4.Size = new Size(panel2.Width, 37); + labelTime.Location = new Point(panel4.Width - 58, 6); + //panel2.Paint -= (sender, args) => Paintbrush.PaintClassicBordersIndented(sender, args, 3); + panel2.Refresh(); + panel3.Refresh(); + //panel2.Paint += (sender, args) => Paintbrush.PaintClassicBordersIndented(sender, args, 3); + button1.Location = new Point(panel4.Width / 2 - 12, 6); + button1.PerformClick(); + } + private void begginnerToolStripMenuItem_Click(object sender, EventArgs e) + { + level = "easy"; + //button1.Location = new Point(70, 32); + calculateFormSize(9, 9); + } + private void intermediateToolStripMenuItem_Click(object sender, EventArgs e) + { + level = "medium"; + //button1.Location = new Point(158, 32); + calculateFormSize(16, 16); + } + private void expertToolStripMenuItem_Click(object sender, EventArgs e) + { + level = "hard"; + //button1.Location = new Point(381, 32); + calculateFormSize(30, 16); + } + private void button1_Click(object sender, EventArgs e) + { + button1.BackgroundImage = Properties.Resources.WinClassicMinesweeperSmile; + labelTime.Text = "0"; + switch (level) + { + case ("easy"): + Cursor.Current = Cursors.WaitCursor; + _game = new Game(this, panel1, 9, 9, 10); + break; + case ("medium"): + Cursor.Current = Cursors.WaitCursor; + _game = new Game(this, panel1, 16, 16, 40); + break; + case ("hard"): + Cursor.Current = Cursors.WaitCursor; + _game = new Game(this, panel1, 30, 16, 99); + break; + case ("custom"): + Cursor.Current = Cursors.WaitCursor; + _game = new Game(this, panel1, customwidth, customheight, custommines); + break; + } + _game.Tick += new EventHandler(GameTick); + _game.DismantledMinesChanged += new EventHandler(GameDismantledMinesChanged); + _game.Start(); + timer1.Start(); + } + + private void WinClassicMinesweeper_Load(object sender, EventArgs e) + { + begginnerToolStripMenuItem.PerformClick(); + timer1.Start(); + } + + private void bestTimesToolStripMenuItem_Click(object sender, EventArgs e) + { + WindowManager wm = new WindowManager(); + wm.StartWin95(new MineBestTimes(), "Best Times", null, false, false, true, false); + + } + + private void timer1_Tick(object sender, EventArgs e) + { + if (_game.win == true) + { + button1.BackgroundImage = Properties.Resources.WinClassicMinesweeperWin; + switch (level) + { + case ("easy"): + if (SaveSystem.CurrentSave.mineSweepE > _game.Time) SaveSystem.CurrentSave.mineSweepE = _game.Time; + break; + case ("medium"): + if (SaveSystem.CurrentSave.mineSweepI > _game.Time) SaveSystem.CurrentSave.mineSweepI = _game.Time; + break; + case ("hard"): + if (SaveSystem.CurrentSave.mineSweepH > _game.Time) SaveSystem.CurrentSave.mineSweepH = _game.Time; + Thread t = new Thread(Achieve); + t.Start(); + break; + } + SaveSystem.SaveGame(); + timer1.Stop(); + } + } + + private void Achieve() + { + SaveSystem.SaveAchievement(20); + new AchievementBox(20); + } + + private void exitToolStripMenuItem_Click(object sender, EventArgs e) + { + this.ParentForm.Close(); + } + + private void customToolStripMenuItem_Click(object sender, EventArgs e) + { + level = "custom"; + new WindowManager().StartWin95(new CustomMinefield(this), "Custom Field", null, false, false, true, false); + } + } +} diff --git a/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.resx b/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.resx new file mode 100644 index 0000000..fe7c0a0 --- /dev/null +++ b/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.resx @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>132, 17</value> + </metadata> + <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>48</value> + </metadata> +</root>
\ No newline at end of file |
