aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Histacom2.Engine/DesktopController.cs4
-rw-r--r--Histacom2.Engine/FileDialogBoxManager.cs7
-rw-r--r--Histacom2.Engine/Histacom2.Engine.csproj38
-rw-r--r--Histacom2.Engine/Properties/Resources.Designer.cs12
-rw-r--r--Histacom2.Engine/Properties/Resources.resx3
-rw-r--r--Histacom2.Engine/Resources/ClassicDropDownButton.pngbin0 -> 222 bytes
-rw-r--r--Histacom2.Engine/SaveSystem.cs4
-rw-r--r--Histacom2.Engine/Template/DropDownItem.Designer.cs63
-rw-r--r--Histacom2.Engine/Template/DropDownItem.cs42
-rw-r--r--Histacom2.Engine/Template/DropDownItem.resx120
-rw-r--r--Histacom2.Engine/Template/DropDownOverlay.Designer.cs64
-rw-r--r--Histacom2.Engine/Template/DropDownOverlay.cs26
-rw-r--r--Histacom2.Engine/Template/DropDownOverlay.resx120
-rw-r--r--Histacom2.Engine/Template/WinClassic.Designer.cs1
-rw-r--r--Histacom2.Engine/Template/WinClassic.cs13
-rw-r--r--Histacom2.Engine/Template/WinXP.cs2
-rw-r--r--Histacom2.Engine/UI/ClassicDropDown.Designer.cs133
-rw-r--r--Histacom2.Engine/UI/ClassicDropDown.cs167
-rw-r--r--Histacom2.Engine/UI/ClassicDropDown.resx120
-rw-r--r--Histacom2.Engine/UI/ClassicTextBox.Designer.cs115
-rw-r--r--Histacom2.Engine/UI/ClassicTextBox.resx120
-rw-r--r--Histacom2.Engine/UI/ClassicTextbox.cs100
-rw-r--r--Histacom2.Engine/WindowManager.cs12
-rw-r--r--Histacom2/GlobalPrograms/WinClassicNotepad.cs20
-rw-r--r--Histacom2/OS/Win95/Win95Apps/MineSweeper/Square.cs2
-rw-r--r--Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs2
-rw-r--r--Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs2
-rw-r--r--Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs186
-rw-r--r--Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs53
-rw-r--r--Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs113
-rw-r--r--Histacom2/OS/Win95/Win95Apps/WinClassicWordPad.cs1
-rw-r--r--Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs135
-rw-r--r--Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs82
-rw-r--r--Histacom2/SaveDialogs/LoadGameProfileItem.cs6
-rw-r--r--Histacom2/SaveDialogs/NewGameDialog.cs4
-rw-r--r--Histacom2/SaveDialogs/SaveFileTroubleShooter.Designer.cs13
-rw-r--r--Histacom2/SaveDialogs/SaveFileTroubleShooter.cs2
-rw-r--r--Histacom2/TitleScreen.cs144
-rw-r--r--Histacom2/TitleScreen.resx3
39 files changed, 1693 insertions, 361 deletions
diff --git a/Histacom2.Engine/DesktopController.cs b/Histacom2.Engine/DesktopController.cs
index 8ea9775..cb09333 100644
--- a/Histacom2.Engine/DesktopController.cs
+++ b/Histacom2.Engine/DesktopController.cs
@@ -17,9 +17,9 @@ namespace Histacom2.Engine
string directoryFileInfo = File.ReadAllText(Path.Combine(reqDirectory, "_data.info"));
FileSystemFolderInfo toRead = JsonConvert.DeserializeObject<FileSystemFolderInfo>(directoryFileInfo);
- if (returnYesIfProtected == true)
+ if (returnYesIfProtected)
{
- if (toRead.IsProtected == true)
+ if (toRead.IsProtected)
{
return "yes";
}
diff --git a/Histacom2.Engine/FileDialogBoxManager.cs b/Histacom2.Engine/FileDialogBoxManager.cs
index 161c393..9f0b2ce 100644
--- a/Histacom2.Engine/FileDialogBoxManager.cs
+++ b/Histacom2.Engine/FileDialogBoxManager.cs
@@ -28,6 +28,13 @@ namespace Histacom2.Engine
OnlyViewExtension = ExtensionToView;
}
+ public static void DeactivateFileDialog()
+ {
+ IsInOpenDialog = false;
+ IsInSaveDialog = false;
+ OnlyViewExtension = "";
+ }
+
public static string ReadTextFile(string path)
{
try
diff --git a/Histacom2.Engine/Histacom2.Engine.csproj b/Histacom2.Engine/Histacom2.Engine.csproj
index 6f852ed..1d36223 100644
--- a/Histacom2.Engine/Histacom2.Engine.csproj
+++ b/Histacom2.Engine/Histacom2.Engine.csproj
@@ -54,6 +54,18 @@
<Compile Include="Paintbrush.cs" />
<Compile Include="SaveSystem.cs" />
<Compile Include="TaskBarController.cs" />
+ <Compile Include="Template\DropDownItem.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="Template\DropDownItem.Designer.cs">
+ <DependentUpon>DropDownItem.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Template\DropDownOverlay.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Template\DropDownOverlay.Designer.cs">
+ <DependentUpon>DropDownOverlay.cs</DependentUpon>
+ </Compile>
<Compile Include="Template\ResizeOverlay.cs">
<SubType>Form</SubType>
</Compile>
@@ -94,14 +106,23 @@
<Compile Include="UI\ClassicButton.cs">
<SubType>Component</SubType>
</Compile>
+ <Compile Include="UI\ClassicDropDown.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="UI\ClassicDropDown.Designer.cs">
+ <DependentUpon>ClassicDropDown.cs</DependentUpon>
+ </Compile>
<Compile Include="UI\ClassicLabel.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="UI\ClassicStartMenuItem.cs">
<SubType>Component</SubType>
</Compile>
- <Compile Include="UI\ClassicTextbox.cs">
- <SubType>Component</SubType>
+ <Compile Include="UI\ClassicTextBox.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="UI\ClassicTextBox.Designer.cs">
+ <DependentUpon>ClassicTextBox.cs</DependentUpon>
</Compile>
<Compile Include="UI\IProgressBar.cs">
<SubType>Component</SubType>
@@ -120,6 +141,12 @@
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
+ <EmbeddedResource Include="Template\DropDownItem.resx">
+ <DependentUpon>DropDownItem.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Template\DropDownOverlay.resx">
+ <DependentUpon>DropDownOverlay.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="Template\ResizeOverlay.resx">
<DependentUpon>ResizeOverlay.cs</DependentUpon>
</EmbeddedResource>
@@ -138,9 +165,16 @@
<EmbeddedResource Include="Template\WinXP.resx">
<DependentUpon>WinXP.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="UI\ClassicDropDown.resx">
+ <DependentUpon>ClassicDropDown.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="UI\ClassicTextBox.resx">
+ <DependentUpon>ClassicTextBox.cs</DependentUpon>
+ </EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Content Include="Resources\chord.wav" />
+ <None Include="Resources\ClassicDropDownButton.png" />
<Content Include="Resources\Icon128x.ico" />
<None Include="Resources\WinBadXPStart.wav" />
<None Include="Resources\WinXPWallpaper.png" />
diff --git a/Histacom2.Engine/Properties/Resources.Designer.cs b/Histacom2.Engine/Properties/Resources.Designer.cs
index 2702b7c..fc8232a 100644
--- a/Histacom2.Engine/Properties/Resources.Designer.cs
+++ b/Histacom2.Engine/Properties/Resources.Designer.cs
@@ -19,7 +19,7 @@ namespace Histacom2.Engine.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
@@ -70,6 +70,16 @@ namespace Histacom2.Engine.Properties {
}
/// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap ClassicDropDownButton {
+ get {
+ object obj = ResourceManager.GetObject("ClassicDropDownButton", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] LeviWindows {
diff --git a/Histacom2.Engine/Properties/Resources.resx b/Histacom2.Engine/Properties/Resources.resx
index e00c4f2..f8e7c10 100644
--- a/Histacom2.Engine/Properties/Resources.resx
+++ b/Histacom2.Engine/Properties/Resources.resx
@@ -265,6 +265,9 @@
<data name="WinXP_TopRight" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\winxp\window\winxp_trcorner.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
+ <data name="ClassicDropDownButton" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\ClassicDropDownButton.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
<data name="WinBadXPStart" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\WinBadXPStart.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
diff --git a/Histacom2.Engine/Resources/ClassicDropDownButton.png b/Histacom2.Engine/Resources/ClassicDropDownButton.png
new file mode 100644
index 0000000..4cdc12f
--- /dev/null
+++ b/Histacom2.Engine/Resources/ClassicDropDownButton.png
Binary files differ
diff --git a/Histacom2.Engine/SaveSystem.cs b/Histacom2.Engine/SaveSystem.cs
index 11fbe88..0975a2b 100644
--- a/Histacom2.Engine/SaveSystem.cs
+++ b/Histacom2.Engine/SaveSystem.cs
@@ -127,7 +127,7 @@ namespace Histacom2.Engine
{
var save = new Save();
save.ExperiencedStories = new List<string>();
- if (DevMode == true)
+ if (DevMode)
{
if (ProfileName == "xpbad")
{
@@ -382,7 +382,7 @@ namespace Histacom2.Engine
info.SubDirs = new List<THDirInfo>(256);
info.ByteSize = 0;
- if (updateParent == true)
+ if (updateParent)
{
if ((parent != ProfileDirectory))
{
diff --git a/Histacom2.Engine/Template/DropDownItem.Designer.cs b/Histacom2.Engine/Template/DropDownItem.Designer.cs
new file mode 100644
index 0000000..1318726
--- /dev/null
+++ b/Histacom2.Engine/Template/DropDownItem.Designer.cs
@@ -0,0 +1,63 @@
+namespace Histacom2.Engine.Template
+{
+ partial class DropDownItem
+ {
+ /// <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.SuspendLayout();
+ //
+ // label1
+ //
+ this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.label1.Location = new System.Drawing.Point(0, 0);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(315, 20);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "label1";
+ this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
+ this.label1.Click += new System.EventHandler(this.label1_Click);
+ this.label1.MouseEnter += new System.EventHandler(this.label1_MouseEnter);
+ this.label1.MouseLeave += new System.EventHandler(this.label1_MouseLeave);
+ //
+ // DropDownItem
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.Color.Transparent;
+ this.Controls.Add(this.label1);
+ this.Name = "DropDownItem";
+ this.Size = new System.Drawing.Size(315, 20);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label label1;
+ }
+}
diff --git a/Histacom2.Engine/Template/DropDownItem.cs b/Histacom2.Engine/Template/DropDownItem.cs
new file mode 100644
index 0000000..8b2c654
--- /dev/null
+++ b/Histacom2.Engine/Template/DropDownItem.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;
+
+namespace Histacom2.Engine.Template
+{
+ public partial class DropDownItem : UserControl
+ {
+ public UI.ClassicDropDown dpdw;
+ public DropDownItem()
+ {
+ InitializeComponent();
+ }
+
+ public void ChangeText(string newText, Font fnt)
+ {
+ label1.Font = fnt;
+ label1.Text = newText;
+ }
+
+ private void label1_MouseLeave(object sender, EventArgs e)
+ {
+ label1.BackColor = Color.Transparent;
+ }
+
+ private void label1_Click(object sender, EventArgs e)
+ {
+ dpdw.ChooseItem(label1.Text);
+ }
+
+ private void label1_MouseEnter(object sender, EventArgs e)
+ {
+ label1.BackColor = Color.Blue;
+ }
+ }
+}
diff --git a/Histacom2.Engine/Template/DropDownItem.resx b/Histacom2.Engine/Template/DropDownItem.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/Histacom2.Engine/Template/DropDownItem.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.Engine/Template/DropDownOverlay.Designer.cs b/Histacom2.Engine/Template/DropDownOverlay.Designer.cs
new file mode 100644
index 0000000..6894433
--- /dev/null
+++ b/Histacom2.Engine/Template/DropDownOverlay.Designer.cs
@@ -0,0 +1,64 @@
+namespace Histacom2.Engine.Template
+{
+ partial class DropDownOverlay
+ {
+ /// <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 Windows Form 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.outline = new System.Windows.Forms.Panel();
+ this.SuspendLayout();
+ //
+ // outline
+ //
+ this.outline.BackColor = System.Drawing.Color.White;
+ this.outline.Location = new System.Drawing.Point(230, 56);
+ this.outline.Name = "outline";
+ this.outline.Size = new System.Drawing.Size(200, 100);
+ this.outline.TabIndex = 0;
+ this.outline.Paint += new System.Windows.Forms.PaintEventHandler(this.outline_Paint);
+ //
+ // DropDownOverlay
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(0)))), ((int)(((byte)(1)))));
+ this.ClientSize = new System.Drawing.Size(628, 210);
+ this.Controls.Add(this.outline);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+ this.Name = "DropDownOverlay";
+ this.Text = "DropDownOverlay";
+ this.TopMost = true;
+ this.TransparencyKey = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(0)))), ((int)(((byte)(1)))));
+ this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ public System.Windows.Forms.Panel outline;
+ }
+} \ No newline at end of file
diff --git a/Histacom2.Engine/Template/DropDownOverlay.cs b/Histacom2.Engine/Template/DropDownOverlay.cs
new file mode 100644
index 0000000..4d364d6
--- /dev/null
+++ b/Histacom2.Engine/Template/DropDownOverlay.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace Histacom2.Engine.Template
+{
+ public partial class DropDownOverlay : Form
+ {
+ public DropDownOverlay()
+ {
+ InitializeComponent();
+ }
+
+ private void outline_Paint(object sender, PaintEventArgs e)
+ {
+ e.Graphics.DrawRectangle(Pens.Black, 0, 0, outline.Width - 1, outline.Height - 1); // Draws a 1 pixel border around the dropdown's drop area!
+ if (SaveSystem.currentTheme != null) outline.BackColor = SaveSystem.currentTheme.threeDObjectsColor;
+ }
+ }
+}
diff --git a/Histacom2.Engine/Template/DropDownOverlay.resx b/Histacom2.Engine/Template/DropDownOverlay.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/Histacom2.Engine/Template/DropDownOverlay.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.Engine/Template/WinClassic.Designer.cs b/Histacom2.Engine/Template/WinClassic.Designer.cs
index fd1a02d..8b9497f 100644
--- a/Histacom2.Engine/Template/WinClassic.Designer.cs
+++ b/Histacom2.Engine/Template/WinClassic.Designer.cs
@@ -288,7 +288,6 @@
this.Text = "WinClassic";
this.Activated += new System.EventHandler(this.WinClassic_Activated);
this.Deactivate += new System.EventHandler(this.WinClassic_Deactivate);
- this.Paint += new System.Windows.Forms.PaintEventHandler(this.WinClassic_Paint);
this.program.ResumeLayout(false);
this.programtopbar.ResumeLayout(false);
this.programtopbar.PerformLayout();
diff --git a/Histacom2.Engine/Template/WinClassic.cs b/Histacom2.Engine/Template/WinClassic.cs
index 1f715ab..c911af3 100644
--- a/Histacom2.Engine/Template/WinClassic.cs
+++ b/Histacom2.Engine/Template/WinClassic.cs
@@ -45,7 +45,7 @@ namespace Histacom2.Engine.Template
private void Programtopbar_drag(object sender, MouseEventArgs e)
{
- if (e.Button == MouseButtons.Left && max == false)
+ if (e.Button == MouseButtons.Left && !max)
{
ReleaseCapture();
SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
@@ -194,15 +194,6 @@ namespace Histacom2.Engine.Template
}
}
- private void WinClassic_Paint(object sender, PaintEventArgs e)
- {
- if (Resizing)
- {
- MessageBox.Show("HIT IT");
- e.Graphics.DrawImage(ResizingBmp, 0, 0, this.Width, this.Height);
- }
- }
-
private void border_MouseUp(object sender, MouseEventArgs e)
{
this.Bounds = resizer.ToDraw;
@@ -349,7 +340,7 @@ namespace Histacom2.Engine.Template
private void maximizebutton_Click(object sender, EventArgs e)
{
- if (max == false)
+ if (!max)
{
this.right.Hide();
this.left.Hide();
diff --git a/Histacom2.Engine/Template/WinXP.cs b/Histacom2.Engine/Template/WinXP.cs
index d9b396d..d572fe8 100644
--- a/Histacom2.Engine/Template/WinXP.cs
+++ b/Histacom2.Engine/Template/WinXP.cs
@@ -67,7 +67,7 @@ namespace Histacom2.Engine.Template
private void top_MouseDown(object sender, MouseEventArgs e)
{
- if (e.Button == MouseButtons.Left && max == false)
+ if (e.Button == MouseButtons.Left && !max)
{
ReleaseCapture();
SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
diff --git a/Histacom2.Engine/UI/ClassicDropDown.Designer.cs b/Histacom2.Engine/UI/ClassicDropDown.Designer.cs
new file mode 100644
index 0000000..509c04d
--- /dev/null
+++ b/Histacom2.Engine/UI/ClassicDropDown.Designer.cs
@@ -0,0 +1,133 @@
+namespace Histacom2.Engine.UI
+{
+ partial class ClassicDropDown
+ {
+ /// <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.textBox1 = new System.Windows.Forms.TextBox();
+ this.dropDownSwitch = new System.Windows.Forms.PictureBox();
+ this.tborder = new System.Windows.Forms.PictureBox();
+ this.bborder = new System.Windows.Forms.PictureBox();
+ this.rborder = new System.Windows.Forms.PictureBox();
+ this.lborder = new System.Windows.Forms.PictureBox();
+ ((System.ComponentModel.ISupportInitialize)(this.dropDownSwitch)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.tborder)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.bborder)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.rborder)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.lborder)).BeginInit();
+ this.SuspendLayout();
+ //
+ // textBox1
+ //
+ this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.textBox1.Location = new System.Drawing.Point(2, 2);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(96, 13);
+ this.textBox1.TabIndex = 9;
+ //
+ // dropDownSwitch
+ //
+ this.dropDownSwitch.Dock = System.Windows.Forms.DockStyle.Right;
+ this.dropDownSwitch.Image = global::Histacom2.Engine.Properties.Resources.ClassicDropDownButton;
+ this.dropDownSwitch.Location = new System.Drawing.Point(82, 2);
+ this.dropDownSwitch.Name = "dropDownSwitch";
+ this.dropDownSwitch.Size = new System.Drawing.Size(16, 16);
+ this.dropDownSwitch.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
+ this.dropDownSwitch.TabIndex = 10;
+ this.dropDownSwitch.TabStop = false;
+ this.dropDownSwitch.Click += new System.EventHandler(this.dropDownSwitch_Click);
+ //
+ // tborder
+ //
+ this.tborder.Dock = System.Windows.Forms.DockStyle.Top;
+ this.tborder.Location = new System.Drawing.Point(2, 0);
+ this.tborder.Name = "tborder";
+ this.tborder.Size = new System.Drawing.Size(96, 2);
+ this.tborder.TabIndex = 8;
+ this.tborder.TabStop = false;
+ //
+ // bborder
+ //
+ this.bborder.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.bborder.Location = new System.Drawing.Point(2, 18);
+ this.bborder.Name = "bborder";
+ this.bborder.Size = new System.Drawing.Size(96, 2);
+ this.bborder.TabIndex = 5;
+ this.bborder.TabStop = false;
+ //
+ // rborder
+ //
+ this.rborder.Dock = System.Windows.Forms.DockStyle.Right;
+ this.rborder.Location = new System.Drawing.Point(98, 0);
+ this.rborder.Name = "rborder";
+ this.rborder.Size = new System.Drawing.Size(2, 20);
+ this.rborder.TabIndex = 7;
+ this.rborder.TabStop = false;
+ //
+ // lborder
+ //
+ this.lborder.Dock = System.Windows.Forms.DockStyle.Left;
+ this.lborder.Location = new System.Drawing.Point(0, 0);
+ this.lborder.Name = "lborder";
+ this.lborder.Size = new System.Drawing.Size(2, 20);
+ this.lborder.TabIndex = 6;
+ this.lborder.TabStop = false;
+ //
+ // ClassicDropDown
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.dropDownSwitch);
+ this.Controls.Add(this.textBox1);
+ this.Controls.Add(this.tborder);
+ this.Controls.Add(this.bborder);
+ this.Controls.Add(this.rborder);
+ this.Controls.Add(this.lborder);
+ this.Name = "ClassicDropDown";
+ this.Size = new System.Drawing.Size(100, 20);
+ this.Load += new System.EventHandler(this.ClassicDropDown_Load);
+ ((System.ComponentModel.ISupportInitialize)(this.dropDownSwitch)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.tborder)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.bborder)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.rborder)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.lborder)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.PictureBox tborder;
+ private System.Windows.Forms.PictureBox bborder;
+ private System.Windows.Forms.PictureBox rborder;
+ private System.Windows.Forms.PictureBox lborder;
+ private System.Windows.Forms.PictureBox dropDownSwitch;
+ }
+}
diff --git a/Histacom2.Engine/UI/ClassicDropDown.cs b/Histacom2.Engine/UI/ClassicDropDown.cs
new file mode 100644
index 0000000..93b4a62
--- /dev/null
+++ b/Histacom2.Engine/UI/ClassicDropDown.cs
@@ -0,0 +1,167 @@
+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.Template;
+
+namespace Histacom2.Engine.UI
+{
+ public partial class ClassicDropDown : UserControl
+ {
+ public DropDownOverlay thisOverlay = new DropDownOverlay();
+ public bool UseSystemPasswordChar { get; set; }
+ public bool dropDownShown;
+
+ public override string Text
+ {
+ get
+ {
+ return textBox1.Text;
+ }
+ set
+ {
+ textBox1.Text = value;
+ }
+ }
+
+ public static Color textboxcolor = Color.Black;
+
+ public static Color _lightBack = Color.Silver;
+ public static Color _darkBack = Color.Silver;
+
+ public List<string> items = new List<string> { "TestItem" };
+
+ public ClassicDropDown()
+ {
+ InitializeComponent();
+
+
+ try
+ {
+ // Draw the border
+
+ this.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
+ {
+ // Update a bunch of variables!
+ textBox1.Font = Font;
+
+ if (SaveSystem.currentTheme != null)
+ {
+ textBox1.BackColor = SaveSystem.currentTheme.threeDObjectsColor;
+ BackColor = SaveSystem.currentTheme.threeDObjectsColor;
+
+ textboxcolor = SaveSystem.currentTheme.windowColor;
+
+ _lightBack = Paintbrush.GetLightFromColor(textboxcolor);
+ _darkBack = Paintbrush.GetDarkFromColor(textboxcolor);
+ }
+ else
+ {
+ textBox1.BackColor = Color.White;
+ BackColor = Color.White;
+ }
+ });
+
+
+
+ tborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
+ {
+ e.Graphics.DrawLine(new Pen(_darkBack), 0, 0, tborder.Width, 0);
+ e.Graphics.DrawLine(Pens.Black, 0, 1, tborder.Width, 1);
+
+ });
+
+ lborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
+ {
+ e.Graphics.DrawLine(new Pen(_darkBack), 0, 0, 0, Height);
+ e.Graphics.DrawLine(Pens.Black, 1, 0, 1, Height);
+ });
+
+ rborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
+ {
+ e.Graphics.DrawLine(new Pen(_lightBack), 0, 0, 0, Height - 1);
+ e.Graphics.DrawLine(new Pen(textboxcolor), 1, 0, 1, Height - 1);
+ });
+
+ bborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
+ {
+ e.Graphics.DrawLine(new Pen(_lightBack), 0, 0, Width - 1, 0);
+ e.Graphics.DrawLine(new Pen(textboxcolor), 0, 1, Width - 2, 1);
+ });
+
+ tborder.Invalidate();
+ lborder.Invalidate();
+ rborder.Invalidate();
+ bborder.Invalidate();
+ }
+ catch { }
+ }
+
+ public void ChooseItem(string str)
+ {
+ textBox1.Text = str;
+ ShowHideDropDown();
+ }
+
+ public void ShowHideDropDown()
+ {
+ if (dropDownShown)
+ {
+ thisOverlay.Close();
+ dropDownShown = false;
+ } else {
+ thisOverlay = new DropDownOverlay();
+ int applyHeight = 0;
+ foreach (string str in items)
+ {
+ DropDownItem itm = new DropDownItem();
+ itm.ChangeText(str, Font);
+ itm.dpdw = this;
+ itm.Dock = DockStyle.Top;
+ applyHeight += itm.Height;
+ thisOverlay.outline.Controls.Add(itm);
+ }
+ thisOverlay.outline.Location = this.PointToScreen(Point.Empty);
+ thisOverlay.outline.Top += this.Height;
+ thisOverlay.outline.Size = new Size(this.Width, applyHeight);
+
+ thisOverlay.Deactivate += (sender2, e2) => { thisOverlay.Close(); dropDownShown = false; };
+
+ thisOverlay.Show();
+ dropDownShown = true;
+ }
+ }
+
+ private void dropDownSwitch_Click(object sender, EventArgs e)
+ {
+ ShowHideDropDown();
+ }
+
+ private void ClassicDropDown_Load(object sender, EventArgs e)
+ {
+ try
+ {
+ ((Form)this.TopLevelControl).FormClosed += (sender2, e2) => { thisOverlay.Close(); };
+ ((Form)this.TopLevelControl).Resize += (sender2, e2) =>
+ {
+ thisOverlay.outline.Location = this.PointToScreen(Point.Empty);
+ thisOverlay.outline.Top += this.Height;
+ thisOverlay.BringToFront();
+ };
+
+ ((Form)this.TopLevelControl).Move += (sender2, e2) =>
+ {
+ thisOverlay.outline.Location = this.PointToScreen(Point.Empty);
+ thisOverlay.outline.Top += this.Height;
+ thisOverlay.BringToFront();
+ };
+ } catch { }
+
+ }
+ }
+}
diff --git a/Histacom2.Engine/UI/ClassicDropDown.resx b/Histacom2.Engine/UI/ClassicDropDown.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/Histacom2.Engine/UI/ClassicDropDown.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.Engine/UI/ClassicTextBox.Designer.cs b/Histacom2.Engine/UI/ClassicTextBox.Designer.cs
new file mode 100644
index 0000000..af6b199
--- /dev/null
+++ b/Histacom2.Engine/UI/ClassicTextBox.Designer.cs
@@ -0,0 +1,115 @@
+namespace Histacom2.Engine.UI
+{
+ partial class ClassicTextBox
+ {
+ /// <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.bborder = new System.Windows.Forms.PictureBox();
+ this.lborder = new System.Windows.Forms.PictureBox();
+ this.rborder = new System.Windows.Forms.PictureBox();
+ this.tborder = new System.Windows.Forms.PictureBox();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ ((System.ComponentModel.ISupportInitialize)(this.bborder)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.lborder)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.rborder)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.tborder)).BeginInit();
+ this.SuspendLayout();
+ //
+ // bborder
+ //
+ this.bborder.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.bborder.Location = new System.Drawing.Point(2, 15);
+ this.bborder.Name = "bborder";
+ this.bborder.Size = new System.Drawing.Size(96, 2);
+ this.bborder.TabIndex = 0;
+ this.bborder.TabStop = false;
+ //
+ // lborder
+ //
+ this.lborder.Dock = System.Windows.Forms.DockStyle.Left;
+ this.lborder.Location = new System.Drawing.Point(0, 0);
+ this.lborder.Name = "lborder";
+ this.lborder.Size = new System.Drawing.Size(2, 17);
+ this.lborder.TabIndex = 1;
+ this.lborder.TabStop = false;
+ //
+ // rborder
+ //
+ this.rborder.Dock = System.Windows.Forms.DockStyle.Right;
+ this.rborder.Location = new System.Drawing.Point(98, 0);
+ this.rborder.Name = "rborder";
+ this.rborder.Size = new System.Drawing.Size(2, 17);
+ this.rborder.TabIndex = 2;
+ this.rborder.TabStop = false;
+ //
+ // tborder
+ //
+ this.tborder.Dock = System.Windows.Forms.DockStyle.Top;
+ this.tborder.Location = new System.Drawing.Point(2, 0);
+ this.tborder.Name = "tborder";
+ this.tborder.Size = new System.Drawing.Size(96, 2);
+ this.tborder.TabIndex = 3;
+ this.tborder.TabStop = false;
+ //
+ // textBox1
+ //
+ this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.textBox1.Location = new System.Drawing.Point(2, 2);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(96, 13);
+ this.textBox1.TabIndex = 4;
+ //
+ // ClassicTextBox
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.textBox1);
+ this.Controls.Add(this.tborder);
+ this.Controls.Add(this.bborder);
+ this.Controls.Add(this.rborder);
+ this.Controls.Add(this.lborder);
+ this.Name = "ClassicTextBox";
+ this.Size = new System.Drawing.Size(100, 17);
+ ((System.ComponentModel.ISupportInitialize)(this.bborder)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.lborder)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.rborder)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.tborder)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.PictureBox bborder;
+ private System.Windows.Forms.PictureBox lborder;
+ private System.Windows.Forms.PictureBox rborder;
+ private System.Windows.Forms.PictureBox tborder;
+ private System.Windows.Forms.TextBox textBox1;
+ }
+}
diff --git a/Histacom2.Engine/UI/ClassicTextBox.resx b/Histacom2.Engine/UI/ClassicTextBox.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/Histacom2.Engine/UI/ClassicTextBox.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.Engine/UI/ClassicTextbox.cs b/Histacom2.Engine/UI/ClassicTextbox.cs
index e38af16..f89df03 100644
--- a/Histacom2.Engine/UI/ClassicTextbox.cs
+++ b/Histacom2.Engine/UI/ClassicTextbox.cs
@@ -1,6 +1,8 @@
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;
@@ -8,47 +10,91 @@ using System.Windows.Forms;
namespace Histacom2.Engine.UI
{
- public class ClassicTextbox : Control
+ public partial class ClassicTextBox : UserControl
{
public bool UseSystemPasswordChar { get; set; }
- public ClassicTextbox() : base()
+ public static Color textboxcolor = Color.Black;
+
+ public static Color _lightBack = Color.Silver;
+ public static Color _darkBack = Color.Silver;
+
+ public override string Text
{
- if (SaveSystem.currentTheme != null) Font = SaveSystem.currentTheme.buttonFont;
- else Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular);
+ get
+ {
+ return textBox1.Text;
+ }
+ set
+ {
+ textBox1.Text = value;
+ }
}
- protected override void OnPaint(PaintEventArgs e)
+ public ClassicTextBox()
{
- base.OnPaint(e);
+ InitializeComponent();
+
+ try
+ {
+ // Draw the border
+
+ this.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
+ {
+ // Update a bunch of variables!
+ textBox1.Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular);
+
+ if (SaveSystem.currentTheme != null)
+ {
+ textBox1.BackColor = SaveSystem.currentTheme.threeDObjectsColor;
+ BackColor = SaveSystem.currentTheme.threeDObjectsColor;
+ }
+ else
+ {
+ textBox1.BackColor = Color.White;
+ BackColor = Color.White;
+ }
+
+ if (SaveSystem.currentTheme != null)
+ {
+ textboxcolor = SaveSystem.currentTheme.windowColor;
+
+ _lightBack = Paintbrush.GetLightFromColor(textboxcolor);
+ _darkBack = Paintbrush.GetDarkFromColor(textboxcolor);
+ }
+ });
- var textboxcolor = Color.Silver;
- if (SaveSystem.currentTheme != null) textboxcolor = SaveSystem.currentTheme.windowColor;
- if (SaveSystem.currentTheme != null) BackColor = SaveSystem.currentTheme.threeDObjectsColor;
- else BackColor = Color.White;
+ tborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
+ {
+ e.Graphics.DrawLine(new Pen(_darkBack), 0, 0, tborder.Width, 0);
+ e.Graphics.DrawLine(Pens.Black, 0, 1, tborder.Width, 1);
- var _lightBack = Paintbrush.GetLightFromColor(textboxcolor);
- var _darkBack = Paintbrush.GetDarkFromColor(textboxcolor);
+ });
- if (SaveSystem.currentTheme != null) Font = SaveSystem.currentTheme.buttonFont;
- else Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular);
+ lborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
+ {
+ e.Graphics.DrawLine(new Pen(_darkBack), 0, 0, 0, Height);
+ e.Graphics.DrawLine(Pens.Black, 1, 0, 1, Height);
+ });
- var g = e.Graphics;
- g.Clear(BackColor);
+ rborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
+ {
+ e.Graphics.DrawLine(new Pen(_lightBack), 0, 0, 0, Height - 1);
+ e.Graphics.DrawLine(new Pen(textboxcolor), 1, 0, 1, Height - 1);
+ });
- g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit;
- if (UseSystemPasswordChar) g.DrawString(new string('●', Text.Length), Font, Brushes.Black, 3, 3);
- else g.DrawString(Text, Font, Brushes.Black, 3, 3);
+ bborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
+ {
+ e.Graphics.DrawLine(new Pen(_lightBack), 0, 0, Width - 1, 0);
+ e.Graphics.DrawLine(new Pen(textboxcolor), 0, 1, Width - 2, 1);
+ });
- g.DrawLine(new Pen(_darkBack), 0, 0, Width - 2, 0);
- g.DrawLine(new Pen(_lightBack), Width - 1, 0, Width - 1, Height - 1);
- g.DrawLine(new Pen(_lightBack), 0, Height - 1, Width - 1, Height - 1);
- g.DrawLine(new Pen(_darkBack), 0, 0, 0, Height - 2);
- g.DrawLine(Pens.Black, 1, 1, Width - 3, 1);
- g.DrawLine(Pens.Black, 1, 1, 1, Height - 3);
- g.DrawLine(new Pen(textboxcolor), 1, Height - 2, Width - 2, Height - 2);
- g.DrawLine(new Pen(textboxcolor), Width - 2, Height - 2, Width - 2, 1);
+ tborder.Invalidate();
+ lborder.Invalidate();
+ rborder.Invalidate();
+ bborder.Invalidate();
+ } catch { }
}
}
}
diff --git a/Histacom2.Engine/WindowManager.cs b/Histacom2.Engine/WindowManager.cs
index 4829154..03fe91b 100644
--- a/Histacom2.Engine/WindowManager.cs
+++ b/Histacom2.Engine/WindowManager.cs
@@ -50,14 +50,14 @@ namespace Histacom2.Engine
else app.programIcon.Image = icon;
// Check if Max button is enabled and set proper X for Min button
- if (MaxButton == false)
+ if (!MaxButton)
{
app.maximizebutton.Visible = false;
app.minimizebutton.Location = new Point(app.closebutton.Location.X - 14, app.minimizebutton.Location.Y);
}
// Check if Min button is enabled
- if (MinButton == false)
+ if (!MinButton)
{
app.minimizebutton.Visible = false;
app.minimizebutton.Location = new Point(app.minimizebutton.Location.X, app.minimizebutton.Location.Y);
@@ -85,7 +85,7 @@ namespace Histacom2.Engine
// Show the app
app.TopMost = true;
- if (ShowApplicationAsDialog == false) { app.Show(); } else { app.ShowDialog(); }
+ if (!ShowApplicationAsDialog) { app.Show(); } else { app.ShowDialog(); }
return app;
}
@@ -117,14 +117,14 @@ namespace Histacom2.Engine
else app.programIcon.Image = icon;
// Check if Max button is enabled and set proper X for Min button
- if (MaxButton == false)
+ if (!MaxButton)
{
app.maximizebutton.Visible = false;
app.minimizebutton.Location = new Point(app.closebutton.Location.X - 14, app.minimizebutton.Location.Y);
}
// Check if Min button is enabled
- if (MinButton == false)
+ if (!MinButton)
{
app.minimizebutton.Visible = false;
app.minimizebutton.Location = new Point(app.minimizebutton.Location.X, app.minimizebutton.Location.Y);
@@ -148,7 +148,7 @@ namespace Histacom2.Engine
// Show the app
app.TopMost = true;
- if (ShowApplicationAsDialog == false) { app.Show(); } else { app.ShowDialog(); }
+ if (!ShowApplicationAsDialog) { app.Show(); } else { app.ShowDialog(); }
return app;
}
diff --git a/Histacom2/GlobalPrograms/WinClassicNotepad.cs b/Histacom2/GlobalPrograms/WinClassicNotepad.cs
index 1a58d8e..de838e0 100644
--- a/Histacom2/GlobalPrograms/WinClassicNotepad.cs
+++ b/Histacom2/GlobalPrograms/WinClassicNotepad.cs
@@ -100,16 +100,21 @@ namespace Histacom2.GlobalPrograms
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (CurrentFilePath == "")
+ try
{
- // We aren't in a file right now
+ if (CurrentFilePath == "")
+ {
+ // We aren't in a file right now
- SaveAs();
- } else {
+ SaveAs();
+ }
+ else
+ {
- File.Delete(CurrentFilePath);
- SaveSystem.CreateWindowsFile(new FileInfo(CurrentFilePath).Directory.FullName, CurrentFilePath.Split('\\').Last(), mainText.Text, 12, mainText.Text.Length);
- }
+ File.Delete(CurrentFilePath);
+ SaveSystem.CreateWindowsFile(new FileInfo(CurrentFilePath).Directory.FullName, CurrentFilePath.Split('\\').Last(), mainText.Text, 12, mainText.Text.Length);
+ }
+ } catch { } // This try catch loop was added due the game crashing if the desktop is updating the same time the notepad is saving... which I got!
}
void SaveAs()
@@ -118,6 +123,7 @@ namespace Histacom2.GlobalPrograms
{
ActivateSaveFileDialog(".txt");
string selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath();
+ DeactivateFileDialog();
if (selectedPath != "")
{
diff --git a/Histacom2/OS/Win95/Win95Apps/MineSweeper/Square.cs b/Histacom2/OS/Win95/Win95Apps/MineSweeper/Square.cs
index 4f80240..2ebb319 100644
--- a/Histacom2/OS/Win95/Win95Apps/MineSweeper/Square.cs
+++ b/Histacom2/OS/Win95/Win95Apps/MineSweeper/Square.cs
@@ -108,7 +108,7 @@ namespace Histacom2.OS.Win95.Win95Apps.MineSweeper
this.Open();
}
}
- if (_game.ftime == true && !Minded)
+ if (_game.ftime && !Minded)
{
_game.ftime = false;
_game._timer = new Timer();
diff --git a/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs b/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs
index 2a03c7e..958e8a0 100644
--- a/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs
+++ b/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs
@@ -129,7 +129,7 @@ namespace Histacom2.OS.Win95.Win95Apps
private void timer1_Tick(object sender, EventArgs e)
{
- if (_game.win == true)
+ if (_game.win)
{
button1.BackgroundImage = Properties.Resources.WinClassicMinesweeperWin;
switch (level)
diff --git a/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs b/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs
index 2c12029..a918cda 100644
--- a/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs
+++ b/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs
@@ -75,7 +75,7 @@ namespace Histacom2.OS.Win95.Win95Apps.Story
public static void CheckIfSoundFinished(Object sender, EventArgs e)
{
- if (soundThread.IsAlive == false)
+ if (!soundThread.IsAlive)
{
// Continue from where we were
System.Windows.Forms.Timer trm = sender as System.Windows.Forms.Timer;
diff --git a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs
index 8939b84..a4bd611 100644
--- a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs
+++ b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs
@@ -30,10 +30,6 @@
{
this.components = new System.ComponentModel.Container();
this.program = new System.Windows.Forms.Panel();
- this.pnlSave = new System.Windows.Forms.Panel();
- this.Button1 = new System.Windows.Forms.Button();
- this.Label1 = new System.Windows.Forms.Label();
- this.txtSave = new System.Windows.Forms.TextBox();
this.mainView = new System.Windows.Forms.ListView();
this.diskView = new System.Windows.Forms.TreeView();
this.MenuStrip1 = new System.Windows.Forms.MenuStrip();
@@ -55,13 +51,18 @@
this.HelpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.AboutWindows95ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toprightcorner = new System.Windows.Forms.Panel();
- this.bottomrightcorner = new System.Windows.Forms.Panel();
- this.bottomleftcorner = new System.Windows.Forms.Panel();
this.topleftcorner = new System.Windows.Forms.Panel();
+ this.pnlSave = new System.Windows.Forms.Panel();
this.refresh = new System.Windows.Forms.Timer(this.components);
+ this.btnCanc = new Histacom2.Engine.UI.ClassicButton();
+ this.cmbType = new Histacom2.Engine.UI.ClassicDropDown();
+ this.txtSave = new Histacom2.Engine.UI.ClassicTextBox();
+ this.classicLabel2 = new Histacom2.Engine.UI.ClassicLabel();
+ this.classicLabel1 = new Histacom2.Engine.UI.ClassicLabel();
+ this.btnSave = new Histacom2.Engine.UI.ClassicButton();
this.program.SuspendLayout();
- this.pnlSave.SuspendLayout();
this.MenuStrip1.SuspendLayout();
+ this.pnlSave.SuspendLayout();
this.SuspendLayout();
//
// program
@@ -71,8 +72,6 @@
this.program.Controls.Add(this.diskView);
this.program.Controls.Add(this.MenuStrip1);
this.program.Controls.Add(this.toprightcorner);
- this.program.Controls.Add(this.bottomrightcorner);
- this.program.Controls.Add(this.bottomleftcorner);
this.program.Controls.Add(this.topleftcorner);
this.program.Controls.Add(this.pnlSave);
this.program.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -81,54 +80,12 @@
this.program.Size = new System.Drawing.Size(704, 517);
this.program.TabIndex = 13;
//
- // pnlSave
- //
- this.pnlSave.Controls.Add(this.Button1);
- this.pnlSave.Controls.Add(this.Label1);
- this.pnlSave.Controls.Add(this.txtSave);
- this.pnlSave.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.pnlSave.Location = new System.Drawing.Point(0, 482);
- this.pnlSave.Name = "pnlSave";
- this.pnlSave.Size = new System.Drawing.Size(704, 35);
- this.pnlSave.TabIndex = 18;
- this.pnlSave.Visible = false;
- //
- // Button1
- //
- this.Button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.Button1.Location = new System.Drawing.Point(629, 1);
- this.Button1.Name = "Button1";
- this.Button1.Size = new System.Drawing.Size(75, 23);
- this.Button1.TabIndex = 17;
- this.Button1.Text = "Save";
- this.Button1.UseVisualStyleBackColor = true;
- this.Button1.Click += new System.EventHandler(this.Button1_Click);
- //
- // Label1
- //
- this.Label1.AutoSize = true;
- this.Label1.Location = new System.Drawing.Point(3, 6);
- this.Label1.Name = "Label1";
- this.Label1.Size = new System.Drawing.Size(57, 13);
- this.Label1.TabIndex = 16;
- this.Label1.Text = "File Name:";
- //
- // txtSave
- //
- this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.txtSave.Location = new System.Drawing.Point(60, 3);
- this.txtSave.Name = "txtSave";
- this.txtSave.Size = new System.Drawing.Size(563, 20);
- this.txtSave.TabIndex = 15;
- //
// mainView
//
this.mainView.Dock = System.Windows.Forms.DockStyle.Fill;
this.mainView.Location = new System.Drawing.Point(213, 24);
this.mainView.Name = "mainView";
- this.mainView.Size = new System.Drawing.Size(491, 458);
+ this.mainView.Size = new System.Drawing.Size(491, 439);
this.mainView.TabIndex = 10;
this.mainView.UseCompatibleStateImageBehavior = false;
this.mainView.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.mainView_AfterLabelEdit);
@@ -139,7 +96,7 @@
this.diskView.Dock = System.Windows.Forms.DockStyle.Left;
this.diskView.Location = new System.Drawing.Point(0, 24);
this.diskView.Name = "diskView";
- this.diskView.Size = new System.Drawing.Size(213, 458);
+ this.diskView.Size = new System.Drawing.Size(213, 439);
this.diskView.TabIndex = 13;
this.diskView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.diskView_AfterSelect);
//
@@ -297,23 +254,6 @@
this.toprightcorner.Size = new System.Drawing.Size(4, 4);
this.toprightcorner.TabIndex = 6;
//
- // bottomrightcorner
- //
- this.bottomrightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.bottomrightcorner.Cursor = System.Windows.Forms.Cursors.SizeNWSE;
- this.bottomrightcorner.Location = new System.Drawing.Point(700, 513);
- this.bottomrightcorner.Name = "bottomrightcorner";
- this.bottomrightcorner.Size = new System.Drawing.Size(4, 4);
- this.bottomrightcorner.TabIndex = 4;
- //
- // bottomleftcorner
- //
- this.bottomleftcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.bottomleftcorner.Location = new System.Drawing.Point(0, 513);
- this.bottomleftcorner.Name = "bottomleftcorner";
- this.bottomleftcorner.Size = new System.Drawing.Size(4, 4);
- this.bottomleftcorner.TabIndex = 2;
- //
// topleftcorner
//
this.topleftcorner.Location = new System.Drawing.Point(0, 0);
@@ -321,11 +261,103 @@
this.topleftcorner.Size = new System.Drawing.Size(4, 4);
this.topleftcorner.TabIndex = 1;
//
+ // pnlSave
+ //
+ this.pnlSave.Controls.Add(this.btnCanc);
+ this.pnlSave.Controls.Add(this.cmbType);
+ this.pnlSave.Controls.Add(this.txtSave);
+ this.pnlSave.Controls.Add(this.classicLabel2);
+ this.pnlSave.Controls.Add(this.classicLabel1);
+ this.pnlSave.Controls.Add(this.btnSave);
+ this.pnlSave.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.pnlSave.Location = new System.Drawing.Point(0, 463);
+ this.pnlSave.Name = "pnlSave";
+ this.pnlSave.Size = new System.Drawing.Size(704, 54);
+ this.pnlSave.TabIndex = 18;
+ this.pnlSave.Visible = false;
+ //
// refresh
//
this.refresh.Interval = 15000;
this.refresh.Tick += new System.EventHandler(this.refresh_Tick);
//
+ // btnCanc
+ //
+ this.btnCanc.AdaptBackColorWithTheme = true;
+ this.btnCanc.AdaptFontWithTheme = true;
+ this.btnCanc.AdaptForeColorWithTheme = true;
+ this.btnCanc.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnCanc.BackColor = System.Drawing.Color.Silver;
+ this.btnCanc.DialogResult = System.Windows.Forms.DialogResult.None;
+ this.btnCanc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.btnCanc.ForeColor = System.Drawing.Color.Black;
+ this.btnCanc.Location = new System.Drawing.Point(611, 27);
+ this.btnCanc.Name = "btnCanc";
+ this.btnCanc.Size = new System.Drawing.Size(75, 25);
+ this.btnCanc.TabIndex = 24;
+ this.btnCanc.Text = "Cancel";
+ this.btnCanc.Click += new System.EventHandler(this.btnCanc_Click);
+ //
+ // cmbType
+ //
+ this.cmbType.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.cmbType.BackColor = System.Drawing.Color.White;
+ this.cmbType.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.cmbType.Location = new System.Drawing.Point(56, 31);
+ this.cmbType.Name = "cmbType";
+ this.cmbType.Size = new System.Drawing.Size(549, 20);
+ this.cmbType.TabIndex = 23;
+ this.cmbType.UseSystemPasswordChar = false;
+ //
+ // txtSave
+ //
+ this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.txtSave.BackColor = System.Drawing.Color.White;
+ this.txtSave.Location = new System.Drawing.Point(56, 6);
+ this.txtSave.Name = "txtSave";
+ this.txtSave.Size = new System.Drawing.Size(549, 20);
+ this.txtSave.TabIndex = 22;
+ this.txtSave.UseSystemPasswordChar = false;
+ //
+ // classicLabel2
+ //
+ this.classicLabel2.DropShadow = false;
+ this.classicLabel2.Location = new System.Drawing.Point(3, 32);
+ this.classicLabel2.Name = "classicLabel2";
+ this.classicLabel2.Size = new System.Drawing.Size(64, 13);
+ this.classicLabel2.TabIndex = 19;
+ this.classicLabel2.Text = "File type:";
+ //
+ // classicLabel1
+ //
+ this.classicLabel1.DropShadow = false;
+ this.classicLabel1.Location = new System.Drawing.Point(3, 6);
+ this.classicLabel1.Name = "classicLabel1";
+ this.classicLabel1.Size = new System.Drawing.Size(64, 13);
+ this.classicLabel1.TabIndex = 19;
+ this.classicLabel1.Text = "File name:";
+ //
+ // btnSave
+ //
+ this.btnSave.AdaptBackColorWithTheme = true;
+ this.btnSave.AdaptFontWithTheme = true;
+ this.btnSave.AdaptForeColorWithTheme = true;
+ this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnSave.BackColor = System.Drawing.Color.Silver;
+ this.btnSave.DialogResult = System.Windows.Forms.DialogResult.None;
+ this.btnSave.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.btnSave.ForeColor = System.Drawing.Color.Black;
+ this.btnSave.Location = new System.Drawing.Point(611, 1);
+ this.btnSave.Name = "btnSave";
+ this.btnSave.Size = new System.Drawing.Size(75, 25);
+ this.btnSave.TabIndex = 17;
+ this.btnSave.Text = "Save";
+ this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
+ //
// Win95WindowsExplorer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -336,10 +368,9 @@
this.Load += new System.EventHandler(this.WinClassicWindowsExplorer_Load);
this.program.ResumeLayout(false);
this.program.PerformLayout();
- this.pnlSave.ResumeLayout(false);
- this.pnlSave.PerformLayout();
this.MenuStrip1.ResumeLayout(false);
this.MenuStrip1.PerformLayout();
+ this.pnlSave.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -367,14 +398,15 @@
internal System.Windows.Forms.ToolStripMenuItem HelpToolStripMenuItem1;
internal System.Windows.Forms.ToolStripMenuItem AboutWindows95ToolStripMenuItem;
internal System.Windows.Forms.Panel toprightcorner;
- internal System.Windows.Forms.Panel bottomrightcorner;
- internal System.Windows.Forms.Panel bottomleftcorner;
internal System.Windows.Forms.Panel topleftcorner;
internal System.Windows.Forms.ListView mainView;
internal System.Windows.Forms.Panel pnlSave;
- internal System.Windows.Forms.Button Button1;
- internal System.Windows.Forms.Label Label1;
- internal System.Windows.Forms.TextBox txtSave;
private System.Windows.Forms.Timer refresh;
+ private Engine.UI.ClassicButton btnSave;
+ private Engine.UI.ClassicLabel classicLabel2;
+ private Engine.UI.ClassicLabel classicLabel1;
+ private Engine.UI.ClassicTextBox txtSave;
+ private Engine.UI.ClassicDropDown cmbType;
+ private Engine.UI.ClassicButton btnCanc;
}
}
diff --git a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs
index 2542eba..8f946ab 100644
--- a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs
+++ b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs
@@ -36,6 +36,18 @@ namespace Histacom2.OS.Win95.Win95Apps
public Win95WindowsExplorer()
{
InitializeComponent();
+
+
+ // Fonts! yoy!
+
+ foreach (Control ctrl in this.Controls)
+ {
+ ctrl.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ }
+
+ txtSave.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ cmbType.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ //Histacom2.Engine.UI.CustomTextBox ctb = new Histacom2.Engine.UI.CustomTextBox(textBox1);
}
void WinClassicWindowsExplorer_Load(object sender, EventArgs e)
@@ -97,17 +109,17 @@ namespace Histacom2.OS.Win95.Win95Apps
IsFileSaveDialog = true;
}
- if (IsFileOpenDialog == true)
+ if (IsFileOpenDialog)
{
pnlSave.Show();
- Button1.Text = "Open";
+ btnSave.Text = "Open";
}
else
{
- if (IsFileSaveDialog == true)
+ if (IsFileSaveDialog)
{
pnlSave.Show();
- Button1.Text = "Save";
+ btnSave.Text = "Save";
}
}
@@ -121,9 +133,9 @@ namespace Histacom2.OS.Win95.Win95Apps
FileSystemFolderInfo toRead = new FileSystemFolderInfo();
toRead = JsonConvert.DeserializeObject<FileSystemFolderInfo>(directoryFileInfo);
- if (returnYesIfProtected == true)
+ if (returnYesIfProtected)
{
- if (toRead.IsProtected == true) return "yes";
+ if (toRead.IsProtected) return "yes";
}
else return toRead.Label;
return Val;
@@ -707,36 +719,30 @@ namespace Histacom2.OS.Win95.Win95Apps
RefreshTreeNode();
}
- private void Button1_Click(object sender, EventArgs e)
+ private void btnSave_Click(object sender, EventArgs e)
{
try
{
- bool OpenFile = false;
if (mainView.FocusedItem != null)
{
if (mainView.FocusedItem.Tag.ToString() == "")
{ // If it isn't a file
GoToDir(Path.Combine(CurrentDirectory, mainView.FocusedItem.Tag.ToString()));
}
- else OpenFile = true; // If it is a file
+ else txtSave.Text = mainView.FocusedItem.Tag.ToString();
}
- else OpenFile = true;
- if (OpenFile == true)
+ if (txtSave.Text == "") wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK);
+ else
{
- if (txtSave.Text == "") wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK);
- else
- {
- if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension) Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text);
+ if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension) Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text);
- FileDialogBoxManager.IsInOpenDialog = false;
- FileDialogBoxManager.IsInSaveDialog = false;
+ FileDialogBoxManager.IsInOpenDialog = false;
+ FileDialogBoxManager.IsInSaveDialog = false;
- ((Form)this.TopLevelControl).Close();
- }
+ ((Form)this.TopLevelControl).Close();
}
- } catch {
-
}
+ catch { }
}
private void DeleteToolStripMenuItem_Click(object sender, EventArgs e)
@@ -1036,5 +1042,10 @@ namespace Histacom2.OS.Win95.Win95Apps
RefreshTreeNode();
}
+
+ private void btnCanc_Click(object sender, EventArgs e)
+ {
+ ((Form)this.TopLevelControl).Close();
+ }
}
}
diff --git a/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs b/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs
index bc28c3a..df531c3 100644
--- a/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs
+++ b/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs
@@ -74,64 +74,67 @@ namespace Histacom2.OS.Win95.Win95Apps
private void ftpFiles_DoubleClick(object sender, EventArgs e)
{
- Point objDrawingPoint = ftpFiles.PointToClient(Cursor.Position);
- ListViewItem objListViewItem = new ListViewItem();
- if (objDrawingPoint != null)
+ try
{
- objListViewItem = ftpFiles.GetItemAt(objDrawingPoint.X, objDrawingPoint.Y);
- if (objListViewItem.Text == "/software/")
+ Point objDrawingPoint = ftpFiles.PointToClient(Cursor.Position);
+ ListViewItem objListViewItem = new ListViewItem();
+ if (objDrawingPoint != null)
{
- ftpFiles.Clear();
- ListViewItem listViewItem1 = new ListViewItem(new string[] { "/downloads/" }, 0, Color.Black, Color.Empty, null);
- ListViewItem listViewItem2 = new ListViewItem(new string[] { "skindows.html" }, 1, Color.Black, Color.Empty, null);
- ftpFiles.Items.AddRange(new ListViewItem[] { listViewItem1, listViewItem2 });
- }
- else if (objListViewItem.Text == "/downloads/")
- {
- ftpFiles.Clear();
- ListViewItem listViewItem1 = new ListViewItem(new string[] { "/totallynotthetimedistorter/" }, 0, Color.Black, Color.Empty, null);
- ListViewItem listViewItem2 = new ListViewItem(new string[] { "FTP Client Setup.exe" }, 2, Color.Black, Color.Empty, null);
- ListViewItem listViewItem3 = new ListViewItem(new string[] { "Web Chat Setup.exe" }, 2, Color.Black, Color.Empty, null);
- ListViewItem listViewItem4 = new ListViewItem(new string[] { "Guess The Number V1 Setup.exe" }, 2, Color.Black, Color.Empty, null);
- ftpFiles.Items.AddRange(new ListViewItem[] { listViewItem1, listViewItem2, listViewItem3, listViewItem4 });
- }
- else if (objListViewItem.Text == "/totallynotthetimedistorter/")
- {
- ftpFiles.Clear();
- ListViewItem listViewItem1 = new ListViewItem(new string[] { "Time Distorter Setup.exe" }, 2, Color.Black, Color.Empty, null);
- ftpFiles.Items.AddRange(new ListViewItem[] { listViewItem1 });
- }
- else if (objListViewItem.Text == "FTP Client Setup.exe")
- {
- WinClassicDownloader opendownload = new WinClassicDownloader();
- WindowManager wm = new WindowManager();
- wm.Init(opendownload, "Downloader", null, false, true);
- opendownload.appName.Text = "Downloading: FTP Client";
- }
- else if (objListViewItem.Text == "Web Chat Setup.exe")
- {
- WinClassicDownloader opendownload = new WinClassicDownloader();
- WindowManager wm = new WindowManager();
- wm.Init(opendownload, "Downloader", null, false, true);
- opendownload.appName.Text = "Downloading: Web Chat 1998";
- opendownload.amountToDL = 35;
- }
- else if (objListViewItem.Text == "Time Distorter Setup.exe")
- {
- WinClassicDownloader opendownload = new WinClassicDownloader();
- WindowManager wm = new WindowManager();
- wm.Init(opendownload, "Downloader", null, false, true);
- opendownload.appName.Text = "Downloading: Time Distorter 0.1";
- }
- else if (objListViewItem.Text == "Guess The Number V1 Setup.exe")
- {
- WinClassicDownloader opendownload = new WinClassicDownloader();
- WindowManager wm = new WindowManager();
- wm.Init(opendownload, "Downloader", null, false, true);
- opendownload.appName.Text = "Downloading: Guess The Number V1";
- opendownload.amountToDL = 16;
+ objListViewItem = ftpFiles.GetItemAt(objDrawingPoint.X, objDrawingPoint.Y);
+ if (objListViewItem.Text == "/software/")
+ {
+ ftpFiles.Clear();
+ ListViewItem listViewItem1 = new ListViewItem(new string[] { "/downloads/" }, 0, Color.Black, Color.Empty, null);
+ ListViewItem listViewItem2 = new ListViewItem(new string[] { "skindows.html" }, 1, Color.Black, Color.Empty, null);
+ ftpFiles.Items.AddRange(new ListViewItem[] { listViewItem1, listViewItem2 });
+ }
+ else if (objListViewItem.Text == "/downloads/")
+ {
+ ftpFiles.Clear();
+ ListViewItem listViewItem1 = new ListViewItem(new string[] { "/totallynotthetimedistorter/" }, 0, Color.Black, Color.Empty, null);
+ ListViewItem listViewItem2 = new ListViewItem(new string[] { "FTP Client Setup.exe" }, 2, Color.Black, Color.Empty, null);
+ ListViewItem listViewItem3 = new ListViewItem(new string[] { "Web Chat Setup.exe" }, 2, Color.Black, Color.Empty, null);
+ ListViewItem listViewItem4 = new ListViewItem(new string[] { "Guess The Number V1 Setup.exe" }, 2, Color.Black, Color.Empty, null);
+ ftpFiles.Items.AddRange(new ListViewItem[] { listViewItem1, listViewItem2, listViewItem3, listViewItem4 });
+ }
+ else if (objListViewItem.Text == "/totallynotthetimedistorter/")
+ {
+ ftpFiles.Clear();
+ ListViewItem listViewItem1 = new ListViewItem(new string[] { "Time Distorter Setup.exe" }, 2, Color.Black, Color.Empty, null);
+ ftpFiles.Items.AddRange(new ListViewItem[] { listViewItem1 });
+ }
+ else if (objListViewItem.Text == "FTP Client Setup.exe")
+ {
+ WinClassicDownloader opendownload = new WinClassicDownloader();
+ WindowManager wm = new WindowManager();
+ wm.Init(opendownload, "Downloader", null, false, true);
+ opendownload.appName.Text = "Downloading: FTP Client";
+ }
+ else if (objListViewItem.Text == "Web Chat Setup.exe")
+ {
+ WinClassicDownloader opendownload = new WinClassicDownloader();
+ WindowManager wm = new WindowManager();
+ wm.Init(opendownload, "Downloader", null, false, true);
+ opendownload.appName.Text = "Downloading: Web Chat 1998";
+ opendownload.amountToDL = 35;
+ }
+ else if (objListViewItem.Text == "Time Distorter Setup.exe")
+ {
+ WinClassicDownloader opendownload = new WinClassicDownloader();
+ WindowManager wm = new WindowManager();
+ wm.Init(opendownload, "Downloader", null, false, true);
+ opendownload.appName.Text = "Downloading: Time Distorter 0.1";
+ }
+ else if (objListViewItem.Text == "Guess The Number V1 Setup.exe")
+ {
+ WinClassicDownloader opendownload = new WinClassicDownloader();
+ WindowManager wm = new WindowManager();
+ wm.Init(opendownload, "Downloader", null, false, true);
+ opendownload.appName.Text = "Downloading: Guess The Number V1";
+ opendownload.amountToDL = 16;
+ }
}
- }
+ } catch { } // Try catch due to if you have more then one item selected the game crashing.
}
}
}
diff --git a/Histacom2/OS/Win95/Win95Apps/WinClassicWordPad.cs b/Histacom2/OS/Win95/Win95Apps/WinClassicWordPad.cs
index 91d9368..381f5ee 100644
--- a/Histacom2/OS/Win95/Win95Apps/WinClassicWordPad.cs
+++ b/Histacom2/OS/Win95/Win95Apps/WinClassicWordPad.cs
@@ -225,6 +225,7 @@ namespace Histacom2.OS.Win95.Win95Apps
{
ActivateSaveFileDialog(".rtf");
string selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath();
+ DeactivateFileDialog();
if (selectedPath != "")
{
diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs
index af2570c..f88d451 100644
--- a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs
+++ b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs
@@ -52,9 +52,12 @@
this.bottomleftcorner = new System.Windows.Forms.Panel();
this.topleftcorner = new System.Windows.Forms.Panel();
this.pnlSave = new System.Windows.Forms.Panel();
- this.Button1 = new System.Windows.Forms.Button();
- this.Label1 = new System.Windows.Forms.Label();
- this.txtSave = new System.Windows.Forms.TextBox();
+ this.btnCanc = new Histacom2.Engine.UI.ClassicButton();
+ this.cmbType = new Histacom2.Engine.UI.ClassicDropDown();
+ this.txtSave = new Histacom2.Engine.UI.ClassicTextBox();
+ this.classicLabel2 = new Histacom2.Engine.UI.ClassicLabel();
+ this.classicLabel1 = new Histacom2.Engine.UI.ClassicLabel();
+ this.btnSave = new Histacom2.Engine.UI.ClassicButton();
this.MenuStrip1 = new System.Windows.Forms.MenuStrip();
this.FileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.CreateShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -112,7 +115,7 @@
this.mainView.Dock = System.Windows.Forms.DockStyle.Fill;
this.mainView.Location = new System.Drawing.Point(396, 24);
this.mainView.Name = "mainView";
- this.mainView.Size = new System.Drawing.Size(308, 458);
+ this.mainView.Size = new System.Drawing.Size(308, 439);
this.mainView.TabIndex = 10;
this.mainView.UseCompatibleStateImageBehavior = false;
this.mainView.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.mainView_AfterLabelEdit);
@@ -130,7 +133,7 @@
this.pnlInfo.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlInfo.Location = new System.Drawing.Point(196, 24);
this.pnlInfo.Name = "pnlInfo";
- this.pnlInfo.Size = new System.Drawing.Size(200, 458);
+ this.pnlInfo.Size = new System.Drawing.Size(200, 439);
this.pnlInfo.TabIndex = 19;
//
// pictureBox1
@@ -165,7 +168,7 @@
this.pnlInfoContent.Controls.Add(this.txtInfoTip);
this.pnlInfoContent.Location = new System.Drawing.Point(0, 95);
this.pnlInfoContent.Name = "pnlInfoContent";
- this.pnlInfoContent.Size = new System.Drawing.Size(199, 362);
+ this.pnlInfoContent.Size = new System.Drawing.Size(199, 343);
this.pnlInfoContent.TabIndex = 22;
//
// InfoDesc
@@ -245,7 +248,7 @@
this.pnlFolders.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlFolders.Location = new System.Drawing.Point(0, 24);
this.pnlFolders.Name = "pnlFolders";
- this.pnlFolders.Size = new System.Drawing.Size(196, 458);
+ this.pnlFolders.Size = new System.Drawing.Size(196, 439);
this.pnlFolders.TabIndex = 0;
//
// diskView
@@ -253,7 +256,7 @@
this.diskView.Dock = System.Windows.Forms.DockStyle.Fill;
this.diskView.Location = new System.Drawing.Point(0, 22);
this.diskView.Name = "diskView";
- this.diskView.Size = new System.Drawing.Size(196, 436);
+ this.diskView.Size = new System.Drawing.Size(196, 417);
this.diskView.TabIndex = 13;
this.diskView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.diskView_AfterSelect);
//
@@ -325,45 +328,95 @@
//
// pnlSave
//
- this.pnlSave.Controls.Add(this.Button1);
- this.pnlSave.Controls.Add(this.Label1);
+ this.pnlSave.Controls.Add(this.btnCanc);
+ this.pnlSave.Controls.Add(this.cmbType);
this.pnlSave.Controls.Add(this.txtSave);
+ this.pnlSave.Controls.Add(this.classicLabel2);
+ this.pnlSave.Controls.Add(this.classicLabel1);
+ this.pnlSave.Controls.Add(this.btnSave);
this.pnlSave.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.pnlSave.Location = new System.Drawing.Point(0, 482);
+ this.pnlSave.Location = new System.Drawing.Point(0, 463);
this.pnlSave.Name = "pnlSave";
- this.pnlSave.Size = new System.Drawing.Size(704, 35);
+ this.pnlSave.Size = new System.Drawing.Size(704, 54);
this.pnlSave.TabIndex = 18;
this.pnlSave.Visible = false;
//
- // Button1
- //
- this.Button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.Button1.Location = new System.Drawing.Point(626, 3);
- this.Button1.Name = "Button1";
- this.Button1.Size = new System.Drawing.Size(75, 23);
- this.Button1.TabIndex = 17;
- this.Button1.Text = "Save";
- this.Button1.UseVisualStyleBackColor = true;
- this.Button1.Click += new System.EventHandler(this.Button1_Click);
- //
- // Label1
- //
- this.Label1.AutoSize = true;
- this.Label1.Location = new System.Drawing.Point(3, 6);
- this.Label1.Name = "Label1";
- this.Label1.Size = new System.Drawing.Size(57, 13);
- this.Label1.TabIndex = 16;
- this.Label1.Text = "File Name:";
+ // btnCanc
+ //
+ this.btnCanc.AdaptBackColorWithTheme = true;
+ this.btnCanc.AdaptFontWithTheme = true;
+ this.btnCanc.AdaptForeColorWithTheme = true;
+ this.btnCanc.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnCanc.BackColor = System.Drawing.Color.Silver;
+ this.btnCanc.DialogResult = System.Windows.Forms.DialogResult.None;
+ this.btnCanc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.btnCanc.ForeColor = System.Drawing.Color.Black;
+ this.btnCanc.Location = new System.Drawing.Point(619, 28);
+ this.btnCanc.Name = "btnCanc";
+ this.btnCanc.Size = new System.Drawing.Size(75, 25);
+ this.btnCanc.TabIndex = 30;
+ this.btnCanc.Text = "Cancel";
+ this.btnCanc.Click += new System.EventHandler(this.btnCanc_Click);
+ //
+ // cmbType
+ //
+ this.cmbType.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.cmbType.BackColor = System.Drawing.Color.White;
+ this.cmbType.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.cmbType.Location = new System.Drawing.Point(64, 32);
+ this.cmbType.Name = "cmbType";
+ this.cmbType.Size = new System.Drawing.Size(549, 20);
+ this.cmbType.TabIndex = 29;
+ this.cmbType.UseSystemPasswordChar = false;
//
// txtSave
//
- this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.txtSave.Location = new System.Drawing.Point(60, 3);
+ this.txtSave.BackColor = System.Drawing.Color.White;
+ this.txtSave.Location = new System.Drawing.Point(64, 7);
this.txtSave.Name = "txtSave";
- this.txtSave.Size = new System.Drawing.Size(560, 20);
- this.txtSave.TabIndex = 15;
+ this.txtSave.Size = new System.Drawing.Size(549, 20);
+ this.txtSave.TabIndex = 28;
+ this.txtSave.UseSystemPasswordChar = false;
+ //
+ // classicLabel2
+ //
+ this.classicLabel2.DropShadow = false;
+ this.classicLabel2.Location = new System.Drawing.Point(11, 33);
+ this.classicLabel2.Name = "classicLabel2";
+ this.classicLabel2.Size = new System.Drawing.Size(64, 13);
+ this.classicLabel2.TabIndex = 26;
+ this.classicLabel2.Text = "File type:";
+ //
+ // classicLabel1
+ //
+ this.classicLabel1.DropShadow = false;
+ this.classicLabel1.Location = new System.Drawing.Point(11, 7);
+ this.classicLabel1.Name = "classicLabel1";
+ this.classicLabel1.Size = new System.Drawing.Size(64, 13);
+ this.classicLabel1.TabIndex = 27;
+ this.classicLabel1.Text = "File name:";
+ //
+ // btnSave
+ //
+ this.btnSave.AdaptBackColorWithTheme = true;
+ this.btnSave.AdaptFontWithTheme = true;
+ this.btnSave.AdaptForeColorWithTheme = true;
+ this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnSave.BackColor = System.Drawing.Color.Silver;
+ this.btnSave.DialogResult = System.Windows.Forms.DialogResult.None;
+ this.btnSave.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.btnSave.ForeColor = System.Drawing.Color.Black;
+ this.btnSave.Location = new System.Drawing.Point(619, 2);
+ this.btnSave.Name = "btnSave";
+ this.btnSave.Size = new System.Drawing.Size(75, 25);
+ this.btnSave.TabIndex = 25;
+ this.btnSave.Text = "Save";
+ this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// MenuStrip1
//
@@ -553,7 +606,6 @@
this.pnlFoldersTop.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.btnFolderClose)).EndInit();
this.pnlSave.ResumeLayout(false);
- this.pnlSave.PerformLayout();
this.MenuStrip1.ResumeLayout(false);
this.MenuStrip1.PerformLayout();
this.ResumeLayout(false);
@@ -590,9 +642,6 @@
internal System.Windows.Forms.Panel topleftcorner;
internal System.Windows.Forms.ListView mainView;
internal System.Windows.Forms.Panel pnlSave;
- internal System.Windows.Forms.Button Button1;
- internal System.Windows.Forms.Label Label1;
- internal System.Windows.Forms.TextBox txtSave;
private System.Windows.Forms.Panel pnlInfo;
private System.Windows.Forms.Panel pnlFolders;
private System.Windows.Forms.Panel pnlFoldersTop;
@@ -609,5 +658,11 @@
private System.Windows.Forms.Label txtInfoDescName;
private System.Windows.Forms.Label txtInfoDescSize;
private System.Windows.Forms.Timer refresh;
+ private Engine.UI.ClassicButton btnCanc;
+ private Engine.UI.ClassicDropDown cmbType;
+ private Engine.UI.ClassicTextBox txtSave;
+ private Engine.UI.ClassicLabel classicLabel2;
+ private Engine.UI.ClassicLabel classicLabel1;
+ private Engine.UI.ClassicButton btnSave;
}
}
diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs
index f261cb2..5cc075e 100644
--- a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs
+++ b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs
@@ -102,17 +102,17 @@ namespace Histacom2.OS.Win95.Win95Apps
IsFileSaveDialog = true;
}
- if (IsFileOpenDialog == true)
+ if (IsFileOpenDialog)
{
pnlSave.Show();
- Button1.Text = "Open";
+ btnSave.Text = "Open";
}
else
{
- if (IsFileSaveDialog == true)
+ if (IsFileSaveDialog)
{
pnlSave.Show();
- Button1.Text = "Save";
+ btnSave.Text = "Save";
}
}
@@ -139,9 +139,9 @@ namespace Histacom2.OS.Win95.Win95Apps
FileSystemFolderInfo toRead = new FileSystemFolderInfo();
toRead = JsonConvert.DeserializeObject<FileSystemFolderInfo>(directoryFileInfo);
- if (returnYesIfProtected == true)
+ if (returnYesIfProtected)
{
- if (toRead.IsProtected == true)
+ if (toRead.IsProtected)
{
return "yes";
}
@@ -655,7 +655,7 @@ namespace Histacom2.OS.Win95.Win95Apps
}
else
{ // If it is a file
- if (IsFileOpenDialog == true || IsFileSaveDialog == true)
+ if (IsFileOpenDialog || IsFileSaveDialog)
{
if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension)
{
@@ -734,41 +734,26 @@ namespace Histacom2.OS.Win95.Win95Apps
{
try
{
- bool OpenFile = false;
if (mainView.FocusedItem != null)
{
- if ((string)mainView.FocusedItem.Tag == "")
+ if (mainView.FocusedItem.Tag.ToString() == "")
{ // If it isn't a file
GoToDir(Path.Combine(CurrentDirectory, mainView.FocusedItem.Tag.ToString()));
}
- else OpenFile = true; // If it is a file
+ else txtSave.Text = mainView.FocusedItem.Tag.ToString();
}
- else OpenFile = true;
- if (OpenFile == true)
+ if (txtSave.Text == "") wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK);
+ else
{
- if (txtSave.Text == "")
- {
- wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK);
- }
- else
- {
- if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension)
- {
-
- Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text);
-
- }
+ if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension) Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text);
+ FileDialogBoxManager.IsInOpenDialog = false;
+ FileDialogBoxManager.IsInSaveDialog = false;
- FileDialogBoxManager.IsInOpenDialog = false;
- FileDialogBoxManager.IsInSaveDialog = false;
-
- ((Form)this.TopLevelControl).Close();
- }
+ ((Form)this.TopLevelControl).Close();
}
- } catch {
-
}
+ catch { }
}
private void DeleteToolStripMenuItem_Click(object sender, EventArgs e)
@@ -929,7 +914,7 @@ namespace Histacom2.OS.Win95.Win95Apps
private void FoldersToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (FoldersToolStripMenuItem.Checked == true)
+ if (FoldersToolStripMenuItem.Checked)
{
FoldersToolStripMenuItem.Checked = false;
pnlFolders.Hide();
@@ -973,7 +958,7 @@ namespace Histacom2.OS.Win95.Win95Apps
}
}
- if (recognized == true)
+ if (recognized)
{
// TODO:
} else {
@@ -1137,5 +1122,36 @@ namespace Histacom2.OS.Win95.Win95Apps
item.Selected = true;
}
}
+
+ private void btnCanc_Click(object sender, EventArgs e)
+ {
+ ((Form)this.TopLevelControl).Close();
+ }
+
+ private void btnSave_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (mainView.FocusedItem != null)
+ {
+ if (mainView.FocusedItem.Tag.ToString() == "")
+ { // If it isn't a file
+ GoToDir(Path.Combine(CurrentDirectory, mainView.FocusedItem.Tag.ToString()));
+ }
+ else txtSave.Text = mainView.FocusedItem.Tag.ToString();
+ }
+ if (txtSave.Text == "") wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK);
+ else
+ {
+ if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension) Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text);
+
+ FileDialogBoxManager.IsInOpenDialog = false;
+ FileDialogBoxManager.IsInSaveDialog = false;
+
+ ((Form)this.TopLevelControl).Close();
+ }
+ }
+ catch { }
+ }
}
}
diff --git a/Histacom2/SaveDialogs/LoadGameProfileItem.cs b/Histacom2/SaveDialogs/LoadGameProfileItem.cs
index bdc0b7c..646601b 100644
--- a/Histacom2/SaveDialogs/LoadGameProfileItem.cs
+++ b/Histacom2/SaveDialogs/LoadGameProfileItem.cs
@@ -37,7 +37,7 @@ namespace Histacom2
if (!ClientRectangle.Contains(PointToClient(Control.MousePosition)))
{
sidebar.Hide();
- if (OnceRemoveHeight == false)
+ if (!OnceRemoveHeight)
{
this.Height -= 28;
OnceRemoveHeight = true;
@@ -49,7 +49,7 @@ namespace Histacom2
} else
{
sidebar.Show();
- if (OnceAddHeight == false)
+ if (!OnceAddHeight)
{
this.Height += 28;
OnceAddHeight = true;
@@ -95,7 +95,7 @@ namespace Histacom2
{
try
{
- if (!RequestingNewName == false)
+ if (!RequestingNewName)
{
if (textBox1.Text == "")
{
diff --git a/Histacom2/SaveDialogs/NewGameDialog.cs b/Histacom2/SaveDialogs/NewGameDialog.cs
index eb8d44f..e3ecd00 100644
--- a/Histacom2/SaveDialogs/NewGameDialog.cs
+++ b/Histacom2/SaveDialogs/NewGameDialog.cs
@@ -46,7 +46,7 @@ namespace Histacom2
if (!(txtProfName.Text.Length > 20))
{
ProfileName = txtProfName.Text;
- if (DevMode == true)
+ if (DevMode)
{
if (Directory.Exists(ProfileDirectory))
{
@@ -84,7 +84,7 @@ namespace Histacom2
private void NewGameDialog_Load(object sender, EventArgs e)
{
- if (DevMode == true)
+ if (DevMode)
{
btnDevMode.Show();
}
diff --git a/Histacom2/SaveDialogs/SaveFileTroubleShooter.Designer.cs b/Histacom2/SaveDialogs/SaveFileTroubleShooter.Designer.cs
index 85c04fb..ff7b5c0 100644
--- a/Histacom2/SaveDialogs/SaveFileTroubleShooter.Designer.cs
+++ b/Histacom2/SaveDialogs/SaveFileTroubleShooter.Designer.cs
@@ -59,7 +59,7 @@
this.pnlResolved.Controls.Add(this.label2);
this.pnlResolved.Location = new System.Drawing.Point(12, 38);
this.pnlResolved.Name = "pnlResolved";
- this.pnlResolved.Size = new System.Drawing.Size(589, 275);
+ this.pnlResolved.Size = new System.Drawing.Size(518, 243);
this.pnlResolved.TabIndex = 1;
this.pnlResolved.Visible = false;
//
@@ -73,7 +73,7 @@
this.textBox1.Name = "textBox1";
this.textBox1.ReadOnly = true;
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;
- this.textBox1.Size = new System.Drawing.Size(567, 208);
+ this.textBox1.Size = new System.Drawing.Size(496, 176);
this.textBox1.TabIndex = 3;
//
// label3
@@ -100,15 +100,15 @@
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.panel2.Controls.Add(this.btnClose);
this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.panel2.Location = new System.Drawing.Point(0, 315);
+ this.panel2.Location = new System.Drawing.Point(0, 283);
this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(612, 30);
+ this.panel2.Size = new System.Drawing.Size(541, 30);
this.panel2.TabIndex = 2;
//
// btnClose
//
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btnClose.Location = new System.Drawing.Point(526, 4);
+ this.btnClose.Location = new System.Drawing.Point(455, 4);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(75, 23);
this.btnClose.TabIndex = 0;
@@ -120,12 +120,11 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(612, 345);
+ this.ClientSize = new System.Drawing.Size(541, 313);
this.Controls.Add(this.panel2);
this.Controls.Add(this.pnlResolved);
this.Controls.Add(this.label1);
this.Name = "SaveFileTroubleShooter";
- this.Text = "Save File Troubleshooter";
this.Load += new System.EventHandler(this.SaveFileTroubleShooter_Load);
this.pnlResolved.ResumeLayout(false);
this.pnlResolved.PerformLayout();
diff --git a/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs b/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs
index eceff04..3283ca1 100644
--- a/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs
+++ b/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs
@@ -193,7 +193,7 @@ namespace Histacom2.SaveDialogs
{
pnlResolved.Visible = true;
label1.Hide();
- if (successful == true)
+ if (successful)
{
label2.Text = "The issue has been resolved.";
diff --git a/Histacom2/TitleScreen.cs b/Histacom2/TitleScreen.cs
index 3909798..4108204 100644
--- a/Histacom2/TitleScreen.cs
+++ b/Histacom2/TitleScreen.cs
@@ -59,59 +59,59 @@ namespace Histacom2
{
// Time to decide which OS to start up!
- switch (CurrentSave.CurrentOS)
- {
- case "95":
- frm95 = new Windows95();
- frm95.TopMost = true;
- frm95.FormBorderStyle = FormBorderStyle.None;
- frm95.WindowState = FormWindowState.Maximized;
- //if (vm_mode.Checked == true)
- //{
- // frm95.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text));
- // frm95.FormBorderStyle = FormBorderStyle.Fixed3D;
- //}
- frm95.Show();
- Hide();
-
- break;
- case "98":
- frm98 = new Windows98();
- frm98.TopMost = true;
- frm98.FormBorderStyle = FormBorderStyle.None;
- frm98.WindowState = FormWindowState.Maximized;
- //if (vm_mode.Checked == true)
- //{
- // frm98.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text));
- // frm98.FormBorderStyle = FormBorderStyle.Fixed3D;
- //}
- frm98.Show();
- Hide();
-
- break;
- case "xpbad":
- frmBadXP = new WindowsXPBad();
- frmBadXP.TopMost = true;
- frmBadXP.FormBorderStyle = FormBorderStyle.None;
- frmBadXP.WindowState = FormWindowState.Maximized;
- //if (vm_mode.Checked == true)
- //{
- // frm98.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text));
- // frm98.FormBorderStyle = FormBorderStyle.Fixed3D;
- //}
- frmBadXP.Show();
- Hide();
-
- break;
- default:
- MessageBox.Show("WARNING! It looks like this save is corrupt!");
- MessageBox.Show("We will now open the Save troubleshooter");
-
- SaveFileTroubleShooter troubleshooter = new SaveFileTroubleShooter();
-
- troubleshooter.ShowDialog();
- break;
- }
+ switch (CurrentSave.CurrentOS)
+ {
+ case "95":
+ frm95 = new Windows95();
+ frm95.TopMost = true;
+ frm95.FormBorderStyle = FormBorderStyle.None;
+ frm95.WindowState = FormWindowState.Maximized;
+ //if (vm_mode.Checked)
+ //{
+ // frm95.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text));
+ // frm95.FormBorderStyle = FormBorderStyle.Fixed3D;
+ //}
+ frm95.Show();
+ Hide();
+
+ break;
+ case "98":
+ frm98 = new Windows98();
+ frm98.TopMost = true;
+ frm98.FormBorderStyle = FormBorderStyle.None;
+ frm98.WindowState = FormWindowState.Maximized;
+ //if (vm_mode.Checked)
+ //{
+ // frm98.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text));
+ // frm98.FormBorderStyle = FormBorderStyle.Fixed3D;
+ //}
+ frm98.Show();
+ Hide();
+
+ break;
+ case "xpbad":
+ frmBadXP = new WindowsXPBad();
+ frmBadXP.TopMost = true;
+ frmBadXP.FormBorderStyle = FormBorderStyle.None;
+ frmBadXP.WindowState = FormWindowState.Maximized;
+ //if (vm_mode.Checked)
+ //{
+ // frm98.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text));
+ // frm98.FormBorderStyle = FormBorderStyle.Fixed3D;
+ //}
+ frmBadXP.Show();
+ Hide();
+
+ break;
+ default:
+ MessageBox.Show("WARNING! It looks like this save is corrupt!");
+ MessageBox.Show("We will now open the Save troubleshooter");
+
+ SaveFileTroubleShooter troubleshooter = new SaveFileTroubleShooter();
+
+ troubleshooter.ShowDialog();
+ break;
+ }
}
private void VM_WidthHeight_KeyPress(object sender, KeyPressEventArgs e)
@@ -150,6 +150,22 @@ namespace Histacom2
ShutdownToolStripMenuItem.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
}
+<<<<<<< HEAD
+ private static void leet()
+ {
+ WindowManager wm = new WindowManager();
+ UserControl leet = new UserControl();
+ leet.Width = 500;
+ leet.Height = 500;
+ Label label1 = new Label();
+ label1.Parent = leet;
+ label1.AutoSize = true;
+ label1.Text = "Thank you for making Histacom2 possible.";
+ wm.Init(leet, "Thank You", null, true, true);
+ }
+
+=======
+>>>>>>> 382f0167714bbcad00ab710fe7dcfa05eaeb88ac
#region Menu Buttons
#region NewGame
@@ -160,7 +176,7 @@ namespace Histacom2
newGameBox = new NewGameDialog();
newGameBox.ShowDialog();
- if (newGameBox.Successful == true)
+ if (newGameBox.Successful)
{
NewGame();
StartGame();
@@ -199,7 +215,7 @@ namespace Histacom2
loadGameBox = new LoadGameDialog();
loadGameBox.ShowDialog();
- if (loadGameBox.successful == true)
+ if (loadGameBox.successful)
{
LoadSave();
SetTheme();
@@ -229,7 +245,7 @@ namespace Histacom2
private void startbutton_Click(object sender, EventArgs e)
{
- if (DevMode == true)
+ if (DevMode)
{
DevMode = false;
gameversion.Text = "Developer Mode Deactivated";
@@ -259,5 +275,21 @@ namespace Histacom2
AchievementScreen achievelist = new AchievementScreen();
achievelist.ShowDialog();
}
+
+ private void vm_mode_CheckStateChanged(object sender, EventArgs e)
+ {
+ // Check for VM mode
+ if (vm_mode.Checked)
+ {
+ VM_Width.Visible = true;
+ VM_Height.Visible = true;
+ }
+ // If VM Mode is disabled
+ else
+ {
+ VM_Width.Visible = false;
+ VM_Height.Visible = false;
+ }
+ }
}
}
diff --git a/Histacom2/TitleScreen.resx b/Histacom2/TitleScreen.resx
index 5ab2508..76952a9 100644
--- a/Histacom2/TitleScreen.resx
+++ b/Histacom2/TitleScreen.resx
@@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <metadata name="vmModeTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>17, 17</value>
- </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="panel2.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>