aboutsummaryrefslogtreecommitdiff
path: root/Histacom2.Engine
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-08-23 13:38:40 -0400
committerlempamo <[email protected]>2017-08-23 13:38:40 -0400
commit3306d36ecbc024775972e5cf7971b2a7a70671d0 (patch)
tree0a79e67b6723a8c75ffd66c7828bdd0ebb1bf74d /Histacom2.Engine
parent99fef5c57360f07259fc86f433bed8a9ab59c48e (diff)
downloadhistacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.tar.gz
histacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.tar.bz2
histacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.zip
Renaming the game!
Diffstat (limited to 'Histacom2.Engine')
-rw-r--r--Histacom2.Engine/BSODCreator.cs54
-rw-r--r--Histacom2.Engine/DesktopController.cs72
-rw-r--r--Histacom2.Engine/FileDialogBoxManager.cs40
-rw-r--r--Histacom2.Engine/Histacom2.Engine.csproj164
-rw-r--r--Histacom2.Engine/MessageParser.cs31
-rw-r--r--Histacom2.Engine/Paintbrush.cs49
-rw-r--r--Histacom2.Engine/Properties/AssemblyInfo.cs36
-rw-r--r--Histacom2.Engine/Properties/Resources.Designer.cs419
-rw-r--r--Histacom2.Engine/Properties/Resources.resx232
-rw-r--r--Histacom2.Engine/Resources/CHORD.WAVbin0 -> 24982 bytes
-rw-r--r--Histacom2.Engine/Resources/Icon128x.icobin0 -> 99678 bytes
-rw-r--r--Histacom2.Engine/Resources/Win95PlusDangerousCreaturesAsterisk.wavbin0 -> 13782 bytes
-rw-r--r--Histacom2.Engine/Resources/Win95PlusDangerousCreaturesCritStop.wavbin0 -> 10732 bytes
-rw-r--r--Histacom2.Engine/Resources/Win95PlusDangerousCreaturesExclamation.wavbin0 -> 9298 bytes
-rw-r--r--Histacom2.Engine/Resources/Win95PlusDangerousCreaturesProgError.wavbin0 -> 18914 bytes
-rw-r--r--Histacom2.Engine/Resources/Win95PlusDangerousCreaturesQuestion.wavbin0 -> 15010 bytes
-rw-r--r--Histacom2.Engine/Resources/Win95PlusDangerousCreaturesStart.WAVbin0 -> 93144 bytes
-rw-r--r--Histacom2.Engine/Resources/Win95PlusDangerousCreaturesWallpaper.JPGbin0 -> 99357 bytes
-rw-r--r--Histacom2.Engine/Resources/Win95PlusInsideComputerAsterisk.wavbin0 -> 9006 bytes
-rw-r--r--Histacom2.Engine/Resources/Win95PlusInsideComputerStart.wavbin0 -> 50162 bytes
-rw-r--r--Histacom2.Engine/Resources/Win95PlusInsideComputerStop.wavbin0 -> 27780 bytes
-rw-r--r--Histacom2.Engine/Resources/Win95PlusInsideComputerWallpaper.jpgbin0 -> 76769 bytes
-rw-r--r--Histacom2.Engine/Resources/Win95Start.wavbin0 -> 270382 bytes
-rw-r--r--Histacom2.Engine/Resources/Win95Stop.wavbin0 -> 27804 bytes
-rw-r--r--Histacom2.Engine/Resources/Win98Start.wavbin0 -> 693212 bytes
-rw-r--r--Histacom2.Engine/Resources/Win98Stop.WAVbin0 -> 313116 bytes
-rw-r--r--Histacom2.Engine/Resources/WinAboutSeparator95.pngbin0 -> 177 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/BottomLeft.pngbin0 -> 173 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/BottomRight.pngbin0 -> 173 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/BottomSide.pngbin0 -> 165 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/LeftSide.pngbin0 -> 164 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/LeviWindows.ttfbin0 -> 46724 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/RightSide.pngbin0 -> 164 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/TopLeft.pngbin0 -> 170 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/TopRight.pngbin0 -> 173 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/TopSide.pngbin0 -> 165 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/Win95Error.pngbin0 -> 429 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/Win95Info.pngbin0 -> 384 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/Win95Question.pngbin0 -> 430 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/Win95Warning.pngbin0 -> 432 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/WinClassicClose.pngbin0 -> 236 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/WinClassicMax.pngbin0 -> 206 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/WinClassicMin.pngbin0 -> 201 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/WinClassicRestore.pngbin0 -> 229 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/nullIcon.pngbin0 -> 157 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/pjBg6mKP.bmpbin0 -> 4997267 bytes
-rw-r--r--Histacom2.Engine/Resources/WinClassic/Window/windows_command_prompt.ttfbin0 -> 29616 bytes
-rw-r--r--Histacom2.Engine/SaveSystem.cs716
-rw-r--r--Histacom2.Engine/TaskBarController.cs60
-rw-r--r--Histacom2.Engine/Template/AboutBox95.Designer.cs144
-rw-r--r--Histacom2.Engine/Template/AboutBox95.cs19
-rw-r--r--Histacom2.Engine/Template/AboutBox95.resx120
-rw-r--r--Histacom2.Engine/Template/Infobox95.Designer.cs152
-rw-r--r--Histacom2.Engine/Template/Infobox95.cs87
-rw-r--r--Histacom2.Engine/Template/Infobox95.resx120
-rw-r--r--Histacom2.Engine/Template/Win9XBSOD.Designer.cs141
-rw-r--r--Histacom2.Engine/Template/Win9XBSOD.cs38
-rw-r--r--Histacom2.Engine/Template/Win9XBSOD.resx120
-rw-r--r--Histacom2.Engine/Template/WinClassic.Designer.cs292
-rw-r--r--Histacom2.Engine/Template/WinClassic.cs235
-rw-r--r--Histacom2.Engine/Template/WinClassic.resx201
-rw-r--r--Histacom2.Engine/Theme.cs114
-rw-r--r--Histacom2.Engine/UI/ClassicButton.Designer.cs91
-rw-r--r--Histacom2.Engine/UI/ClassicButton.cs58
-rw-r--r--Histacom2.Engine/UI/ClassicButton.resx120
-rw-r--r--Histacom2.Engine/UI/IProgressBar.cs234
-rw-r--r--Histacom2.Engine/WindowManager.cs100
-rw-r--r--Histacom2.Engine/packages.config4
68 files changed, 4263 insertions, 0 deletions
diff --git a/Histacom2.Engine/BSODCreator.cs b/Histacom2.Engine/BSODCreator.cs
new file mode 100644
index 0000000..fb693a9
--- /dev/null
+++ b/Histacom2.Engine/BSODCreator.cs
@@ -0,0 +1,54 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using Histacom2.Engine.Template;
+
+namespace Histacom2.Engine
+{
+ public class BSODCreator
+ {
+ public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection();
+
+ public enum BSODCauses
+ {
+ Testing,
+ WimpEnding,
+ PiracyEnding,
+ }
+
+ public Win9XBSOD throw9XBSOD(bool except, BSODCauses type)
+ {
+ pfc.AddFontFile($@"{SaveSystem.GameDirectory}\Data\windows_command_prompt.ttf");
+ Win9XBSOD bsod = new Win9XBSOD();
+ foreach (Control ctrl in bsod.Controls) {
+ ctrl.Font = new System.Drawing.Font(pfc.Families[0], 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((0)));
+ }
+ bsod.TopMost = true;
+ bsod.FormBorderStyle = FormBorderStyle.None;
+ bsod.WindowState = FormWindowState.Maximized;
+ switch (type)
+ {
+ case BSODCauses.Testing:
+ bsod.textBox1.Text = "This is the testing type of BSOD. Hurrah.";
+ break;
+ case BSODCauses.WimpEnding:
+ bsod.textBox1.Text = "An unknown but fatal exception has occured in the program \"wchat98.exe\". The current processes will be terminated.";
+ break;
+ case BSODCauses.PiracyEnding:
+ bsod.textBox1.Text = "Vital elements of Windows were removed, but recovered. However, your data has been lost.";
+ bsod.BackColor = System.Drawing.Color.Black;
+ foreach (Control ctrl in bsod.Controls) ctrl.ForeColor = System.Drawing.Color.Silver;
+ bsod.label1.BackColor = System.Drawing.Color.Silver;
+ bsod.label1.ForeColor = System.Drawing.Color.Black;
+ break;
+ default:
+ break;
+ }
+ bsod.Show();
+ return bsod;
+ }
+ }
+}
diff --git a/Histacom2.Engine/DesktopController.cs b/Histacom2.Engine/DesktopController.cs
new file mode 100644
index 0000000..8ea9775
--- /dev/null
+++ b/Histacom2.Engine/DesktopController.cs
@@ -0,0 +1,72 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using System.IO;
+using Newtonsoft.Json;
+
+namespace Histacom2.Engine
+{
+ public static class DesktopController
+ {
+ public static string ReadDataFile(string reqDirectory, bool returnYesIfProtected = false)
+ {
+ string Val = "";
+ string directoryFileInfo = File.ReadAllText(Path.Combine(reqDirectory, "_data.info"));
+ FileSystemFolderInfo toRead = JsonConvert.DeserializeObject<FileSystemFolderInfo>(directoryFileInfo);
+
+ if (returnYesIfProtected == true)
+ {
+ if (toRead.IsProtected == true)
+ {
+ return "yes";
+ }
+ }
+ else
+ {
+ return toRead.Label;
+ }
+ return Val;
+ }
+
+ public static void RefreshDesktopIcons(ListViewItem[] baseIcons, ref ListView view, string folder)
+ {
+ view.Items.Clear(); // This resets it to it's default
+ view.Items.AddRange(baseIcons);
+
+ foreach (string dir in Directory.GetDirectories(folder))
+ {
+ string label = ReadDataFile(dir);
+ view.Items.Add(label ?? Path.GetFileName(dir), 1);
+ view.FindItemWithText(Path.GetFileName(dir)).Tag = dir;
+ }
+
+ foreach (string dir in Directory.GetFiles(folder))
+ {
+ if (Path.GetFileName(dir) != "_data.info")
+ {
+ THFileInfo file = new THFileInfo();
+ FileSystemFolderInfo fsfi = JsonConvert.DeserializeObject<FileSystemFolderInfo>(File.ReadAllText(Path.Combine(folder, "_data.info")));
+ foreach (THFileInfo f in fsfi.Files)
+ {
+ if (f.Name.ToLower() == Path.GetFileName(dir).ToLower())
+ {
+ file = f; break;
+ }
+ }
+
+ if (new FileInfo(dir).Extension == ".exe" && file.FileIcon == 8) file.FileIcon = 10;
+ if (new FileInfo(dir).Extension == ".txt" && file.FileIcon == 8) file.FileIcon = 12;
+
+ view.Items.Add(Path.GetFileName(dir), file.FileIcon);
+ view.FindItemWithText(Path.GetFileName(dir)).Tag = dir;
+ string toWrite = JsonConvert.SerializeObject(fsfi, Formatting.Indented);
+
+ File.WriteAllText(Path.Combine(folder, "_data.info"), toWrite);
+ }
+ }
+ }
+ }
+}
diff --git a/Histacom2.Engine/FileDialogBoxManager.cs b/Histacom2.Engine/FileDialogBoxManager.cs
new file mode 100644
index 0000000..a862bc7
--- /dev/null
+++ b/Histacom2.Engine/FileDialogBoxManager.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace Histacom2.Engine
+{
+ public static class FileDialogBoxManager
+ {
+ public static bool IsInOpenDialog = false;
+ public static bool IsInSaveDialog = false;
+ public static string OnlyViewExtension = "";
+ public static void ActivateOpenFileDialog(string ExtensionToView)
+ {
+ IsInOpenDialog = true;
+ IsInSaveDialog = false;
+ OnlyViewExtension = ExtensionToView;
+ }
+
+ public static void ActivateSaveFileDialog(string ExtensionToView)
+ {
+ IsInOpenDialog = false;
+ IsInSaveDialog = true;
+ OnlyViewExtension = ExtensionToView;
+ }
+
+ public static string ReadTextFile(string path)
+ {
+ try
+ {
+ return File.ReadAllText(path);
+ } catch {
+ return "";
+ }
+ }
+ }
+}
diff --git a/Histacom2.Engine/Histacom2.Engine.csproj b/Histacom2.Engine/Histacom2.Engine.csproj
new file mode 100644
index 0000000..beb4aa2
--- /dev/null
+++ b/Histacom2.Engine/Histacom2.Engine.csproj
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{9477B70F-2D32-4E1D-857B-4624A1DEEB1B}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Histacom2.Engine</RootNamespace>
+ <AssemblyName>Histacom2.Engine</AssemblyName>
+ <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+ <HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="BSODCreator.cs" />
+ <None Include="packages.config" />
+ <None Include="Resources\WinClassic\Window\pjBg6mKP.bin" />
+ <Compile Include="DesktopController.cs" />
+ <Compile Include="FileDialogBoxManager.cs" />
+ <Compile Include="Paintbrush.cs" />
+ <Compile Include="SaveSystem.cs" />
+ <Compile Include="TaskBarController.cs" />
+ <Compile Include="Template\Win9XBSOD.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Template\Win9XBSOD.Designer.cs">
+ <DependentUpon>Win9XBSOD.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Template\AboutBox95.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="Template\AboutBox95.Designer.cs">
+ <DependentUpon>AboutBox95.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Template\Infobox95.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="Template\Infobox95.Designer.cs">
+ <DependentUpon>Infobox95.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Template\WinClassic.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Template\WinClassic.Designer.cs">
+ <DependentUpon>WinClassic.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Theme.cs" />
+ <Compile Include="UI\ClassicButton.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="UI\ClassicButton.Designer.cs">
+ <DependentUpon>ClassicButton.cs</DependentUpon>
+ </Compile>
+ <Compile Include="UI\IProgressBar.cs">
+ <SubType>Component</SubType>
+ </Compile>
+ <Compile Include="WindowManager.cs" />
+ <Compile Include="MessageParser.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>PublicResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Template\Win9XBSOD.resx">
+ <DependentUpon>Win9XBSOD.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Template\AboutBox95.resx">
+ <DependentUpon>AboutBox95.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Template\Infobox95.resx">
+ <DependentUpon>Infobox95.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Template\WinClassic.resx">
+ <DependentUpon>WinClassic.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="UI\ClassicButton.resx">
+ <DependentUpon>ClassicButton.cs</DependentUpon>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Resources\chord.wav" />
+ <Content Include="Resources\Icon128x.ico" />
+ <None Include="Resources\WinAboutSeparator95.png" />
+ <None Include="Resources\Win95PlusDangerousCreaturesStart.WAV" />
+ <None Include="Resources\Win95Start.wav" />
+ <None Include="Resources\Win95Stop.wav" />
+ <None Include="Resources\Win98Start.wav" />
+ <None Include="Resources\Win98Stop.WAV" />
+ <None Include="Resources\Win95PlusDangerousCreaturesWallpaper.JPG" />
+ <None Include="Resources\Win95PlusInsideComputerWallpaper.jpg" />
+ <None Include="Resources\Win95PlusInsideComputerStop.wav" />
+ <None Include="Resources\Win95PlusInsideComputerStart.wav" />
+ <None Include="Resources\Win95PlusDangerousCreaturesAsterisk.wav" />
+ <None Include="Resources\Win95PlusDangerousCreaturesCritStop.wav" />
+ <None Include="Resources\Win95PlusDangerousCreaturesExclamation.wav" />
+ <None Include="Resources\Win95PlusDangerousCreaturesProgError.wav" />
+ <None Include="Resources\Win95PlusDangerousCreaturesQuestion.wav" />
+ <None Include="Resources\Win95PlusInsideComputerAsterisk.wav" />
+ <Content Include="Resources\WinClassic\Window\BottomLeft.png" />
+ <Content Include="Resources\WinClassic\Window\BottomRight.png" />
+ <Content Include="Resources\WinClassic\Window\BottomSide.png" />
+ <Content Include="Resources\WinClassic\Window\LeftSide.png" />
+ <Content Include="Resources\WinClassic\Window\nullIcon.png" />
+ <Content Include="Resources\WinClassic\Window\RightSide.png" />
+ <Content Include="Resources\WinClassic\Window\TopLeft.png" />
+ <Content Include="Resources\WinClassic\Window\TopRight.png" />
+ <Content Include="Resources\WinClassic\Window\TopSide.png" />
+ <None Include="Resources\WinClassic\Window\Win95Info.png" />
+ <None Include="Resources\WinClassic\Window\Win95Warning.png" />
+ <None Include="Resources\WinClassic\Window\Win95Error.png" />
+ <None Include="Resources\WinClassic\Window\Win95Question.png" />
+ <Content Include="Resources\WinClassic\Window\WinClassicClose.png" />
+ <Content Include="Resources\WinClassic\Window\WinClassicMax.png" />
+ <Content Include="Resources\WinClassic\Window\WinClassicMin.png" />
+ <Content Include="Resources\WinClassic\Window\WinClassicRestore.png" />
+ <Content Include="Resources\WinClassic\Window\WinClassicWarning.png" />
+ <None Include="Resources\WinClassic\Window\windows_command_prompt.ttf" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Resources\WinClassic\Window\LeviWindows.ttf" />
+ </ItemGroup>
+ <ItemGroup />
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project> \ No newline at end of file
diff --git a/Histacom2.Engine/MessageParser.cs b/Histacom2.Engine/MessageParser.cs
new file mode 100644
index 0000000..ff798c0
--- /dev/null
+++ b/Histacom2.Engine/MessageParser.cs
@@ -0,0 +1,31 @@
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Histacom2.Engine
+{
+ public class MessageParser
+ {
+ public string ParseMessage(string json, int index, string user)
+ {
+ JObject message = JObject.Parse(JObject.Parse(json)["messages"][index].ToString());
+ string newmsg = message["message"].ToString().Replace("@user", user);
+ if (!message["special"].ToString().StartsWith(".")) newmsg += Environment.NewLine;
+ if (message["userchat"].ToObject<bool>()) return message["user"].ToString() + ": " + newmsg;
+ else return newmsg;
+ }
+ public int GetMessageDelay(string json, int index)
+ {
+ JObject message = JObject.Parse(JObject.Parse(json)["messages"][index].ToString());
+ return message["delay"].ToObject<int>();
+ }
+ public string GetSpecial(string json, int index)
+ {
+ JObject message = JObject.Parse(JObject.Parse(json)["messages"][index].ToString());
+ return message["special"].ToString();
+ }
+ }
+}
diff --git a/Histacom2.Engine/Paintbrush.cs b/Histacom2.Engine/Paintbrush.cs
new file mode 100644
index 0000000..320b80d
--- /dev/null
+++ b/Histacom2.Engine/Paintbrush.cs
@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace Histacom2.Engine
+{
+ public class Paintbrush
+ {
+ public static void PaintClassicBorders(object sender, PaintEventArgs e, int borderwidth)
+ {
+ ControlPaint.DrawBorder(e.Graphics, ((Control)sender).ClientRectangle,
+ Color.White, borderwidth, ButtonBorderStyle.Solid,
+ Color.White, borderwidth, ButtonBorderStyle.Solid,
+ Color.Gray, borderwidth, ButtonBorderStyle.Solid,
+ Color.Gray, borderwidth, ButtonBorderStyle.Solid);
+ }
+
+ public static void PaintClassicBordersIndented(object sender, PaintEventArgs e, int borderwidth)
+ {
+ ControlPaint.DrawBorder(e.Graphics, ((Control)sender).ClientRectangle,
+ Color.Gray, borderwidth, ButtonBorderStyle.Solid,
+ Color.Gray, borderwidth, ButtonBorderStyle.Solid,
+ Color.White, borderwidth, ButtonBorderStyle.Solid,
+ Color.White, borderwidth, ButtonBorderStyle.Solid);
+ }
+
+ public static void ExtendedToolStripSeparator_Paint(object sender, PaintEventArgs e)
+ {
+ // Get the separator's width and height.
+ ToolStripSeparator toolStripSeparator = (ToolStripSeparator)sender;
+ int width = toolStripSeparator.Width;
+ int height = toolStripSeparator.Height;
+
+ // Choose the colors for drawing.
+ Color foreColor = Color.Gray;
+ Color backColor = Color.Silver;
+
+ // Fill the background.
+ e.Graphics.FillRectangle(new SolidBrush(backColor), 0, 0, width, height);
+
+ // Draw the line.
+ e.Graphics.DrawLine(new Pen(foreColor), 4, height / 2, width - 4, height / 2);
+ }
+ }
+}
diff --git a/Histacom2.Engine/Properties/AssemblyInfo.cs b/Histacom2.Engine/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..1ffcdd7
--- /dev/null
+++ b/Histacom2.Engine/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Histacom2.Engine")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Histacom2.Engine")]
+[assembly: AssemblyCopyright("Copyright © 2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("9477b70f-2d32-4e1d-857b-4624a1deeb1b")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Histacom2.Engine/Properties/Resources.Designer.cs b/Histacom2.Engine/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..7a4cdf6
--- /dev/null
+++ b/Histacom2.Engine/Properties/Resources.Designer.cs
@@ -0,0 +1,419 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Histacom2.Engine.Properties {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // 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.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ public class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Histacom2.Engine.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap BottomLeft {
+ get {
+ object obj = ResourceManager.GetObject("BottomLeft", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap BottomRight {
+ get {
+ object obj = ResourceManager.GetObject("BottomRight", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap BottomSide {
+ get {
+ object obj = ResourceManager.GetObject("BottomSide", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
+ /// </summary>
+ public static System.IO.UnmanagedMemoryStream CHORD {
+ get {
+ return ResourceManager.GetStream("CHORD", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap LeftSide {
+ get {
+ object obj = ResourceManager.GetObject("LeftSide", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Byte[].
+ /// </summary>
+ public static byte[] LeviWindows {
+ get {
+ object obj = ResourceManager.GetObject("LeviWindows", resourceCulture);
+ return ((byte[])(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Byte[].
+ /// </summary>
+ public static byte[] LeviWindows1 {
+ get {
+ object obj = ResourceManager.GetObject("LeviWindows1", resourceCulture);
+ return ((byte[])(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap nullIcon {
+ get {
+ object obj = ResourceManager.GetObject("nullIcon", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap RightSide {
+ get {
+ object obj = ResourceManager.GetObject("RightSide", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap TopLeft {
+ get {
+ object obj = ResourceManager.GetObject("TopLeft", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap TopRight {
+ get {
+ object obj = ResourceManager.GetObject("TopRight", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap TopSide {
+ get {
+ object obj = ResourceManager.GetObject("TopSide", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap Win95Error {
+ get {
+ object obj = ResourceManager.GetObject("Win95Error", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap Win95Info {
+ get {
+ object obj = ResourceManager.GetObject("Win95Info", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
+ /// </summary>
+ public static System.IO.UnmanagedMemoryStream Win95PlusDangerousCreaturesAsterisk {
+ get {
+ return ResourceManager.GetStream("Win95PlusDangerousCreaturesAsterisk", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
+ /// </summary>
+ public static System.IO.UnmanagedMemoryStream Win95PlusDangerousCreaturesCritStop {
+ get {
+ return ResourceManager.GetStream("Win95PlusDangerousCreaturesCritStop", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
+ /// </summary>
+ public static System.IO.UnmanagedMemoryStream Win95PlusDangerousCreaturesExclamation {
+ get {
+ return ResourceManager.GetStream("Win95PlusDangerousCreaturesExclamation", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
+ /// </summary>
+ public static System.IO.UnmanagedMemoryStream Win95PlusDangerousCreaturesProgError {
+ get {
+ return ResourceManager.GetStream("Win95PlusDangerousCreaturesProgError", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
+ /// </summary>
+ public static System.IO.UnmanagedMemoryStream Win95PlusDangerousCreaturesQuestion {
+ get {
+ return ResourceManager.GetStream("Win95PlusDangerousCreaturesQuestion", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
+ /// </summary>
+ public static System.IO.UnmanagedMemoryStream Win95PlusDangerousCreaturesStart {
+ get {
+ return ResourceManager.GetStream("Win95PlusDangerousCreaturesStart", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap Win95PlusDangerousCreaturesWallpaper {
+ get {
+ object obj = ResourceManager.GetObject("Win95PlusDangerousCreaturesWallpaper", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
+ /// </summary>
+ public static System.IO.UnmanagedMemoryStream Win95PlusInsideComputerAsterisk {
+ get {
+ return ResourceManager.GetStream("Win95PlusInsideComputerAsterisk", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
+ /// </summary>
+ public static System.IO.UnmanagedMemoryStream Win95PlusInsideComputerStart {
+ get {
+ return ResourceManager.GetStream("Win95PlusInsideComputerStart", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
+ /// </summary>
+ public static System.IO.UnmanagedMemoryStream Win95PlusInsideComputerStop {
+ get {
+ return ResourceManager.GetStream("Win95PlusInsideComputerStop", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap Win95PlusInsideComputerWallpaper {
+ get {
+ object obj = ResourceManager.GetObject("Win95PlusInsideComputerWallpaper", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap Win95Question {
+ get {
+ object obj = ResourceManager.GetObject("Win95Question", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
+ /// </summary>
+ public static System.IO.UnmanagedMemoryStream Win95Start {
+ get {
+ return ResourceManager.GetStream("Win95Start", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
+ /// </summary>
+ public static System.IO.UnmanagedMemoryStream Win95Stop {
+ get {
+ return ResourceManager.GetStream("Win95Stop", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap Win95Warning {
+ get {
+ object obj = ResourceManager.GetObject("Win95Warning", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
+ /// </summary>
+ public static System.IO.UnmanagedMemoryStream Win98Start {
+ get {
+ return ResourceManager.GetStream("Win98Start", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
+ /// </summary>
+ public static System.IO.UnmanagedMemoryStream Win98Stop {
+ get {
+ return ResourceManager.GetStream("Win98Stop", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap WinAboutSeparator95 {
+ get {
+ object obj = ResourceManager.GetObject("WinAboutSeparator95", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap WinClassicClose {
+ get {
+ object obj = ResourceManager.GetObject("WinClassicClose", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap WinClassicMax {
+ get {
+ object obj = ResourceManager.GetObject("WinClassicMax", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap WinClassicMin {
+ get {
+ object obj = ResourceManager.GetObject("WinClassicMin", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap WinClassicRestore {
+ get {
+ object obj = ResourceManager.GetObject("WinClassicRestore", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Byte[].
+ /// </summary>
+ public static byte[] windows_command_prompt {
+ get {
+ object obj = ResourceManager.GetObject("windows_command_prompt", resourceCulture);
+ return ((byte[])(obj));
+ }
+ }
+ }
+}
diff --git a/Histacom2.Engine/Properties/Resources.resx b/Histacom2.Engine/Properties/Resources.resx
new file mode 100644
index 0000000..94b3988
--- /dev/null
+++ b/Histacom2.Engine/Properties/Resources.resx
@@ -0,0 +1,232 @@
+<?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>
+ <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="BottomLeft" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\winclassic\window\bottomleft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="BottomRight" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\winclassic\window\bottomright.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="BottomSide" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\winclassic\window\bottomside.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="LeftSide" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\winclassic\window\leftside.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="LeviWindows" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\winclassic\window\leviwindows.ttf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name="LeviWindows1" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\winclassic\window\leviwindows.ttf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name="nullIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\winclassic\window\nullicon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="RightSide" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\winclassic\window\rightside.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="TopLeft" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\winclassic\window\topleft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="TopRight" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\winclassic\window\topright.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="TopSide" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\winclassic\window\topside.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="WinClassicClose" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\winclassic\window\winclassicclose.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="WinClassicMax" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\winclassic\window\winclassicmax.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="WinClassicMin" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\winclassic\window\winclassicmin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="WinClassicRestore" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\winclassic\window\winclassicrestore.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="Win95Error" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\WinClassic\Window\Win95Error.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="Win95Info" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\WinClassic\Window\Win95Info.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="Win95Warning" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\WinClassic\Window\Win95Warning.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="WinAboutSeparator95" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\WinAboutSeparator95.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="windows_command_prompt" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\WinClassic\Window\windows_command_prompt.ttf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name="CHORD" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\chord.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name="Win95PlusDangerousCreaturesStart" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\Win95PlusDangerousCreaturesStart.WAV;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name="Win95PlusDangerousCreaturesWallpaper" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\Win95PlusDangerousCreaturesWallpaper.JPG;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="Win95Start" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\Win95Start.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name="Win95Stop" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\Win95Stop.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name="Win98Start" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\Win98Start.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name="Win98Stop" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\Win98Stop.WAV;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name="Win95PlusInsideComputerStart" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\Win95PlusInsideComputerStart.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name="Win95PlusInsideComputerStop" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\Win95PlusInsideComputerStop.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name="Win95PlusInsideComputerWallpaper" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\Win95PlusInsideComputerWallpaper.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="Win95PlusDangerousCreaturesAsterisk" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\Win95PlusDangerousCreaturesAsterisk.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name="Win95PlusDangerousCreaturesCritStop" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\Win95PlusDangerousCreaturesCritStop.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name="Win95PlusDangerousCreaturesExclamation" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\Win95PlusDangerousCreaturesExclamation.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name="Win95PlusDangerousCreaturesProgError" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\Win95PlusDangerousCreaturesProgError.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name="Win95PlusDangerousCreaturesQuestion" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\Win95PlusDangerousCreaturesQuestion.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name="Win95Question" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\WinClassic\Window\Win95Question.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="Win95PlusInsideComputerAsterisk" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\Win95PlusInsideComputerAsterisk.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+</root> \ No newline at end of file
diff --git a/Histacom2.Engine/Resources/CHORD.WAV b/Histacom2.Engine/Resources/CHORD.WAV
new file mode 100644
index 0000000..fd2b30b
--- /dev/null
+++ b/Histacom2.Engine/Resources/CHORD.WAV
Binary files differ
diff --git a/Histacom2.Engine/Resources/Icon128x.ico b/Histacom2.Engine/Resources/Icon128x.ico
new file mode 100644
index 0000000..ceb4cff
--- /dev/null
+++ b/Histacom2.Engine/Resources/Icon128x.ico
Binary files differ
diff --git a/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesAsterisk.wav b/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesAsterisk.wav
new file mode 100644
index 0000000..2855ad5
--- /dev/null
+++ b/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesAsterisk.wav
Binary files differ
diff --git a/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesCritStop.wav b/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesCritStop.wav
new file mode 100644
index 0000000..e436d74
--- /dev/null
+++ b/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesCritStop.wav
Binary files differ
diff --git a/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesExclamation.wav b/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesExclamation.wav
new file mode 100644
index 0000000..bd72c1a
--- /dev/null
+++ b/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesExclamation.wav
Binary files differ
diff --git a/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesProgError.wav b/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesProgError.wav
new file mode 100644
index 0000000..eea2006
--- /dev/null
+++ b/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesProgError.wav
Binary files differ
diff --git a/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesQuestion.wav b/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesQuestion.wav
new file mode 100644
index 0000000..18d5fbb
--- /dev/null
+++ b/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesQuestion.wav
Binary files differ
diff --git a/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesStart.WAV b/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesStart.WAV
new file mode 100644
index 0000000..3b9666f
--- /dev/null
+++ b/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesStart.WAV
Binary files differ
diff --git a/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesWallpaper.JPG b/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesWallpaper.JPG
new file mode 100644
index 0000000..eb31a05
--- /dev/null
+++ b/Histacom2.Engine/Resources/Win95PlusDangerousCreaturesWallpaper.JPG
Binary files differ
diff --git a/Histacom2.Engine/Resources/Win95PlusInsideComputerAsterisk.wav b/Histacom2.Engine/Resources/Win95PlusInsideComputerAsterisk.wav
new file mode 100644
index 0000000..a606841
--- /dev/null
+++ b/Histacom2.Engine/Resources/Win95PlusInsideComputerAsterisk.wav
Binary files differ
diff --git a/Histacom2.Engine/Resources/Win95PlusInsideComputerStart.wav b/Histacom2.Engine/Resources/Win95PlusInsideComputerStart.wav
new file mode 100644
index 0000000..22ca7df
--- /dev/null
+++ b/Histacom2.Engine/Resources/Win95PlusInsideComputerStart.wav
Binary files differ
diff --git a/Histacom2.Engine/Resources/Win95PlusInsideComputerStop.wav b/Histacom2.Engine/Resources/Win95PlusInsideComputerStop.wav
new file mode 100644
index 0000000..d7a25a6
--- /dev/null
+++ b/Histacom2.Engine/Resources/Win95PlusInsideComputerStop.wav
Binary files differ
diff --git a/Histacom2.Engine/Resources/Win95PlusInsideComputerWallpaper.jpg b/Histacom2.Engine/Resources/Win95PlusInsideComputerWallpaper.jpg
new file mode 100644
index 0000000..ae577da
--- /dev/null
+++ b/Histacom2.Engine/Resources/Win95PlusInsideComputerWallpaper.jpg
Binary files differ
diff --git a/Histacom2.Engine/Resources/Win95Start.wav b/Histacom2.Engine/Resources/Win95Start.wav
new file mode 100644
index 0000000..d6ef0e2
--- /dev/null
+++ b/Histacom2.Engine/Resources/Win95Start.wav
Binary files differ
diff --git a/Histacom2.Engine/Resources/Win95Stop.wav b/Histacom2.Engine/Resources/Win95Stop.wav
new file mode 100644
index 0000000..b3127d1
--- /dev/null
+++ b/Histacom2.Engine/Resources/Win95Stop.wav
Binary files differ
diff --git a/Histacom2.Engine/Resources/Win98Start.wav b/Histacom2.Engine/Resources/Win98Start.wav
new file mode 100644
index 0000000..4d27f3d
--- /dev/null
+++ b/Histacom2.Engine/Resources/Win98Start.wav
Binary files differ
diff --git a/Histacom2.Engine/Resources/Win98Stop.WAV b/Histacom2.Engine/Resources/Win98Stop.WAV
new file mode 100644
index 0000000..2bc524e
--- /dev/null
+++ b/Histacom2.Engine/Resources/Win98Stop.WAV
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinAboutSeparator95.png b/Histacom2.Engine/Resources/WinAboutSeparator95.png
new file mode 100644
index 0000000..524cad8
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinAboutSeparator95.png
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/BottomLeft.png b/Histacom2.Engine/Resources/WinClassic/Window/BottomLeft.png
new file mode 100644
index 0000000..97e40c2
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/BottomLeft.png
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/BottomRight.png b/Histacom2.Engine/Resources/WinClassic/Window/BottomRight.png
new file mode 100644
index 0000000..14a486d
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/BottomRight.png
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/BottomSide.png b/Histacom2.Engine/Resources/WinClassic/Window/BottomSide.png
new file mode 100644
index 0000000..97bbc89
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/BottomSide.png
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/LeftSide.png b/Histacom2.Engine/Resources/WinClassic/Window/LeftSide.png
new file mode 100644
index 0000000..205c2b1
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/LeftSide.png
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/LeviWindows.ttf b/Histacom2.Engine/Resources/WinClassic/Window/LeviWindows.ttf
new file mode 100644
index 0000000..134beb9
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/LeviWindows.ttf
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/RightSide.png b/Histacom2.Engine/Resources/WinClassic/Window/RightSide.png
new file mode 100644
index 0000000..d51dbd2
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/RightSide.png
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/TopLeft.png b/Histacom2.Engine/Resources/WinClassic/Window/TopLeft.png
new file mode 100644
index 0000000..056f8d1
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/TopLeft.png
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/TopRight.png b/Histacom2.Engine/Resources/WinClassic/Window/TopRight.png
new file mode 100644
index 0000000..b8c78fb
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/TopRight.png
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/TopSide.png b/Histacom2.Engine/Resources/WinClassic/Window/TopSide.png
new file mode 100644
index 0000000..01f5d79
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/TopSide.png
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/Win95Error.png b/Histacom2.Engine/Resources/WinClassic/Window/Win95Error.png
new file mode 100644
index 0000000..4667e9d
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/Win95Error.png
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/Win95Info.png b/Histacom2.Engine/Resources/WinClassic/Window/Win95Info.png
new file mode 100644
index 0000000..5d2018a
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/Win95Info.png
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/Win95Question.png b/Histacom2.Engine/Resources/WinClassic/Window/Win95Question.png
new file mode 100644
index 0000000..b8ff406
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/Win95Question.png
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/Win95Warning.png b/Histacom2.Engine/Resources/WinClassic/Window/Win95Warning.png
new file mode 100644
index 0000000..8e01535
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/Win95Warning.png
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/WinClassicClose.png b/Histacom2.Engine/Resources/WinClassic/Window/WinClassicClose.png
new file mode 100644
index 0000000..f3900e9
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/WinClassicClose.png
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/WinClassicMax.png b/Histacom2.Engine/Resources/WinClassic/Window/WinClassicMax.png
new file mode 100644
index 0000000..fabb8ba
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/WinClassicMax.png
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/WinClassicMin.png b/Histacom2.Engine/Resources/WinClassic/Window/WinClassicMin.png
new file mode 100644
index 0000000..f6d3f73
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/WinClassicMin.png
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/WinClassicRestore.png b/Histacom2.Engine/Resources/WinClassic/Window/WinClassicRestore.png
new file mode 100644
index 0000000..d6083c6
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/WinClassicRestore.png
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/nullIcon.png b/Histacom2.Engine/Resources/WinClassic/Window/nullIcon.png
new file mode 100644
index 0000000..a8bbc1d
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/nullIcon.png
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/pjBg6mKP.bmp b/Histacom2.Engine/Resources/WinClassic/Window/pjBg6mKP.bmp
new file mode 100644
index 0000000..80948b4
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/pjBg6mKP.bmp
Binary files differ
diff --git a/Histacom2.Engine/Resources/WinClassic/Window/windows_command_prompt.ttf b/Histacom2.Engine/Resources/WinClassic/Window/windows_command_prompt.ttf
new file mode 100644
index 0000000..b771b3a
--- /dev/null
+++ b/Histacom2.Engine/Resources/WinClassic/Window/windows_command_prompt.ttf
Binary files differ
diff --git a/Histacom2.Engine/SaveSystem.cs b/Histacom2.Engine/SaveSystem.cs
new file mode 100644
index 0000000..ef98c10
--- /dev/null
+++ b/Histacom2.Engine/SaveSystem.cs
@@ -0,0 +1,716 @@
+// Define BINARY_SAVE before release so the player has
+// to put some effort into cheating ;)
+// During development, leave it undefined to use the
+// easily modifiable JSON serialised format
+//#define BINARY_SAVE
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Newtonsoft.Json;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Runtime.CompilerServices;
+using System.Drawing;
+using System.Text.RegularExpressions;
+using System.Runtime.InteropServices;
+
+namespace Histacom2.Engine
+{
+ public static class SaveSystem
+ {
+ public static Save CurrentSave { get; set; }
+ public static bool DevMode = false;
+ public static Form troubleshooter;
+
+ public static Theme currentTheme { get; set; }
+
+#if BINARY_SAVE
+ private static readonly byte[] magic = Encoding.UTF8.GetBytes("THSv");
+ private static readonly IOrderedEnumerable<System.Reflection.PropertyInfo> properties = typeof(Save).GetProperties().OrderBy(p => (p.GetCustomAttributes(typeof(OrderAttribute), false).SingleOrDefault() as OrderAttribute).Order);
+#endif
+
+ public static string GameDirectory
+ {
+ get
+ {
+ return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Histacom2");
+ }
+ }
+
+ public static string DataDirectory
+ {
+ get
+ {
+ return Path.Combine(GameDirectory, "Data");
+ }
+ }
+
+ public static string AllProfilesDirectory
+ {
+ get
+ {
+ return Path.Combine(GameDirectory, "Profiles");
+ }
+ }
+
+ public static string ProfileName = "";
+ public static string ProfileFile = "main.save";
+
+ public static string ProfileDirectory
+ {
+ get
+ {
+ return Path.Combine(GameDirectory, Path.Combine("Profiles", ProfileName));
+ }
+ }
+
+ public static string ProfileFileSystemDirectory
+ {
+ get
+ {
+ return Path.Combine(ProfileDirectory, "folders");
+ }
+ }
+
+ public static string ProfileMyComputerDirectory
+ {
+ get
+ {
+ return Path.Combine(ProfileFileSystemDirectory, "CDrive");
+ }
+ }
+
+ public static string ProfileSettingsDirectory
+ {
+ get
+ {
+ return Path.Combine(ProfileMyComputerDirectory, "Documents and Settings");
+ }
+ }
+
+ public static string ProfileDocumentsDirectory
+ {
+ get
+ {
+ return Path.Combine(ProfileMyComputerDirectory, "My Documents");
+ }
+ }
+
+ public static string ProfileProgramsDirectory
+ {
+ get
+ {
+ return Path.Combine(ProfileMyComputerDirectory, "Program Files");
+ }
+ }
+
+ public static string ProfileWindowsDirectory
+ {
+ get
+ {
+ return Path.Combine(ProfileMyComputerDirectory, "Windows");
+ }
+ }
+
+ public static void NewGame()
+ {
+ var save = new Save();
+ save.ExperiencedStories = new List<string>();
+ if (DevMode == true)
+ {
+ if (ProfileName == "98")
+ {
+ save.CurrentOS = "98";
+ save.ThemeName = "default98";
+ currentTheme = new Default98Theme();
+ }
+ else
+ {
+ save.CurrentOS = "95";
+ save.ThemeName = "default95";
+ save.BytesLeft = 536870912;
+ currentTheme = new Default95Theme();
+ }
+ }
+ else
+ {
+ save.CurrentOS = "95";
+ save.ThemeName = "default95";
+ save.BytesLeft = 536870912;
+ currentTheme = new Default95Theme();
+ }
+ CurrentSave = save;
+
+ CheckFiles();
+ SaveGame();
+ }
+
+ public static void CheckFiles()
+ {
+ Directory.CreateDirectory(GameDirectory);
+ Directory.CreateDirectory(DataDirectory);
+ Directory.CreateDirectory(AllProfilesDirectory);
+ Directory.CreateDirectory(ProfileDirectory);
+ Directory.CreateDirectory(ProfileFileSystemDirectory);
+
+ SaveDirectoryInfo(ProfileDirectory, "folders", false, "My Computer", false);
+ SaveDirectoryInfo(ProfileFileSystemDirectory, "CDrive", false, "C:", true);
+ if (CurrentSave.CurrentOS == "95" || CurrentSave.CurrentOS == "98") SaveDirectoryInfo(ProfileMyComputerDirectory, "My Documents", false, "My Documents", true);
+ if (CurrentSave.CurrentOS == "2000" || CurrentSave.CurrentOS == "ME") SaveDirectoryInfo(ProfileMyComputerDirectory, "Documents and Settings", false, "Documents and Settings", true);
+ SaveDirectoryInfo(ProfileMyComputerDirectory, "Program Files", true, "Program Files", true);
+ SaveDirectoryInfo(ProfileProgramsDirectory, "Accessories", false, "Accessories", true);
+ SaveDirectoryInfo(ProfileProgramsDirectory, "Internet Explorer", true, "Internet Explorer", true);
+ SaveDirectoryInfo(ProfileProgramsDirectory, "The Microsoft Network", true, "The Microsoft Network", true);
+ SaveDirectoryInfo(ProfileMyComputerDirectory, "Windows", true, "Windows", true);
+
+ CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Accessories"), "wordpad.exe", "wordpad", 16, 183296);
+ CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Internet Explorer"), "ie20.exe", "ie", 8, 512);
+ CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Internet Explorer"), "lnfinst.exe", "iebrokeninstaller", 8, 512);
+ CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "The Microsoft Network"), "msnver.txt", "5900", 12, 4);
+
+ CreateWindowsDirectory();
+ }
+
+ public static void CreateWindowsDirectory()
+ {
+ SaveDirectoryInfo(ProfileWindowsDirectory, "System", true, "System", true);
+ SaveDirectoryInfo(ProfileWindowsDirectory, "Config", true, "Config", true);
+ SaveDirectoryInfo(ProfileWindowsDirectory, "Cursors", true, "Cursors", true);
+ SaveDirectoryInfo(ProfileWindowsDirectory, "Fonts", true, "Fonts", true);
+ SaveDirectoryInfo(ProfileWindowsDirectory, "Help", true, "Help", true);
+ SaveDirectoryInfo(ProfileWindowsDirectory, "Temp", true, "Temp", true);
+ SaveDirectoryInfo(ProfileWindowsDirectory, "Desktop", true, "Desktop", true);
+
+ CreateWindowsFile(ProfileWindowsDirectory, "calc.exe", "calc", 13, 59392);
+ CreateWindowsFile(ProfileWindowsDirectory, "emm386.exe", "emm386", 10, 125495);
+ CreateWindowsFile(ProfileWindowsDirectory, "explorer.exe", "explorer", 0, 204288);
+ CreateWindowsFile(ProfileWindowsDirectory, "notepad.exe", "notepad", 14, 34034);
+ CreateWindowsFile(ProfileWindowsDirectory, "regedit.exe", "regedit", 15, 120320);
+ CreateWindowsFile(ProfileWindowsDirectory, "win.com", "", 10, 22679);
+ CreateWindowsFile(ProfileWindowsDirectory, "write.exe", "wordpad", 16, 5120);
+ }
+
+ public static void CreateWindowsFile(string filepath, string filename, string contents, int fileicon, int bytes)
+ {
+ File.WriteAllText(Path.Combine(filepath, filename), contents);
+ THFileInfo info = new THFileInfo();
+ info.Name = filename;
+ info.FileIcon = fileicon;
+ info.ByteSize = bytes;
+ CurrentSave.BytesLeft -= bytes;
+ UpdateDirectoryInfo(filepath, info);
+ }
+
+ public static void UpdateDirectoryInfo(string path, THFileInfo newfile)
+ {
+ newfile.DOSName = newfile.Name.ToUpper().Replace("*", "").Replace("+", "").Replace(":", "").Replace(";", "").Replace(" ", "");
+ if (newfile.DOSName.Contains("."))
+ {
+ string[] dos = newfile.DOSName.Split('.');
+
+ if (dos.Count() > 2)
+ {
+ List<string> dosb = dos.ToList();
+ dosb.RemoveRange(1, dos.Count() - 2);
+ dos = dosb.ToArray();
+ }
+ dos[1] = dos[1].Substring(0, 3);
+ if (dos[0].Length > 8) dos[0] = dos[0].Substring(0, 6) + "~1";
+
+ newfile.DOSName = dos[0] + "." + dos[1];
+ }
+ else if (newfile.DOSName.Length > 8) newfile.DOSName = newfile.DOSName.Substring(0, 6) + "~1";
+
+ if (File.ReadAllText(Path.Combine(path, "_data.info")).Contains(newfile.DOSName)) return;
+ FileSystemFolderInfo fsfi = JsonConvert.DeserializeObject<FileSystemFolderInfo>(File.ReadAllText(Path.Combine(path, "_data.info")));
+ fsfi.Files.Add(newfile);
+ fsfi.ByteSize += newfile.ByteSize;
+
+ string toWrite = JsonConvert.SerializeObject(fsfi, Formatting.Indented);
+
+ File.WriteAllText(Path.Combine(path, "_data.info"), toWrite);
+ }
+
+ public static void UpgradeFileSystem(string oldOS, string newOS)
+ {
+ switch (oldOS)
+ {
+ case "95":
+ if (newOS == "98" || newOS == "2000" || newOS == "ME")
+ {
+ // We are upgrading from the old WinClassic file System to the new WinClassic filesystem!
+ // All the above OSes share basically the same file layout!
+ // (Excluding Documents And Settings) which is 2000 and ME only
+
+ // Add Address Book into existance!
+
+ SaveDirectoryInfo(ProfileProgramsDirectory, "Outlook Express", false, "Outlook Express", true);
+ CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Outlook Express"), "WAB.exe", "addressbook", 8, 512);
+
+ // There is no "The Microsoft Network" folder!
+
+ if (Directory.Exists(Path.Combine(ProfileProgramsDirectory, "The Microsoft Network"))) Directory.Delete(Path.Combine(ProfileProgramsDirectory, "The Microsoft Network"), true);
+ FileSystemFolderInfo fsfi = JsonConvert.DeserializeObject<FileSystemFolderInfo>(File.ReadAllText(Path.Combine(ProfileProgramsDirectory, "_data.info")));
+ foreach (THDirInfo dir in fsfi.SubDirs)
+ {
+ if (dir.Name == "The Microsoft Network")
+ {
+ fsfi.SubDirs.Remove(dir);
+ break;
+ }
+ }
+ }
+ break;
+ }
+ }
+
+ public static void SaveDirectoryInfo(string parent, string dirname, bool isProtected, string label, bool allowback)
+ {
+ if (File.Exists(Path.Combine(parent, dirname, "_data.info")) && Path.Combine(parent, dirname) != ProfileFileSystemDirectory) return;
+ Directory.CreateDirectory(Path.Combine(parent, dirname));
+
+ FileSystemFolderInfo info = new FileSystemFolderInfo();
+
+ info.IsProtected = isProtected;
+ info.Label = label;
+
+ info.DOSLabel = info.Label.ToUpper().Replace("*", "").Replace("+", "").Replace(":", "").Replace(";", "").Replace(".", "").Replace(" ", "");
+ if (info.DOSLabel.Length > 8) info.DOSLabel = info.DOSLabel.Substring(0, 6) + "~1";
+ if (label == "C:") info.DOSLabel = "C:";
+ info.AllowBack = allowback;
+ info.Files = new List<THFileInfo>(256);
+ info.SubDirs = new List<THDirInfo>(256);
+ info.ByteSize = 0;
+
+ if (parent != ProfileDirectory)
+ {
+ FileSystemFolderInfo fsfi = JsonConvert.DeserializeObject<FileSystemFolderInfo>(File.ReadAllText(Path.Combine(parent, "_data.info")));
+ THDirInfo thd = new THDirInfo();
+ thd.Name = info.Label;
+ thd.DOSName = info.DOSLabel;
+ fsfi.SubDirs.Add(thd);
+
+ File.WriteAllText(Path.Combine(parent, "_data.info"), JsonConvert.SerializeObject(fsfi, Formatting.Indented));
+ }
+
+ string toWrite = JsonConvert.SerializeObject(info, Formatting.Indented);
+
+ File.WriteAllText(Path.Combine(Path.Combine(parent, dirname), "_data.info"), toWrite);
+ }
+
+#if BINARY_SAVE
+ // Be careful with this... it trusts that the calling code has already checked
+ // that T can be written by BinaryWriter.
+ // No generics, because that'd be near-impossible to read back.
+ private static void WriteList<T>(BinaryWriter write, List<T> list)
+ {
+ if (list == null)
+ write.Write(0);
+ else
+ {
+ write.Write(list.Count);
+ foreach (T obj in list)
+ ((dynamic)write).Write(obj);
+ }
+ }
+
+ private static List<T> ReadList<T>(BinaryReader read, string reader)
+ {
+ int count = read.ReadInt32();
+ var ret = new List<T>(count);
+ var function = typeof(BinaryReader).GetMethod(reader);
+ for (int i = 0; i < count; i++)
+ ret.Add((T) function.Invoke(read, new object[] { }));
+ return ret;
+ }
+
+ private static void WriteBitfield(Stream fobj, IEnumerable<bool> bools)
+ {
+ sbyte bit = 7;
+ int cur = 0;
+ var bitfields = new byte[bools.Count() / 8 + 1];
+ foreach (bool mybool in bools)
+ {
+ if (mybool)
+ bitfields[cur] |= (byte) (1 << bit);
+ bit--;
+ if (bit < 0)
+ {
+ bit = 7;
+ cur++;
+ }
+ }
+ fobj.Write(bitfields, 0, bitfields.Length);
+ }
+
+ private static List<bool> ReadBitfield(Stream fobj, int count)
+ {
+ sbyte bit = 7;
+ int cur = 0;
+ var bitfields = new byte[count / 8 + 1];
+ var bools = new List<bool>(count);
+ byte val = (byte) fobj.ReadByte();
+ fobj.Read(bitfields, 0, bitfields.Length);
+ for (int i = 0; i < count; i++)
+ {
+ bools.Add(((val >> bit) & 1) == 1);
+ bit--;
+ if (bit < 0)
+ {
+ bit = 7;
+ cur++;
+ }
+ }
+ return bools;
+ }
+#endif
+
+ public static Save ReadSave(string fname)
+ {
+#if BINARY_SAVE
+ using (var fobj = File.OpenRead(fname))
+ {
+ var save = new Save();
+ var header = new byte[magic.Length];
+ var read = new BinaryReader(fobj);
+ fobj.Read(header, 0, magic.Length);
+ if (!magic.SequenceEqual(header))
+ throw new InvalidDataException("This is not a Histacom2 binary save");
+ int numprops = read.ReadInt32();
+ var bools = new List<System.Reflection.PropertyInfo>();
+ // Holy code duplication, Batman.
+ // If you know a better way to get C# to do this, I'm all ears.
+ foreach (var property in properties.Take(numprops))
+ {
+ if (property.PropertyType == typeof(string))
+ property.SetValue(save, read.ReadString());
+ else if (property.PropertyType == typeof(int))
+ property.SetValue(save, read.ReadInt32());
+ else if (property.PropertyType == typeof(uint))
+ property.SetValue(save, read.ReadUInt32());
+ else if (property.PropertyType == typeof(long))
+ property.SetValue(save, read.ReadInt64());
+ else if (property.PropertyType == typeof(ulong))
+ property.SetValue(save, read.ReadUInt64());
+ else if (property.PropertyType == typeof(short))
+ property.SetValue(save, read.ReadInt16());
+ else if (property.PropertyType == typeof(ushort))
+ property.SetValue(save, read.ReadUInt16());
+ else if (property.PropertyType == typeof(byte))
+ property.SetValue(save, read.ReadByte());
+ else if (property.PropertyType == typeof(sbyte))
+ property.SetValue(save, read.ReadSByte());
+ else if (property.PropertyType == typeof(char))
+ property.SetValue(save, read.ReadChar());
+ else if (property.PropertyType == typeof(float))
+ property.SetValue(save, read.ReadSingle());
+ else if (property.PropertyType == typeof(double))
+ property.SetValue(save, read.ReadDouble());
+ else if (property.PropertyType == typeof(decimal))
+ property.SetValue(save, read.ReadDecimal());
+
+ else if (property.PropertyType == typeof(List<string>))
+ property.SetValue(save, ReadList<string>(read, "ReadString"));
+ else if (property.PropertyType == typeof(List<int>))
+ property.SetValue(save, ReadList<string>(read, "ReadInt32"));
+ else if (property.PropertyType == typeof(List<uint>))
+ property.SetValue(save, ReadList<string>(read, "ReadUInt32"));
+ else if (property.PropertyType == typeof(List<long>))
+ property.SetValue(save, ReadList<string>(read, "ReadInt64"));
+ else if (property.PropertyType == typeof(List<ulong>))
+ property.SetValue(save, ReadList<string>(read, "ReadUInt64"));
+ else if (property.PropertyType == typeof(List<short>))
+ property.SetValue(save, ReadList<string>(read, "ReadInt16"));
+ else if (property.PropertyType == typeof(List<ushort>))
+ property.SetValue(save, ReadList<string>(read, "ReadUInt16"));
+ else if (property.PropertyType == typeof(List<byte>))
+ property.SetValue(save, ReadList<string>(read, "ReadByte"));
+ else if (property.PropertyType == typeof(List<sbyte>))
+ property.SetValue(save, ReadList<string>(read, "ReadSByte"));
+ else if (property.PropertyType == typeof(List<char>))
+ property.SetValue(save, ReadList<string>(read, "ReadChar"));
+ else if (property.PropertyType == typeof(List<float>))
+ property.SetValue(save, ReadList<string>(read, "ReadSingle"));
+ else if (property.PropertyType == typeof(List<double>))
+ property.SetValue(save, ReadList<string>(read, "ReadDouble"));
+ else if (property.PropertyType == typeof(List<decimal>))
+ property.SetValue(save, ReadList<string>(read, "ReadDecimal"));
+
+ // Remember to read this boolean from the bitfield at the end.
+ else if (property.PropertyType == typeof(bool))
+ bools.Add(property);
+
+ else if (property.PropertyType == typeof(List<bool>))
+ property.SetValue(save, ReadBitfield(fobj, read.ReadInt32()));
+
+ // RIP
+ else
+ throw new InvalidDataException("There is no deserialisation method specified for " + property.PropertyType.ToString());
+ }
+
+ // Let's read the ultra tiny bitfield.
+ var loaded = ReadBitfield(fobj, bools.Count);
+ foreach (var item in bools.Zip(loaded, (p, b) => new { Property = p, Value = b }))
+ item.Property.SetValue(save, item.Value);
+
+ return save;
+ }
+#else
+ return JsonConvert.DeserializeObject<Save>(File.ReadAllText(fname));
+#endif
+ }
+
+ public static void WriteSave(string fname, Save save)
+ {
+#if BINARY_SAVE
+ using (var fobj = File.OpenWrite(fname))
+ {
+ var write = new BinaryWriter(fobj);
+ var bools = new List<bool>();
+ fobj.Write(magic, 0, magic.Length);
+ write.Write(properties.Count()); // The number of properties basically acts as the version number.
+
+ foreach (var property in properties)
+ {
+ if (property == null)
+ continue;
+
+ // Types that can be written by BinaryWriter, except booleans.
+ if (property.PropertyType == typeof(string))
+ {
+ var val = property.GetValue(save) as string;
+ if (val == null)
+ write.Write("");
+ else
+ write.Write(val);
+ }
+ else if (property.PropertyType == typeof(int))
+ write.Write((int) property.GetValue(save));
+ else if (property.PropertyType == typeof(uint))
+ write.Write((uint) property.GetValue(save));
+ else if (property.PropertyType == typeof(long))
+ write.Write((long) property.GetValue(save));
+ else if (property.PropertyType == typeof(ulong))
+ write.Write((ulong) property.GetValue(save));
+ else if (property.PropertyType == typeof(short))
+ write.Write((short) property.GetValue(save));
+ else if (property.PropertyType == typeof(ushort))
+ write.Write((ushort) property.GetValue(save));
+ else if (property.PropertyType == typeof(byte))
+ write.Write((byte) property.GetValue(save));
+ else if (property.PropertyType == typeof(sbyte))
+ write.Write((sbyte) property.GetValue(save));
+ else if (property.PropertyType == typeof(char))
+ write.Write((char) property.GetValue(save));
+ else if (property.PropertyType == typeof(float))
+ write.Write((float) property.GetValue(save));
+ else if (property.PropertyType == typeof(double))
+ write.Write((double) property.GetValue(save));
+ else if (property.PropertyType == typeof(decimal))
+ write.Write((double) property.GetValue(save));
+
+ // ... and their lists.
+ else if (property.PropertyType == typeof(List<string>))
+ WriteList(write, property.GetValue(save) as List<string>);
+ else if (property.PropertyType == typeof(List<int>))
+ WriteList(write, property.GetValue(save) as List<int>);
+ else if (property.PropertyType == typeof(List<uint>))
+ WriteList(write, property.GetValue(save) as List<uint>);
+ else if (property.PropertyType == typeof(List<long>))
+ WriteList(write, property.GetValue(save) as List<long>);
+ else if (property.PropertyType == typeof(List<ulong>))
+ WriteList(write, property.GetValue(save) as List<ulong>);
+ else if (property.PropertyType == typeof(List<short>))
+ WriteList(write, property.GetValue(save) as List<short>);
+ else if (property.PropertyType == typeof(List<ushort>))
+ WriteList(write, property.GetValue(save) as List<ushort>);
+ else if (property.PropertyType == typeof(List<byte>))
+ WriteList(write, property.GetValue(save) as List<byte>);
+ else if (property.PropertyType == typeof(List<sbyte>))
+ WriteList(write, property.GetValue(save) as List<sbyte>);
+ else if (property.PropertyType == typeof(List<char>))
+ WriteList(write, property.GetValue(save) as List<char>);
+ else if (property.PropertyType == typeof(List<float>))
+ WriteList(write, property.GetValue(save) as List<float>);
+ else if (property.PropertyType == typeof(List<double>))
+ WriteList(write, property.GetValue(save) as List<double>);
+ else if (property.PropertyType == typeof(List<decimal>))
+ WriteList(write, property.GetValue(save) as List<decimal>);
+
+ // Booleans - they go in the bitfield at the end.
+ else if (property.PropertyType == typeof(bool))
+ bools.Add((bool) property.GetValue(save));
+
+ // List of booleans - it gets its own bitfield.
+ else if (property.PropertyType == typeof(List<bool>))
+ {
+ var val = property.GetValue(save) as List<bool>;
+ if (val == null)
+ write.Write(0);
+ else
+ {
+ write.Write(val.Count());
+ WriteBitfield(fobj, val);
+ }
+ }
+
+ // Now what?
+ else
+ throw new InvalidDataException("There is no serialisation method specified for " + property.PropertyType.ToString());
+ }
+
+ // In order to save space, we store bools in a bitfield at the end.
+ // One byte can store 8 bools, saving a whopping 7 bytes which can then be used for
+ // extremely short text documents or something.
+ WriteBitfield(fobj, bools);
+ }
+#else
+ // Serialize the save to JSON.
+ File.WriteAllText(fname, JsonConvert.SerializeObject(save, Formatting.Indented));
+#endif
+ }
+
+ public static void SaveGame()
+ {
+ WriteSave(Path.Combine(ProfileDirectory, ProfileFile), CurrentSave);
+ }
+
+ public static bool LoadSave()
+ {
+ string savefile = Path.Combine(ProfileDirectory, ProfileFile);
+ try
+ {
+ CurrentSave = ReadSave(savefile);
+ }
+ catch
+ {
+ MessageBox.Show("WARNING! It looks like this save is corrupt! We will now open the Save troubleshooter");
+
+ troubleshooter.ShowDialog();
+ }
+ return true;
+ }
+
+ public static byte[] GetAchievements()
+ {
+ byte[] byt = new byte[] { 0, // Piracy Ending
+ 0, // End of Internet Ending
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ if (DevMode) File.WriteAllBytes(Path.Combine(DataDirectory, "achieved.thack"), byt);
+
+ if (File.Exists(Path.Combine(DataDirectory, "achieved.thack"))) byt = File.ReadAllBytes(Path.Combine(DataDirectory, "achieved.thack"));
+ else File.WriteAllBytes(Path.Combine(DataDirectory, "achieved.thack"), byt);
+
+ return byt;
+ }
+
+ public static void SaveAchievement(int achievementID)
+ {
+ if (!File.Exists(Path.Combine(DataDirectory, "achieved.thack"))) File.WriteAllBytes(Path.Combine(DataDirectory, "achieved.thack"), new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 });
+
+ byte[] byt = File.ReadAllBytes(Path.Combine(DataDirectory, "achieved.thack"));
+ byt[achievementID] = 1;
+ File.WriteAllBytes(Path.Combine(DataDirectory, "achieved.thack"), byt);
+ }
+
+ public static void SetTheme()
+ {
+ switch (CurrentSave.ThemeName)
+ {
+ case "default95":
+ currentTheme = new Default95Theme();
+ break;
+ case "default98":
+ currentTheme = new Default98Theme();
+ break;
+ case "dangeranimals":
+ currentTheme = new DangerousCreaturesTheme();
+ break;
+ case "insidepc":
+ currentTheme = new InsideComputerTheme();
+ break;
+ }
+ }
+ }
+
+
+ // This lets us preserve the order of properties.
+ // Thanks to "ghord" from StackOverflow.
+ public sealed class OrderAttribute : Attribute
+ {
+ private readonly int order_;
+ public OrderAttribute([CallerLineNumber]int order = 0)
+ {
+ order_ = order;
+ }
+ public int Order { get { return order_; } }
+ }
+
+ public class Save
+ {
+ // To maintain binary save compatibility,
+ // add all new properties to the end and don't remove any.
+ // Also, every property needs an "Order" attribute.
+
+ [Order]
+ public string Username { get; set; }
+
+ [Order]
+ public string CurrentOS { get; set; }
+
+ // public Dictionary<string, bool> InstalledPrograms { get; set; } InstallProgram is no longer needed... we have that data in the FileSystem
+
+ [Order]
+ public List<string> ExperiencedStories { get; set; }
+
+ [Order]
+ public bool FTime95 { get; set; }
+
+ [Order]
+ public int mineSweepE { get; set; } = 999;
+
+ [Order]
+ public int mineSweepI { get; set; } = 999;
+
+ [Order]
+ public int mineSweepH { get; set; } = 999;
+
+ [Order]
+ public string ThemeName { get; set; }
+
+ [Order]
+ public int BytesLeft { get; set; }
+
+ [Order]
+ public Theme customTheme { get; set; }
+ }
+
+ public class FileSystemFolderInfo
+ {
+ public bool IsProtected { get; set; }
+ public string Label { get; set; }
+ public string DOSLabel { get; set; }
+ public bool AllowBack { get; set; }
+ public int ByteSize { get; set; }
+ public List<THFileInfo> Files { get; set; }
+ public List<THDirInfo> SubDirs { get; set; }
+ }
+
+ public class THFileInfo
+ {
+ public string Name { get; set; }
+ public string DOSName { get; set; }
+ public int FileIcon { get; set; }
+ public int ByteSize { get; set; }
+ }
+
+ public class THDirInfo
+ {
+ public string Name { get; set; }
+ public string DOSName { get; set; }
+ }
+}
diff --git a/Histacom2.Engine/TaskBarController.cs b/Histacom2.Engine/TaskBarController.cs
new file mode 100644
index 0000000..e784941
--- /dev/null
+++ b/Histacom2.Engine/TaskBarController.cs
@@ -0,0 +1,60 @@
+using System.Collections.Generic;
+using System.Windows.Forms;
+using System.Drawing;
+
+namespace Histacom2.Engine
+{
+ public class TaskBarController
+ {
+
+ public static int AvalibleApplicationID = 0;
+
+ public Panel AddTaskbarItem95(string ApplicationID, string ApplicationName, Image ApplicationIcon, UserControl taskbar_item, Panel oldPanel)
+ {
+ Panel returnPanel = oldPanel;
+
+ AvalibleApplicationID++;
+
+ taskbar_item.BackgroundImage = ApplicationIcon;
+ taskbar_item.Tag = ApplicationName;
+ if (AvalibleApplicationID == 1) taskbar_item.Dock = DockStyle.Left;
+ taskbar_item.Location = new Point(160 * returnPanel.Controls.Count, 0);
+ returnPanel.Controls.Add(taskbar_item);
+
+ return returnPanel;
+ }
+
+ public List<Form> GetAllOpenApps()
+ {
+ List<Form> AppsList = new List<Form>();
+ foreach (Form form in Application.OpenForms)
+ {
+ try
+ {
+ if (form.Tag.ToString() != "ignoreFormOnTaskbar")
+ {
+ AppsList.Add(form);
+ }
+ } catch {
+ AppsList.Add(form);
+ }
+ }
+ return AppsList;
+ }
+
+ public void FocusAppFromID(string ApplicationID)
+ {
+
+ foreach (Form form in Application.OpenForms)
+ {
+ if (form.Tag.ToString() == ApplicationID)
+ {
+ form.Show();
+ form.BringToFront();
+ form.Focus();
+ return;
+ }
+ }
+ }
+ }
+}
diff --git a/Histacom2.Engine/Template/AboutBox95.Designer.cs b/Histacom2.Engine/Template/AboutBox95.Designer.cs
new file mode 100644
index 0000000..359ef3f
--- /dev/null
+++ b/Histacom2.Engine/Template/AboutBox95.Designer.cs
@@ -0,0 +1,144 @@
+namespace Histacom2.Engine.Template
+{
+ partial class AboutBox95
+ {
+ /// <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.pictureBox1 = new System.Windows.Forms.PictureBox();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.button1 = new System.Windows.Forms.Button();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.pictureBox2 = new System.Windows.Forms.PictureBox();
+ this.textBox3 = new System.Windows.Forms.Label();
+ this.textBox4 = new System.Windows.Forms.Label();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
+ this.SuspendLayout();
+ //
+ // pictureBox1
+ //
+ this.pictureBox1.Location = new System.Drawing.Point(7, 7);
+ this.pictureBox1.Name = "pictureBox1";
+ this.pictureBox1.Size = new System.Drawing.Size(64, 64);
+ this.pictureBox1.TabIndex = 5;
+ this.pictureBox1.TabStop = false;
+ //
+ // textBox1
+ //
+ this.textBox1.BackColor = System.Drawing.Color.Silver;
+ this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.textBox1.Location = new System.Drawing.Point(78, 16);
+ this.textBox1.Multiline = true;
+ this.textBox1.Name = "textBox1";
+ this.textBox1.ReadOnly = true;
+ this.textBox1.Size = new System.Drawing.Size(193, 42);
+ this.textBox1.TabIndex = 4;
+ this.textBox1.Text = "@SOFTWARENAME\r\nWindows 95\r\nCopyright © 1981-1995 Microsoft Corp.";
+ //
+ // button1
+ //
+ this.button1.FlatAppearance.BorderColor = System.Drawing.Color.Silver;
+ this.button1.Location = new System.Drawing.Point(251, 223);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(75, 23);
+ this.button1.TabIndex = 0;
+ this.button1.Text = "OK";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // textBox2
+ //
+ this.textBox2.BackColor = System.Drawing.Color.Silver;
+ this.textBox2.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.textBox2.Location = new System.Drawing.Point(78, 106);
+ this.textBox2.Multiline = true;
+ this.textBox2.Name = "textBox2";
+ this.textBox2.ReadOnly = true;
+ this.textBox2.Size = new System.Drawing.Size(185, 42);
+ this.textBox2.TabIndex = 3;
+ this.textBox2.Text = "This product is licensed to:\r\n@ACTUALUSER\r\n@COMPANYNAME";
+ //
+ // pictureBox2
+ //
+ this.pictureBox2.Image = global::Histacom2.Engine.Properties.Resources.WinAboutSeparator95;
+ this.pictureBox2.Location = new System.Drawing.Point(76, 154);
+ this.pictureBox2.Name = "pictureBox2";
+ this.pictureBox2.Size = new System.Drawing.Size(250, 2);
+ this.pictureBox2.TabIndex = 2;
+ this.pictureBox2.TabStop = false;
+ //
+ // textBox3
+ //
+ this.textBox3.BackColor = System.Drawing.Color.Silver;
+ this.textBox3.Location = new System.Drawing.Point(76, 162);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Size = new System.Drawing.Size(250, 16);
+ this.textBox3.TabIndex = 1;
+ this.textBox3.Text = "Physical Memory Available to Windows: 64,992 KB";
+ //
+ // textBox4
+ //
+ this.textBox4.BackColor = System.Drawing.Color.Silver;
+ this.textBox4.Location = new System.Drawing.Point(76, 184);
+ this.textBox4.Name = "textBox4";
+ this.textBox4.Size = new System.Drawing.Size(250, 16);
+ this.textBox4.TabIndex = 0;
+ this.textBox4.Text = "System Resources: 97% Free";
+ //
+ // AboutBox95
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.Color.Silver;
+ this.Controls.Add(this.textBox4);
+ this.Controls.Add(this.textBox3);
+ this.Controls.Add(this.pictureBox2);
+ this.Controls.Add(this.textBox2);
+ this.Controls.Add(this.button1);
+ this.Controls.Add(this.textBox1);
+ this.Controls.Add(this.pictureBox1);
+ this.Name = "AboutBox95";
+ this.Size = new System.Drawing.Size(335, 255);
+ this.Tag = "gnoreFormOnTaskbar";
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ internal System.Windows.Forms.PictureBox pictureBox1;
+ internal System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.Button button1;
+ internal System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.PictureBox pictureBox2;
+ private System.Windows.Forms.Label textBox3;
+ private System.Windows.Forms.Label textBox4;
+ }
+}
diff --git a/Histacom2.Engine/Template/AboutBox95.cs b/Histacom2.Engine/Template/AboutBox95.cs
new file mode 100644
index 0000000..1accc56
--- /dev/null
+++ b/Histacom2.Engine/Template/AboutBox95.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Windows.Forms;
+
+namespace Histacom2.Engine.Template
+{
+ public partial class AboutBox95 : UserControl
+ {
+ public AboutBox95()
+ {
+ InitializeComponent();
+ this.textBox2.Text = "This product is licensed to:\r\n" + Environment.UserName + "\r\n";
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ this.ParentForm.Close();
+ }
+ }
+}
diff --git a/Histacom2.Engine/Template/AboutBox95.resx b/Histacom2.Engine/Template/AboutBox95.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/Histacom2.Engine/Template/AboutBox95.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/Infobox95.Designer.cs b/Histacom2.Engine/Template/Infobox95.Designer.cs
new file mode 100644
index 0000000..0bccf85
--- /dev/null
+++ b/Histacom2.Engine/Template/Infobox95.Designer.cs
@@ -0,0 +1,152 @@
+namespace Histacom2.Engine.Template
+{
+ partial class Infobox95
+ {
+ /// <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.programContent = new System.Windows.Forms.Panel();
+ this.button1 = new System.Windows.Forms.Button();
+ this.button3 = new System.Windows.Forms.Button();
+ this.pictureBox1 = new System.Windows.Forms.PictureBox();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.infoText = new System.Windows.Forms.Label();
+ this.button2 = new System.Windows.Forms.Button();
+ this.programContent.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+ this.panel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // programContent
+ //
+ this.programContent.BackColor = System.Drawing.Color.Silver;
+ this.programContent.Controls.Add(this.button1);
+ this.programContent.Controls.Add(this.button3);
+ this.programContent.Controls.Add(this.pictureBox1);
+ this.programContent.Controls.Add(this.panel1);
+ this.programContent.Controls.Add(this.button2);
+ this.programContent.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.programContent.Location = new System.Drawing.Point(0, 0);
+ this.programContent.Name = "programContent";
+ this.programContent.Size = new System.Drawing.Size(413, 118);
+ this.programContent.TabIndex = 10;
+ this.programContent.Tag = "gnoreFormOnTaskbar";
+ //
+ // button1
+ //
+ this.button1.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.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.button1.Location = new System.Drawing.Point(150, 84);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(80, 23);
+ this.button1.TabIndex = 5;
+ this.button1.Text = "Yes";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // button3
+ //
+ this.button3.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.button3.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.button3.Location = new System.Drawing.Point(323, 84);
+ this.button3.Name = "button3";
+ this.button3.Size = new System.Drawing.Size(80, 23);
+ this.button3.TabIndex = 4;
+ this.button3.Text = "Cancel";
+ this.button3.UseVisualStyleBackColor = true;
+ this.button3.Click += new System.EventHandler(this.button3_Click);
+ //
+ // pictureBox1
+ //
+ this.pictureBox1.ErrorImage = null;
+ this.pictureBox1.Image = global::Histacom2.Engine.Properties.Resources.Win95Warning;
+ this.pictureBox1.InitialImage = null;
+ this.pictureBox1.Location = new System.Drawing.Point(15, 16);
+ this.pictureBox1.Name = "pictureBox1";
+ this.pictureBox1.Size = new System.Drawing.Size(32, 32);
+ this.pictureBox1.TabIndex = 3;
+ this.pictureBox1.TabStop = false;
+ //
+ // panel1
+ //
+ this.panel1.Controls.Add(this.infoText);
+ this.panel1.Location = new System.Drawing.Point(62, 16);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(341, 62);
+ this.panel1.TabIndex = 2;
+ //
+ // infoText
+ //
+ this.infoText.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.infoText.Location = new System.Drawing.Point(0, 0);
+ this.infoText.Name = "infoText";
+ this.infoText.Size = new System.Drawing.Size(341, 62);
+ this.infoText.TabIndex = 0;
+ this.infoText.Text = "label1";
+ //
+ // button2
+ //
+ this.button2.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.button2.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.button2.Location = new System.Drawing.Point(236, 84);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(80, 23);
+ this.button2.TabIndex = 1;
+ this.button2.Text = "No";
+ this.button2.UseVisualStyleBackColor = true;
+ this.button2.Click += new System.EventHandler(this.button2_Click);
+ //
+ // Infobox95
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.programContent);
+ this.Name = "Infobox95";
+ this.Size = new System.Drawing.Size(413, 118);
+ this.programContent.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+ this.panel1.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ public System.Windows.Forms.Panel programContent;
+ private System.Windows.Forms.PictureBox pictureBox1;
+ private System.Windows.Forms.Panel panel1;
+ public System.Windows.Forms.Label infoText;
+ private System.Windows.Forms.Button button2;
+ private System.Windows.Forms.Button button3;
+ private System.Windows.Forms.Button button1;
+ }
+} \ No newline at end of file
diff --git a/Histacom2.Engine/Template/Infobox95.cs b/Histacom2.Engine/Template/Infobox95.cs
new file mode 100644
index 0000000..f0ed0db
--- /dev/null
+++ b/Histacom2.Engine/Template/Infobox95.cs
@@ -0,0 +1,87 @@
+using System;
+using System.Drawing;
+using System.Media;
+using System.Runtime.InteropServices;
+using System.Windows.Forms;
+
+namespace Histacom2.Engine.Template
+{
+ public partial class Infobox95 : UserControl
+ {
+ int btnStatus = 0;
+
+ public Infobox95(InfoboxType type, InfoboxButtons btns)
+ {
+ InitializeComponent();
+ button1.Paint += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);
+ button2.Paint += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);
+ button3.Paint += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);
+
+ switch (type)
+ {
+ case InfoboxType.Info:
+ pictureBox1.Image = Properties.Resources.Win95Info;
+ SoundPlayer spa = new SoundPlayer(SaveSystem.currentTheme.asteriskSound);
+ spa.Play();
+ break;
+ case InfoboxType.Question:
+ pictureBox1.Image = Properties.Resources.Win95Question;
+ SoundPlayer spq = new SoundPlayer(SaveSystem.currentTheme.questionSound);
+ spq.Play();
+ break;
+ case InfoboxType.Warning:
+ pictureBox1.Image = Properties.Resources.Win95Warning;
+ SoundPlayer spw = new SoundPlayer(SaveSystem.currentTheme.exclamationSound);
+ spw.Play();
+ break;
+ case InfoboxType.Error:
+ pictureBox1.Image = Properties.Resources.Win95Error;
+ SoundPlayer spe = new SoundPlayer(SaveSystem.currentTheme.critStopSound);
+ spe.Play();
+ break;
+ }
+
+ btnStatus = (int)btns;
+ switch (btns)
+ {
+ case InfoboxButtons.OK:
+ button1.Text = "OK";
+ button2.Hide();
+ button3.Hide();
+ break;
+ }
+ }
+
+ private void button2_Click(object sender, EventArgs e)
+ {
+ this.ParentForm.Close();
+ }
+
+ private void button3_Click(object sender, EventArgs e)
+ {
+
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ if (btnStatus == 0) this.ParentForm.Close();
+ }
+ }
+
+ public enum InfoboxType
+ {
+ Info,
+ Question,
+ Warning,
+ Error
+ }
+
+ public enum InfoboxButtons
+ {
+ OK,
+ OKCancel,
+ YesNo,
+ YesNoCancel,
+ AbortRetryFail
+ }
+}
diff --git a/Histacom2.Engine/Template/Infobox95.resx b/Histacom2.Engine/Template/Infobox95.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/Histacom2.Engine/Template/Infobox95.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/Win9XBSOD.Designer.cs b/Histacom2.Engine/Template/Win9XBSOD.Designer.cs
new file mode 100644
index 0000000..bbd37c2
--- /dev/null
+++ b/Histacom2.Engine/Template/Win9XBSOD.Designer.cs
@@ -0,0 +1,141 @@
+namespace Histacom2.Engine.Template
+{
+ partial class Win9XBSOD
+ {
+ /// <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.label1 = new System.Windows.Forms.Label();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.panel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // label1
+ //
+ this.label1.Anchor = System.Windows.Forms.AnchorStyles.None;
+ this.label1.AutoSize = true;
+ this.label1.BackColor = System.Drawing.Color.Silver;
+ this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label1.ForeColor = System.Drawing.Color.Blue;
+ this.label1.Location = new System.Drawing.Point(549, 185);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(138, 31);
+ this.label1.TabIndex = 0;
+ this.label1.Text = " Windows ";
+ //
+ // textBox1
+ //
+ this.textBox1.Anchor = System.Windows.Forms.AnchorStyles.None;
+ this.textBox1.BackColor = System.Drawing.Color.Blue;
+ this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.textBox1.ForeColor = System.Drawing.Color.White;
+ this.textBox1.Location = new System.Drawing.Point(186, 272);
+ this.textBox1.Multiline = true;
+ this.textBox1.Name = "textBox1";
+ this.textBox1.ReadOnly = true;
+ this.textBox1.Size = new System.Drawing.Size(947, 81);
+ this.textBox1.TabIndex = 0;
+ this.textBox1.TabStop = false;
+ this.textBox1.Text = "A fatal exception 0E has occured at 0028:C0034B23. The current application will " +
+ "be terminated.";
+ //
+ // textBox2
+ //
+ this.textBox2.Anchor = System.Windows.Forms.AnchorStyles.None;
+ this.textBox2.BackColor = System.Drawing.Color.Blue;
+ this.textBox2.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.textBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.textBox2.ForeColor = System.Drawing.Color.White;
+ this.textBox2.Location = new System.Drawing.Point(205, 377);
+ this.textBox2.Multiline = true;
+ this.textBox2.Name = "textBox2";
+ this.textBox2.ReadOnly = true;
+ this.textBox2.Size = new System.Drawing.Size(947, 101);
+ this.textBox2.TabIndex = 1;
+ this.textBox2.TabStop = false;
+ this.textBox2.Text = "* Press any key to rewind time to before the crash.\r\n* Press ESC to shutdown yo" +
+ "ur computer. You will lose any\r\n unsaved data in all applications.";
+ //
+ // textBox3
+ //
+ this.textBox3.Anchor = System.Windows.Forms.AnchorStyles.None;
+ this.textBox3.BackColor = System.Drawing.Color.Blue;
+ this.textBox3.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.textBox3.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.textBox3.ForeColor = System.Drawing.Color.White;
+ this.textBox3.Location = new System.Drawing.Point(439, 506);
+ this.textBox3.Multiline = true;
+ this.textBox3.Name = "textBox3";
+ this.textBox3.ReadOnly = true;
+ this.textBox3.Size = new System.Drawing.Size(382, 34);
+ this.textBox3.TabIndex = 2;
+ this.textBox3.TabStop = false;
+ this.textBox3.Text = "Press any key to rewind _";
+ //
+ // panel1
+ //
+ this.panel1.Controls.Add(this.label1);
+ this.panel1.Controls.Add(this.textBox3);
+ this.panel1.Controls.Add(this.textBox1);
+ this.panel1.Controls.Add(this.textBox2);
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(0, 0);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(1280, 720);
+ this.panel1.TabIndex = 3;
+ //
+ // Win9XBSOD
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.Color.Blue;
+ this.ClientSize = new System.Drawing.Size(1280, 720);
+ this.Controls.Add(this.panel1);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+ this.Name = "Win9XBSOD";
+ this.Tag = "ignoreFormOnTaskbar";
+ this.Text = "Win9XBSOD";
+ this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Win9XBSOD_FormClosed);
+ this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Win9XBSOD_KeyDown);
+ this.panel1.ResumeLayout(false);
+ this.panel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ internal System.Windows.Forms.Label label1;
+ internal System.Windows.Forms.TextBox textBox1;
+ internal System.Windows.Forms.TextBox textBox2;
+ internal System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Panel panel1;
+ }
+} \ No newline at end of file
diff --git a/Histacom2.Engine/Template/Win9XBSOD.cs b/Histacom2.Engine/Template/Win9XBSOD.cs
new file mode 100644
index 0000000..dd3d2ca
--- /dev/null
+++ b/Histacom2.Engine/Template/Win9XBSOD.cs
@@ -0,0 +1,38 @@
+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 Win9XBSOD : Form
+ {
+ public bool reset = false;
+
+ public Win9XBSOD()
+ {
+ InitializeComponent();
+ this.panel1.Location = new Point(this.ClientSize.Width / 2 - 475, this.ClientSize.Height / 2 - 141);
+ }
+
+ private void Win9XBSOD_KeyDown(object sender, KeyEventArgs e)
+ {
+ if (e.KeyCode == Keys.Escape) Environment.Exit(0);
+ else
+ {
+ reset = true;
+ this.Close();
+ }
+ }
+
+ private void Win9XBSOD_FormClosed(object sender, FormClosedEventArgs e)
+ {
+
+ }
+ }
+}
diff --git a/Histacom2.Engine/Template/Win9XBSOD.resx b/Histacom2.Engine/Template/Win9XBSOD.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/Histacom2.Engine/Template/Win9XBSOD.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
new file mode 100644
index 0000000..be76be6
--- /dev/null
+++ b/Histacom2.Engine/Template/WinClassic.Designer.cs
@@ -0,0 +1,292 @@
+namespace Histacom2.Engine.Template
+{
+ partial class WinClassic
+ {
+ /// <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()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WinClassic));
+ this.program = new System.Windows.Forms.Panel();
+ this.programContent = new System.Windows.Forms.Panel();
+ this.programtopbar = new System.Windows.Forms.Panel();
+ this.programIcon = new System.Windows.Forms.PictureBox();
+ this.maximizebutton = new System.Windows.Forms.PictureBox();
+ this.minimizebutton = new System.Windows.Forms.PictureBox();
+ this.Title = new System.Windows.Forms.Label();
+ this.closebutton = new System.Windows.Forms.PictureBox();
+ 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.left = new System.Windows.Forms.Panel();
+ this.bottom = new System.Windows.Forms.Panel();
+ this.right = new System.Windows.Forms.Panel();
+ this.top = new System.Windows.Forms.Panel();
+ this.program.SuspendLayout();
+ this.programtopbar.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.programIcon)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.maximizebutton)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.minimizebutton)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.closebutton)).BeginInit();
+ this.SuspendLayout();
+ //
+ // program
+ //
+ this.program.BackColor = System.Drawing.Color.Silver;
+ this.program.Controls.Add(this.programContent);
+ this.program.Controls.Add(this.programtopbar);
+ 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.left);
+ this.program.Controls.Add(this.bottom);
+ this.program.Controls.Add(this.right);
+ this.program.Controls.Add(this.top);
+ this.program.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.program.Location = new System.Drawing.Point(0, 0);
+ this.program.Name = "program";
+ this.program.Size = new System.Drawing.Size(300, 300);
+ this.program.TabIndex = 8;
+ //
+ // programContent
+ //
+ this.programContent.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.programContent.Location = new System.Drawing.Point(4, 22);
+ this.programContent.Name = "programContent";
+ this.programContent.Size = new System.Drawing.Size(292, 274);
+ this.programContent.TabIndex = 9;
+ //
+ // programtopbar
+ //
+ this.programtopbar.BackColor = System.Drawing.Color.Navy;
+ this.programtopbar.Controls.Add(this.programIcon);
+ this.programtopbar.Controls.Add(this.maximizebutton);
+ this.programtopbar.Controls.Add(this.minimizebutton);
+ this.programtopbar.Controls.Add(this.Title);
+ this.programtopbar.Controls.Add(this.closebutton);
+ this.programtopbar.Dock = System.Windows.Forms.DockStyle.Top;
+ this.programtopbar.Location = new System.Drawing.Point(4, 4);
+ this.programtopbar.Name = "programtopbar";
+ this.programtopbar.Size = new System.Drawing.Size(292, 18);
+ this.programtopbar.TabIndex = 0;
+ this.programtopbar.Tag = "";
+ this.programtopbar.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Programtopbar_drag);
+ //
+ // programIcon
+ //
+ this.programIcon.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.programIcon.ErrorImage = null;
+ this.programIcon.InitialImage = null;
+ this.programIcon.Location = new System.Drawing.Point(2, 1);
+ this.programIcon.Name = "programIcon";
+ this.programIcon.Size = new System.Drawing.Size(16, 16);
+ this.programIcon.TabIndex = 0;
+ this.programIcon.TabStop = false;
+ //
+ // maximizebutton
+ //
+ this.maximizebutton.Anchor = System.Windows.Forms.AnchorStyles.Right;
+ this.maximizebutton.Image = ((System.Drawing.Image)(resources.GetObject("maximizebutton.Image")));
+ this.maximizebutton.Location = new System.Drawing.Point(257, 2);
+ this.maximizebutton.Name = "maximizebutton";
+ this.maximizebutton.Size = new System.Drawing.Size(16, 14);
+ this.maximizebutton.TabIndex = 6;
+ this.maximizebutton.TabStop = false;
+ this.maximizebutton.Click += new System.EventHandler(this.maximizebutton_Click);
+ //
+ // minimizebutton
+ //
+ this.minimizebutton.Anchor = System.Windows.Forms.AnchorStyles.Right;
+ this.minimizebutton.Image = ((System.Drawing.Image)(resources.GetObject("minimizebutton.Image")));
+ this.minimizebutton.Location = new System.Drawing.Point(241, 2);
+ this.minimizebutton.Name = "minimizebutton";
+ this.minimizebutton.Size = new System.Drawing.Size(16, 14);
+ this.minimizebutton.TabIndex = 5;
+ this.minimizebutton.TabStop = false;
+ //
+ // Title
+ //
+ this.Title.AutoSize = true;
+ this.Title.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Title.ForeColor = System.Drawing.Color.White;
+ this.Title.Location = new System.Drawing.Point(18, 1);
+ this.Title.Name = "Title";
+ this.Title.Size = new System.Drawing.Size(99, 13);
+ this.Title.TabIndex = 3;
+ this.Title.Text = "Application Title";
+ this.Title.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Programtopbar_drag);
+ //
+ // closebutton
+ //
+ this.closebutton.Anchor = System.Windows.Forms.AnchorStyles.Right;
+ this.closebutton.Image = ((System.Drawing.Image)(resources.GetObject("closebutton.Image")));
+ this.closebutton.Location = new System.Drawing.Point(275, 2);
+ this.closebutton.Name = "closebutton";
+ this.closebutton.Size = new System.Drawing.Size(16, 14);
+ this.closebutton.TabIndex = 4;
+ this.closebutton.TabStop = false;
+ this.closebutton.Click += new System.EventHandler(this.closebutton_Click);
+ //
+ // toprightcorner
+ //
+ this.toprightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.toprightcorner.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("toprightcorner.BackgroundImage")));
+ this.toprightcorner.Cursor = System.Windows.Forms.Cursors.SizeNESW;
+ this.toprightcorner.Location = new System.Drawing.Point(296, 0);
+ this.toprightcorner.Name = "toprightcorner";
+ this.toprightcorner.Size = new System.Drawing.Size(4, 4);
+ this.toprightcorner.TabIndex = 6;
+ this.toprightcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
+ this.toprightcorner.MouseMove += new System.Windows.Forms.MouseEventHandler(this.toprightcorner_MouseMove);
+ //
+ // bottomrightcorner
+ //
+ this.bottomrightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.bottomrightcorner.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("bottomrightcorner.BackgroundImage")));
+ this.bottomrightcorner.Cursor = System.Windows.Forms.Cursors.SizeNWSE;
+ this.bottomrightcorner.Location = new System.Drawing.Point(296, 296);
+ this.bottomrightcorner.Name = "bottomrightcorner";
+ this.bottomrightcorner.Size = new System.Drawing.Size(4, 4);
+ this.bottomrightcorner.TabIndex = 4;
+ this.bottomrightcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
+ this.bottomrightcorner.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bottomrightcorner_MouseMove);
+ //
+ // bottomleftcorner
+ //
+ this.bottomleftcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+ this.bottomleftcorner.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("bottomleftcorner.BackgroundImage")));
+ this.bottomleftcorner.Cursor = System.Windows.Forms.Cursors.SizeNESW;
+ this.bottomleftcorner.Location = new System.Drawing.Point(0, 296);
+ this.bottomleftcorner.Name = "bottomleftcorner";
+ this.bottomleftcorner.Size = new System.Drawing.Size(4, 4);
+ this.bottomleftcorner.TabIndex = 2;
+ this.bottomleftcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
+ this.bottomleftcorner.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bottomleftcorner_MouseMove);
+ //
+ // topleftcorner
+ //
+ this.topleftcorner.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("topleftcorner.BackgroundImage")));
+ this.topleftcorner.Cursor = System.Windows.Forms.Cursors.SizeNWSE;
+ this.topleftcorner.Location = new System.Drawing.Point(0, 0);
+ this.topleftcorner.Name = "topleftcorner";
+ this.topleftcorner.Size = new System.Drawing.Size(4, 4);
+ this.topleftcorner.TabIndex = 1;
+ this.topleftcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
+ this.topleftcorner.MouseMove += new System.Windows.Forms.MouseEventHandler(this.topleftcorner_MouseMove);
+ //
+ // left
+ //
+ this.left.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("left.BackgroundImage")));
+ this.left.Cursor = System.Windows.Forms.Cursors.SizeWE;
+ this.left.Dock = System.Windows.Forms.DockStyle.Left;
+ this.left.Location = new System.Drawing.Point(0, 4);
+ this.left.Name = "left";
+ this.left.Size = new System.Drawing.Size(4, 292);
+ this.left.TabIndex = 3;
+ this.left.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
+ this.left.MouseMove += new System.Windows.Forms.MouseEventHandler(this.left_MouseMove);
+ //
+ // bottom
+ //
+ this.bottom.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("bottom.BackgroundImage")));
+ this.bottom.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.bottom.Cursor = System.Windows.Forms.Cursors.SizeNS;
+ this.bottom.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.bottom.Location = new System.Drawing.Point(0, 296);
+ this.bottom.Name = "bottom";
+ this.bottom.Size = new System.Drawing.Size(296, 4);
+ this.bottom.TabIndex = 5;
+ this.bottom.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
+ this.bottom.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bottom_MouseMove);
+ //
+ // right
+ //
+ this.right.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("right.BackgroundImage")));
+ this.right.Cursor = System.Windows.Forms.Cursors.SizeWE;
+ this.right.Dock = System.Windows.Forms.DockStyle.Right;
+ this.right.Location = new System.Drawing.Point(296, 4);
+ this.right.Name = "right";
+ this.right.Size = new System.Drawing.Size(4, 296);
+ this.right.TabIndex = 7;
+ this.right.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
+ this.right.MouseMove += new System.Windows.Forms.MouseEventHandler(this.right_MouseMove);
+ //
+ // top
+ //
+ this.top.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("top.BackgroundImage")));
+ this.top.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.top.Cursor = System.Windows.Forms.Cursors.SizeNS;
+ this.top.Dock = System.Windows.Forms.DockStyle.Top;
+ this.top.Location = new System.Drawing.Point(0, 0);
+ this.top.Name = "top";
+ this.top.Size = new System.Drawing.Size(300, 4);
+ this.top.TabIndex = 8;
+ this.top.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
+ this.top.MouseMove += new System.Windows.Forms.MouseEventHandler(this.top_MouseMove);
+ //
+ // WinClassic
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(300, 300);
+ this.Controls.Add(this.program);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+ this.Name = "WinClassic";
+ this.Text = "WinClassic";
+ this.Activated += new System.EventHandler(this.WinClassic_Activated);
+ this.Deactivate += new System.EventHandler(this.WinClassic_Deactivate);
+ this.program.ResumeLayout(false);
+ this.programtopbar.ResumeLayout(false);
+ this.programtopbar.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.programIcon)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.maximizebutton)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.minimizebutton)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.closebutton)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ public System.Windows.Forms.Panel program;
+ public System.Windows.Forms.Panel programtopbar;
+ public System.Windows.Forms.Label Title;
+ public System.Windows.Forms.PictureBox closebutton;
+ public System.Windows.Forms.Panel toprightcorner;
+ public System.Windows.Forms.Panel bottomrightcorner;
+ public System.Windows.Forms.Panel bottomleftcorner;
+ public System.Windows.Forms.Panel topleftcorner;
+ public System.Windows.Forms.Panel left;
+ public System.Windows.Forms.Panel bottom;
+ public System.Windows.Forms.Panel right;
+ public System.Windows.Forms.Panel top;
+ public System.Windows.Forms.Panel programContent;
+ public System.Windows.Forms.PictureBox maximizebutton;
+ public System.Windows.Forms.PictureBox minimizebutton;
+ public System.Windows.Forms.PictureBox programIcon;
+ }
+} \ No newline at end of file
diff --git a/Histacom2.Engine/Template/WinClassic.cs b/Histacom2.Engine/Template/WinClassic.cs
new file mode 100644
index 0000000..4c495bc
--- /dev/null
+++ b/Histacom2.Engine/Template/WinClassic.cs
@@ -0,0 +1,235 @@
+using System;
+using System.Drawing;
+using System.Runtime.InteropServices;
+using System.Windows.Forms;
+
+namespace Histacom2.Engine.Template
+{
+ public partial class WinClassic : Form
+ {
+ public WinClassic()
+ {
+ InitializeComponent();
+ DoubleBuffered = true;
+ }
+
+ public Font fnt;
+
+ public bool resizable = true;
+ public bool closeDisabled = false;
+ public bool isActive = true;
+
+ public const int WM_NCLBUTTONDOWN = 0xA1;
+ public const int WM_SYSCOMMAND = 0x0112;
+ public const int HT_CAPTION = 0x2;
+
+ private const int
+ HTLEFT = 10,
+ HTRIGHT = 11,
+ HTTOP = 12,
+ HTTOPLEFT = 13,
+ HTTOPRIGHT = 14,
+ HTBOTTOM = 15,
+ HTBOTTOMLEFT = 16,
+ HTBOTTOMRIGHT = 17;
+
+ [DllImportAttribute("user32.dll")]
+ public static extern int SendMessage(IntPtr hWnd,
+ int Msg, int wParam, int lParam);
+ [DllImportAttribute("user32.dll")]
+ public static extern bool ReleaseCapture();
+
+ private void Programtopbar_drag(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Left && max == false)
+ {
+ ReleaseCapture();
+ SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
+ }
+ }
+
+ private void closebutton_Click(object sender, EventArgs e)
+ {
+ if (!closeDisabled) this.Close();
+ }
+
+ private void WinClassic_Activated(object sender, EventArgs e)
+ {
+ isActive = true;
+ programtopbar.BackColor = SaveSystem.currentTheme.activeTitleBarColor;
+ Title.ForeColor = SaveSystem.currentTheme.activeTitleTextColor;
+ }
+
+ private void WinClassic_Deactivate(object sender, EventArgs e)
+ {
+ isActive = false;
+ programtopbar.BackColor = SaveSystem.currentTheme.inactiveTitleBarColor;
+ Title.ForeColor = SaveSystem.currentTheme.inactiveTitleTextColor;
+ }
+
+
+ private void right_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ if (resizable) this.Size = new Size(MousePosition.X - this.Location.X, this.Size.Height);
+ }
+ }
+
+ private void left_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ if (resizable) this.Width = ((this.Width + this.Location.X) - Cursor.Position.X);
+ if (resizable)this.Location = new Point(Cursor.Position.X, this.Location.Y);
+ }
+ }
+
+ private void bottom_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ if (resizable) this.Size = new Size(this.Size.Width, MousePosition.Y - this.Location.Y);
+ }
+ }
+
+ private void bottomrightcorner_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ if (resizable) this.Size = new Size(MousePosition.X - this.Location.X, MousePosition.Y - this.Location.Y);
+ }
+ }
+
+ private void bottomleftcorner_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ if (resizable) this.Width = ((this.Width + this.Location.X) - Cursor.Position.X);
+ if (resizable) this.Height = (Cursor.Position.Y - this.Location.Y);
+ if (resizable) this.Location = new Point(Cursor.Position.X, this.Location.Y);
+ }
+ }
+
+ private void topleftcorner_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ if (resizable) this.Width = ((this.Width + this.Location.X) - Cursor.Position.X);
+ if (resizable) this.Location = new Point(Cursor.Position.X, this.Location.Y);
+ if (resizable) this.Height = ((this.Height + this.Location.Y) - Cursor.Position.Y);
+ if (resizable) this.Location = new Point(this.Location.X, Cursor.Position.Y);
+ }
+ }
+
+ private void top_MouseMove(object sender, MouseEventArgs e)
+ {
+ if(e.Button == MouseButtons.Left)
+ {
+ if(resizable) this.Height = ((this.Height + this.Location.Y) - Cursor.Position.Y);
+ if(resizable) this.Location = new Point(this.Location.X, Cursor.Position.Y);
+ }
+ }
+
+ private void toprightcorner_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ if (resizable) this.Width = (Cursor.Position.X - this.Location.X);
+ if (resizable) this.Height = ((this.Location.Y - Cursor.Position.Y) + this.Height);
+ if (resizable) this.Location = new Point(this.Location.X, Cursor.Position.Y);
+ }
+ }
+
+ public bool max = false;
+
+ private void maximizebutton_Click(object sender, EventArgs e)
+ {
+ if (max == false)
+ {
+ this.right.Hide();
+ this.left.Hide();
+ this.bottom.Hide();
+ this.top.Hide();
+ this.bottomleftcorner.Hide();
+ this.bottomrightcorner.Hide();
+ this.topleftcorner.Hide();
+ this.toprightcorner.Hide();
+ this.Dock = DockStyle.Fill;
+ this.WindowState = FormWindowState.Maximized;
+ max = true;
+ maximizebutton.Image = Engine.Properties.Resources.WinClassicRestore;
+ }
+ else
+ {
+ this.right.Show();
+ this.left.Show();
+ this.bottom.Show();
+ this.top.Show();
+ this.bottomleftcorner.Show();
+ this.bottomrightcorner.Show();
+ this.topleftcorner.Show();
+ this.toprightcorner.Show();
+ this.Dock = DockStyle.None;
+ this.WindowState = FormWindowState.Normal;
+ max = false;
+ maximizebutton.Image = Engine.Properties.Resources.WinClassicMax;
+ }
+
+ }
+
+ // The rest of this code will automatically style the buttons on the form!
+
+ protected override void OnControlAdded(ControlEventArgs e)
+ {
+ base.OnControlAdded(e);
+
+ if (e.Control.GetType() == typeof(Button))
+ {
+ e.Control.MouseEnter += button_MouseEnter;
+ e.Control.MouseLeave += button_MouseLeave;
+
+ ((Button)e.Control).FlatStyle = FlatStyle.Popup;
+ }
+ }
+
+ protected override void OnControlRemoved(ControlEventArgs e)
+ {
+ base.OnControlRemoved(e);
+
+ if (e.Control.GetType() == typeof(Button))
+ {
+ e.Control.MouseEnter -= button_MouseEnter;
+ e.Control.MouseLeave -= button_MouseLeave;
+ }
+ }
+
+ private void button_MouseEnter(object sender, EventArgs e)
+ {
+ var c = (Button)sender;
+ c.UseVisualStyleBackColor = false;
+ c.BackColor = Color.GhostWhite;
+ }
+
+ private void button_MouseLeave(object sender, EventArgs e)
+ {
+ var c = (Button)sender;
+ c.UseVisualStyleBackColor = true;
+ }
+
+ private void border_MouseDown(object sender, EventArgs e)
+ {
+ var cursor = this.PointToClient(Cursor.Position);
+
+ if (topleftcorner.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF004, 0);
+ else if (toprightcorner.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF005, 0);
+ else if (bottomleftcorner.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF007, 0);
+ else if (bottomrightcorner.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF008, 0);
+
+ else if (top.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF003, 0);
+ else if (left.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF001, 0);
+ else if (right.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF002, 0);
+ else if (bottom.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF006, 0);
+ }
+ }
+}
diff --git a/Histacom2.Engine/Template/WinClassic.resx b/Histacom2.Engine/Template/WinClassic.resx
new file mode 100644
index 0000000..394031d
--- /dev/null
+++ b/Histacom2.Engine/Template/WinClassic.resx
@@ -0,0 +1,201 @@
+<?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>
+ <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <data name="maximizebutton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAIAAACpTQvdAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAA+SURBVChTY/hP
+ CmAAAiB1nzjQ0NCA0HDgwAEQBwcAygIBNTRAJNDAqAY0DbgAdg0EAUIDkEUkAGkgDTAwAACYPGiagsMD
+ PwAAAABJRU5ErkJggg==
+</value>
+ </data>
+ <data name="minimizebutton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAIAAACpTQvdAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAA5SURBVChTY/hP
+ CmAAAiB1nzjQ0NCA0HCACDCqASqGF2DRAOKjAog4BFBDA36A0ABkEQlAGkgDDAwAKPmlWmNluNoAAAAA
+ SUVORK5CYII=
+</value>
+ </data>
+ <data name="closebutton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAIAAACpTQvdAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAABcSURBVChTrY/R
+ DcAgCERvdEbrJh2lPU+SYkINRt+PSN6J4FkBhMddw8y+wFUgCbQ70OtO7OQTJLgRa/L7JWmOt8RsB8mD
+ TQ5NkFbeQcLwauzMdkjZCLAq0gJrAC8niIXaIK89FAAAAABJRU5ErkJggg==
+</value>
+ </data>
+ <data name="toprightcorner.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAdSURBVBhXYzh8
+ /DQEMQDBfzBo6+oDcSDCGBwGBgAJoRsoKGRD1QAAAABJRU5ErkJggg==
+</value>
+ </data>
+ <data name="bottomrightcorner.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAdSURBVBhXYzh8
+ /DQQtXX1MQABCgdIQRCIgwAMDABm/hFrLt/K7gAAAABJRU5ErkJggg==
+</value>
+ </data>
+ <data name="bottomleftcorner.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAdSURBVBhXYzh8
+ /PT///+BJBBhcNq6+iCIAQEYGACcHRsocGQwIQAAAABJRU5ErkJggg==
+</value>
+ </data>
+ <data name="topleftcorner.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAaSURBVBhXYzh8
+ /DQcgTj/YQDKQZEBcY6fBgAaSCiZEc9BxAAAAABJRU5ErkJggg==
+</value>
+ </data>
+ <data name="left.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAAAQAAAABCAIAAAB2XpiaAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAUSURBVBhXYzh8
+ /PT///+B5OHjpwFB1wn9nx9JYgAAAABJRU5ErkJggg==
+</value>
+ </data>
+ <data name="bottom.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAAAEAAAAECAIAAADAusJtAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAVSURBVBhXYzh8
+ /DQYt3X1MTAwMAAAQaQGSbsObiQAAAAASUVORK5CYII=
+</value>
+ </data>
+ <data name="right.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAAAQAAAABCAIAAAB2XpiaAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAUSURBVBhXYzh8
+ /DQQtXX1MTAwAAA0WgZJrWm8iAAAAABJRU5ErkJggg==
+</value>
+ </data>
+ <data name="top.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAAAEAAAAECAIAAADAusJtAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAVSURBVBhXYzh8
+ /DTD////wfTh46cBUSgJ/bC/izUAAAAASUVORK5CYII=
+</value>
+ </data>
+</root> \ No newline at end of file
diff --git a/Histacom2.Engine/Theme.cs b/Histacom2.Engine/Theme.cs
new file mode 100644
index 0000000..6c1efef
--- /dev/null
+++ b/Histacom2.Engine/Theme.cs
@@ -0,0 +1,114 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Histacom2.Engine
+{
+ public class Theme
+ {
+ public Stream startSound { get; set; }
+ public Stream stopSound { get; set; }
+
+ public Stream asteriskSound { get; set; }
+ public Stream critStopSound { get; set; }
+ public Stream exclamationSound { get; set; }
+ public Stream progErrorSound { get; set; }
+ public Stream questionSound { get; set; }
+
+ public Color activeTitleBarColor { get; set; }
+ public Color activeTitleTextColor { get; set; }
+ public Color inactiveTitleBarColor { get; set; }
+ public Color inactiveTitleTextColor { get; set; }
+
+ public Image defaultWallpaper { get; set; }
+
+ public string themeName { get; set; }
+ }
+
+ public class Default95Theme: Theme
+ {
+ public Default95Theme()
+ {
+ startSound = Properties.Resources.Win95Start;
+ stopSound = Properties.Resources.Win95Stop;
+
+ asteriskSound = Properties.Resources.CHORD;
+ critStopSound = Properties.Resources.CHORD;
+ exclamationSound = Properties.Resources.CHORD;
+ progErrorSound = Properties.Resources.CHORD;
+ questionSound = Properties.Resources.CHORD;
+
+ activeTitleBarColor = Color.Navy;
+ activeTitleTextColor = Color.White;
+ inactiveTitleBarColor = Color.Gray;
+ inactiveTitleTextColor = Color.Silver;
+
+ defaultWallpaper = null;
+ themeName = "default95";
+ }
+ }
+
+ public class Default98Theme : Theme
+ {
+ public Default98Theme()
+ {
+ startSound = Properties.Resources.Win98Start;
+ stopSound = Properties.Resources.Win98Stop;
+
+ asteriskSound = Properties.Resources.CHORD;
+ critStopSound = Properties.Resources.CHORD;
+ exclamationSound = Properties.Resources.CHORD;
+ progErrorSound = Properties.Resources.CHORD;
+ questionSound = Properties.Resources.CHORD;
+
+ defaultWallpaper = null;
+ themeName = "default98";
+ }
+ }
+
+ public class DangerousCreaturesTheme: Theme
+ {
+ public DangerousCreaturesTheme()
+ {
+ startSound = Properties.Resources.Win95PlusDangerousCreaturesStart;
+ stopSound = Properties.Resources.Win95PlusDangerousCreaturesStart;
+
+ asteriskSound = Properties.Resources.Win95PlusDangerousCreaturesAsterisk;
+ critStopSound = Properties.Resources.Win95PlusDangerousCreaturesCritStop;
+ exclamationSound = Properties.Resources.Win95PlusDangerousCreaturesExclamation;
+ progErrorSound = Properties.Resources.Win95PlusDangerousCreaturesProgError;
+ questionSound = Properties.Resources.Win95PlusDangerousCreaturesQuestion;
+
+ activeTitleBarColor = Color.Teal;
+ activeTitleTextColor = Color.White;
+ inactiveTitleBarColor = Color.FromArgb(72, 72, 72);
+ inactiveTitleTextColor = Color.Gray;
+
+ defaultWallpaper = Properties.Resources.Win95PlusDangerousCreaturesWallpaper;
+ themeName = "dangeranimals";
+ }
+ }
+
+ public class InsideComputerTheme: Theme
+ {
+ public InsideComputerTheme()
+ {
+ startSound = Properties.Resources.Win95PlusInsideComputerStart;
+ stopSound = Properties.Resources.Win95PlusInsideComputerStop;
+
+ asteriskSound = Properties.Resources.Win95PlusInsideComputerAsterisk;
+
+ activeTitleBarColor = Color.FromArgb(224, 0, 0);
+ activeTitleTextColor = Color.White;
+ inactiveTitleBarColor = Color.FromArgb(96, 168, 128);
+ inactiveTitleTextColor = Color.FromArgb(216, 224, 216);
+
+ defaultWallpaper = Properties.Resources.Win95PlusInsideComputerWallpaper;
+ themeName = "insidepc";
+ }
+ }
+}
diff --git a/Histacom2.Engine/UI/ClassicButton.Designer.cs b/Histacom2.Engine/UI/ClassicButton.Designer.cs
new file mode 100644
index 0000000..c76bba0
--- /dev/null
+++ b/Histacom2.Engine/UI/ClassicButton.Designer.cs
@@ -0,0 +1,91 @@
+namespace Histacom2.Engine.UI
+{
+ partial class ClassicButton
+ {
+ /// <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.borderpart = new System.Windows.Forms.Panel();
+ this.graystuff = new System.Windows.Forms.Panel();
+ this.lessgraystuff = new System.Windows.Forms.Label();
+ this.borderpart.SuspendLayout();
+ this.graystuff.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // borderpart
+ //
+ this.borderpart.BackColor = System.Drawing.Color.White;
+ this.borderpart.Controls.Add(this.graystuff);
+ this.borderpart.Location = new System.Drawing.Point(0, 0);
+ this.borderpart.Name = "borderpart";
+ this.borderpart.Size = new System.Drawing.Size(99, 24);
+ this.borderpart.TabIndex = 0;
+ //
+ // graystuff
+ //
+ this.graystuff.BackColor = System.Drawing.Color.Gray;
+ this.graystuff.Controls.Add(this.lessgraystuff);
+ this.graystuff.Location = new System.Drawing.Point(1, 1);
+ this.graystuff.Name = "graystuff";
+ this.graystuff.Size = new System.Drawing.Size(98, 23);
+ this.graystuff.TabIndex = 0;
+ //
+ // lessgraystuff
+ //
+ this.lessgraystuff.BackColor = System.Drawing.Color.Silver;
+ this.lessgraystuff.Location = new System.Drawing.Point(0, 0);
+ this.lessgraystuff.Margin = new System.Windows.Forms.Padding(0);
+ this.lessgraystuff.Name = "lessgraystuff";
+ this.lessgraystuff.Size = new System.Drawing.Size(97, 22);
+ this.lessgraystuff.TabIndex = 0;
+ this.lessgraystuff.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ this.lessgraystuff.Paint += new System.Windows.Forms.PaintEventHandler(this.lessgraystuff_Paint);
+ //
+ // ClassicButton
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.Color.Black;
+ this.Controls.Add(this.borderpart);
+ this.Name = "ClassicButton";
+ this.Size = new System.Drawing.Size(100, 25);
+ this.Paint += new System.Windows.Forms.PaintEventHandler(this.ClassicButton_Paint);
+ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ClassicButton_MouseDown);
+ this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.ClassicButton_MouseUp);
+ this.Resize += new System.EventHandler(this.ClassicButton_Resize);
+ this.borderpart.ResumeLayout(false);
+ this.graystuff.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Panel borderpart;
+ private System.Windows.Forms.Panel graystuff;
+ private System.Windows.Forms.Label lessgraystuff;
+ }
+}
diff --git a/Histacom2.Engine/UI/ClassicButton.cs b/Histacom2.Engine/UI/ClassicButton.cs
new file mode 100644
index 0000000..26629a8
--- /dev/null
+++ b/Histacom2.Engine/UI/ClassicButton.cs
@@ -0,0 +1,58 @@
+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.UI
+{
+ public partial class ClassicButton : UserControl
+ {
+ public ClassicButton()
+ {
+ InitializeComponent();
+ }
+
+ private void ClassicButton_SizeChanged(object sender, EventArgs e)
+ {
+
+ }
+
+ private void ClassicButton_MouseDown(object sender, MouseEventArgs e)
+ {
+ this.BackColor = Color.White;
+ borderpart.BackColor = Color.Black;
+ lessgraystuff.Location = new Point(1, 1);
+ }
+
+ private void ClassicButton_Paint(object sender, PaintEventArgs e)
+ {
+ e.Graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit;
+ base.OnPaint(e);
+ }
+
+ private void lessgraystuff_Paint(object sender, PaintEventArgs e)
+ {
+ e.Graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit;
+ base.OnPaint(e);
+ }
+
+ private void ClassicButton_MouseUp(object sender, MouseEventArgs e)
+ {
+ this.BackColor = Color.Black;
+ borderpart.BackColor = Color.White;
+ lessgraystuff.Location = new Point(0, 0);
+ }
+
+ private void ClassicButton_Resize(object sender, EventArgs e)
+ {
+ borderpart.Size = new Size(this.Width - 1, this.Height - 1);
+ graystuff.Size = new Size(this.Width - 2, this.Height - 2);
+ lessgraystuff.Size = new Size(this.Width - 3, this.Height - 3);
+ }
+ }
+} \ No newline at end of file
diff --git a/Histacom2.Engine/UI/ClassicButton.resx b/Histacom2.Engine/UI/ClassicButton.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/Histacom2.Engine/UI/ClassicButton.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/IProgressBar.cs b/Histacom2.Engine/UI/IProgressBar.cs
new file mode 100644
index 0000000..071da18
--- /dev/null
+++ b/Histacom2.Engine/UI/IProgressBar.cs
@@ -0,0 +1,234 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace Histacom2.UI
+{
+ public class ProgressBar : Control
+ {
+ private Color _pColor = Color.DarkBlue;
+ private ProgressBarStyle _style = ProgressBarStyle.Continuous;
+
+ private Timer RedrawTimer = null;
+
+ public Color ProgressColor
+ {
+ get
+ {
+ return _pColor;
+ }
+ set
+ {
+ _pColor = value; Refresh();
+ }
+ }
+
+
+ public ProgressBarStyle Style
+ {
+ get
+ {
+ return _style;
+ }
+ set
+ {
+ _style = value; Refresh();
+ }
+ }
+
+
+ private double _max = 100.0;
+ private double _min = 0.0;
+
+ public double Maximum
+ {
+ get
+ {
+ return _max;
+ }
+ set
+ {
+ _max = value; Refresh();
+ }
+ }
+ public double Minimum
+ {
+ get
+ {
+ return _min;
+ }
+ set
+ {
+ _min = value; Refresh();
+ }
+ }
+
+
+ private int _blockWidth = 14;
+
+ public int BlockWidth
+ {
+ get
+ {
+ return _blockWidth;
+ }
+ set
+ {
+ _blockWidth = value;
+ Refresh();
+ }
+ }
+
+ private int _blockSpacing = 2;
+
+ public int BlockSpacing
+ {
+ get
+ {
+ return _blockSpacing;
+ }
+ set
+ {
+ _blockSpacing = value;
+ Refresh();
+ }
+ }
+
+ public ProgressBar() : base()
+ {
+ MarqueeWidth = 125;
+ BlockWidth = 20;
+ BlockSpacing = 5;
+ Minimum = 0.00;
+ Maximum = 100.0;
+ Style = ProgressBarStyle.Continuous;
+ ProgressColor = Color.DarkBlue;
+ RedrawTimer = new Timer();
+ RedrawTimer.Tick += (o, a) =>
+ {
+ if (this.Style == ProgressBarStyle.Marquee)
+ {
+ if (_marqueePos >= this.Width)
+ _marqueePos = 0;
+ else
+ _marqueePos++;
+ this.Refresh();
+ }
+ };
+ RedrawTimer.Interval = 50;
+ }
+
+ private double _value = 0.00;
+
+ public double Value
+ {
+ get
+ {
+ return _value;
+ }
+ set
+ {
+ if (value < Minimum || value > Maximum)
+ throw new ArgumentOutOfRangeException("The value is outside the minimum and maximum range.");
+ this.Refresh();
+ _value = value;
+ }
+ }
+
+ private int _marqueeWidth = 14;
+
+ public int MarqueeWidth
+ {
+ get
+ {
+ return _marqueeWidth;
+ }
+ set
+ {
+ _marqueeWidth = value;
+ Refresh();
+ }
+ }
+
+ private bool _showText = false;
+
+ public bool ShowText
+ {
+ get
+ {
+ return _showText;
+ }
+ set
+ {
+ _showText = value;
+ Refresh();
+ }
+ }
+
+ protected override void OnVisibleChanged(EventArgs e)
+ {
+ if (Visible)
+ RedrawTimer.Start();
+ else
+ RedrawTimer.Stop();
+ }
+
+ private int _marqueePos = 0;
+
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ base.OnPaint(e);
+ var g = e.Graphics;
+ g.Clear(BackColor);
+ //Stolen from the ShiftOS code :3
+ switch (Style)
+ {
+ case ProgressBarStyle.Continuous:
+ double width = linear(this.Value, this.Minimum, this.Maximum, 0, this.Width);
+ g.FillRectangle(new SolidBrush(ProgressColor), new RectangleF(0, 0, (float)width, this.Height));
+ break;
+ case ProgressBarStyle.Blocks:
+ int block_count = this.Width / (this.BlockWidth + this.BlockSpacing);
+ int blocks = (int)linear(this.Value, this.Minimum, this.Maximum, 0, block_count);
+ for (int i = 0; i < blocks - 1; i++)
+ {
+ int position = i * (BlockWidth + BlockSpacing);
+ g.FillRectangle(new SolidBrush(ProgressColor), new Rectangle(position, 0, BlockWidth, this.Height));
+ }
+ break;
+ case ProgressBarStyle.Marquee:
+ g.FillRectangle(new SolidBrush(ProgressColor), new Rectangle(_marqueePos, 0, MarqueeWidth, this.Height));
+ break;
+ }
+ if (ShowText)
+ {
+ var f = this.Font;
+ var t = this.Text;
+ var size = g.MeasureString(t, f);
+ var loc = new PointF(
+ (this.Width - size.Width) / 2,
+ (this.Height - size.Height) / 2
+ );
+ var color = this.ForeColor;
+ g.DrawString(t, f, new SolidBrush(color), loc);
+ }
+
+ }
+
+ ///<summary>
+ /// Simple linear interpolation algorithm. (http://stackoverflow.com/questions/12838007/c-sharp-linear-interpolation)
+ /// </summary>
+ private double linear(double x, double x0, double x1, double y0, double y1)
+ {
+ if ((x1 - x0) == 0)
+ {
+ return (y0 + y1) / 2;
+ }
+ return y0 + (x - x0) * (y1 - y0) / (x1 - x0);
+ }
+ }
+}
diff --git a/Histacom2.Engine/WindowManager.cs b/Histacom2.Engine/WindowManager.cs
new file mode 100644
index 0000000..2306d5d
--- /dev/null
+++ b/Histacom2.Engine/WindowManager.cs
@@ -0,0 +1,100 @@
+using System;
+using System.Windows.Forms;
+using System.Drawing;
+using Histacom2.Engine.Template;
+using System.Media;
+
+namespace Histacom2.Engine
+{
+ public class WindowManager
+ {
+ public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection();
+
+ public WinClassic StartWin95(UserControl content, string title, Image icon, bool MaxButton, bool MinButton, bool ShowApplicationAsDialog = false, bool resize = true)
+ {
+ // Setup Window
+ WinClassic app = new WinClassic();
+ app.Text = title;
+ app.Title.Text = title;
+ app.Width = content.Width + 8;
+ app.Height = content.Height + 26;
+ // Initialize Font
+ pfc.AddFontFile(SaveSystem.GameDirectory + "\\Data\\LeviWindows.ttf");
+ Font fnt = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0)));
+ app.fnt = fnt;
+ app.Title.Font = new Font(pfc.Families[0], 16F, FontStyle.Bold, GraphicsUnit.Point, ((0)));
+ // Setup UC
+ content.Parent = app.programContent;
+ content.BringToFront();
+ content.Dock = DockStyle.Fill;
+
+ // Check if icon is null
+ if (icon == null)
+ {
+ app.programIcon.Hide();
+ app.programIcon.Image = Engine.Properties.Resources.nullIcon;
+ app.Title.Location = new Point(2, 1);
+ }
+ else app.programIcon.Image = icon;
+
+ // Check if Max button is enabled and set proper X for Min button
+ if (MaxButton == false)
+ {
+ 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)
+ {
+ app.minimizebutton.Visible = false;
+ app.minimizebutton.Location = new Point(app.minimizebutton.Location.X, app.minimizebutton.Location.Y);
+ }
+
+ //Resize
+ app.resizable = resize;
+
+ // Time for the colors
+ app.programtopbar.BackColor = SaveSystem.currentTheme.activeTitleBarColor;
+ app.Title.ForeColor = SaveSystem.currentTheme.activeTitleTextColor;
+
+ // Convert an image to an icon (for the taskbar)
+ if (icon != null)
+ {
+ Bitmap theBitmap = new Bitmap(icon, new Size(icon.Width, icon.Height));
+ IntPtr Hicon = theBitmap.GetHicon(); // Get an Hicon for myBitmap.
+ Icon newIcon = Icon.FromHandle(Hicon); // Create a new icon from the handle.
+ app.Icon = newIcon;
+ }
+
+ // Set some values (for the taskbar)
+ app.Tag = TaskBarController.AvalibleApplicationID;
+ app.Text = title;
+
+ // Show the app
+ app.TopMost = true;
+ if (ShowApplicationAsDialog == false) { app.Show(); } else { app.ShowDialog(); }
+ return app;
+ }
+
+ public WinClassic StartInfobox95(string title, string text, InfoboxType type, InfoboxButtons btns)
+ {
+ pfc.AddFontFile(SaveSystem.GameDirectory + "\\Data\\LeviWindows.ttf");
+ Infobox95 app = new Infobox95(type, btns);
+ app.infoText.Text = text;
+ app.infoText.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0)));
+
+ return StartWin95(app, title, null, false, false, resize: false);
+ }
+
+ public WinClassic StartAboutBox95(string shortname, string longname, Image appicon)
+ {
+ AboutBox95 uc = new AboutBox95();
+ uc.pictureBox1.Image = appicon;
+ uc.textBox1.Text = longname + "\r\nWindows 95\r\nCopyright © 1981-1995 Microsoft Corp.";
+ uc.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0)));
+
+ return StartWin95(uc, "About " + shortname, null, false, false, resize: false);
+ }
+ }
+}
diff --git a/Histacom2.Engine/packages.config b/Histacom2.Engine/packages.config
new file mode 100644
index 0000000..810e559
--- /dev/null
+++ b/Histacom2.Engine/packages.config
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="Newtonsoft.Json" version="10.0.3" targetFramework="net452" />
+</packages> \ No newline at end of file