diff options
| author | lempamo <[email protected]> | 2017-07-04 18:24:33 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-07-04 18:24:33 -0400 |
| commit | 6a300263c27d7cc0f7661f373a7f7a9d5203c3ff (patch) | |
| tree | 6217624d9af87a0cfffb8936b765b4198a2a9dee | |
| parent | ac75c9cfdb27723b99a3d408fd54518d84cd2853 (diff) | |
| download | histacom2-6a300263c27d7cc0f7661f373a7f7a9d5203c3ff.tar.gz histacom2-6a300263c27d7cc0f7661f373a7f7a9d5203c3ff.tar.bz2 histacom2-6a300263c27d7cc0f7661f373a7f7a9d5203c3ff.zip | |
A few theming things
| -rw-r--r-- | TimeHACK.Engine/SaveSystem.cs | 21 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.Designer.cs | 72 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.cs | 20 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.resx | 120 | ||||
| -rw-r--r-- | TimeHACK.Main/Properties/Resources.Designer.cs | 10 | ||||
| -rw-r--r-- | TimeHACK.Main/Properties/Resources.resx | 3 | ||||
| -rw-r--r-- | TimeHACK.Main/Resources/WinClassic/WinClassicDisplayExample.png | bin | 0 -> 1353 bytes | |||
| -rw-r--r-- | TimeHACK.Main/SaveDialogs/SaveFileTroubleShooter.cs | 8 | ||||
| -rw-r--r-- | TimeHACK.Main/TimeHACK.Main.csproj | 11 |
9 files changed, 256 insertions, 9 deletions
diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs index 0911805..be3aeb7 100644 --- a/TimeHACK.Engine/SaveSystem.cs +++ b/TimeHACK.Engine/SaveSystem.cs @@ -124,10 +124,19 @@ namespace TimeHACK.Engine if (ProfileName == "98") { save.CurrentOS = "98"; + save.ThemeName = "98normal"; + } + else + { + save.CurrentOS = "95"; + save.ThemeName = "95normal"; } - else save.CurrentOS = "95"; } - else save.CurrentOS = "95"; + else + { + save.CurrentOS = "95"; + save.ThemeName = "95normal"; + } CurrentSave = save; CheckFiles(); @@ -217,12 +226,14 @@ namespace TimeHACK.Engine public string CurrentOS { get; set; } // public Dictionary<string, bool> InstalledPrograms { get; set; } InstallProgram is no longer needed... we have that data in the FileSystem public List<string> ExperiencedStories { get; set; } + + public string ThemeName { get; set; } } public class FileSystemFolderInfo { - public Boolean Isprotected { get; set; } - public String label { get; set; } - public Boolean allowback { get; set; } + public bool Isprotected { get; set; } + public string label { get; set; } + public bool allowback { get; set; } } } diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.Designer.cs new file mode 100644 index 0000000..91ea2c6 --- /dev/null +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.Designer.cs @@ -0,0 +1,72 @@ +namespace TimeHACK.OS.Win95.Win95Apps +{ + partial class WinClassicThemePanel + { + /// <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.comboBox1 = new System.Windows.Forms.ComboBox(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // pictureBox1 + // + this.pictureBox1.BackgroundImage = global::TimeHACK.Properties.Resources.WinClassicDisplayExample; + this.pictureBox1.Location = new System.Drawing.Point(58, 15); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(184, 169); + this.pictureBox1.TabIndex = 0; + this.pictureBox1.TabStop = false; + // + // comboBox1 + // + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Location = new System.Drawing.Point(15, 201); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(269, 21); + this.comboBox1.TabIndex = 1; + // + // WinClassicThemePanel + // + 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.comboBox1); + this.Controls.Add(this.pictureBox1); + this.Name = "WinClassicThemePanel"; + this.Size = new System.Drawing.Size(301, 314); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.ComboBox comboBox1; + } +} diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.cs new file mode 100644 index 0000000..5fc072e --- /dev/null +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.cs @@ -0,0 +1,20 @@ +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 TimeHACK.OS.Win95.Win95Apps +{ + public partial class WinClassicThemePanel : UserControl + { + public WinClassicThemePanel() + { + InitializeComponent(); + } + } +} diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.resx b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.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/TimeHACK.Main/Properties/Resources.Designer.cs b/TimeHACK.Main/Properties/Resources.Designer.cs index a1e0907..df21304 100644 --- a/TimeHACK.Main/Properties/Resources.Designer.cs +++ b/TimeHACK.Main/Properties/Resources.Designer.cs @@ -734,6 +734,16 @@ namespace TimeHACK.Properties { /// <summary> /// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary> + internal static System.Drawing.Bitmap WinClassicDisplayExample { + get { + object obj = ResourceManager.GetObject("WinClassicDisplayExample", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> internal static System.Drawing.Bitmap WinClassicDocuments { get { object obj = ResourceManager.GetObject("WinClassicDocuments", resourceCulture); diff --git a/TimeHACK.Main/Properties/Resources.resx b/TimeHACK.Main/Properties/Resources.resx index 3147bc8..b7b5d64 100644 --- a/TimeHACK.Main/Properties/Resources.resx +++ b/TimeHACK.Main/Properties/Resources.resx @@ -567,4 +567,7 @@ <data name="Win98Stop" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\WinClassic\Win98Stop.WAV;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </data> + <data name="WinClassicDisplayExample" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\WinClassic\WinClassicDisplayExample.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> </root>
\ No newline at end of file diff --git a/TimeHACK.Main/Resources/WinClassic/WinClassicDisplayExample.png b/TimeHACK.Main/Resources/WinClassic/WinClassicDisplayExample.png Binary files differnew file mode 100644 index 0000000..63e21df --- /dev/null +++ b/TimeHACK.Main/Resources/WinClassic/WinClassicDisplayExample.png diff --git a/TimeHACK.Main/SaveDialogs/SaveFileTroubleShooter.cs b/TimeHACK.Main/SaveDialogs/SaveFileTroubleShooter.cs index eb79543..4ada932 100644 --- a/TimeHACK.Main/SaveDialogs/SaveFileTroubleShooter.cs +++ b/TimeHACK.Main/SaveDialogs/SaveFileTroubleShooter.cs @@ -78,10 +78,10 @@ namespace TimeHACK.SaveDialogs savedata.ExperiencedStories = new List<string>(); } - if (savedata.ExperiencedStories == null) + if (savedata.ThemeName == null || savedata.ThemeName == "") { - WriteToLog("ISSUE FOUND! Data for ExperiencedStories is null! Giving default value..."); - savedata.ExperiencedStories = new List<string>(); + WriteToLog("ISSUE FOUND! Data for ThemeName is null! Giving default value..."); + savedata.ThemeName = "95normal"; } } @@ -95,7 +95,7 @@ namespace TimeHACK.SaveDialogs } - void EndScan(Boolean successful) + void EndScan(bool successful) { pnlResolved.Visible = true; if (successful == true) diff --git a/TimeHACK.Main/TimeHACK.Main.csproj b/TimeHACK.Main/TimeHACK.Main.csproj index 9532c0e..a42cb05 100644 --- a/TimeHACK.Main/TimeHACK.Main.csproj +++ b/TimeHACK.Main/TimeHACK.Main.csproj @@ -146,6 +146,12 @@ <Compile Include="OS\Win95\Win95Apps\WinClassicTerminal.Designer.cs"> <DependentUpon>WinClassicTerminal.cs</DependentUpon> </Compile> + <Compile Include="OS\Win95\Win95Apps\WinClassicThemePanel.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="OS\Win95\Win95Apps\WinClassicThemePanel.Designer.cs"> + <DependentUpon>WinClassicThemePanel.cs</DependentUpon> + </Compile> <Compile Include="OS\Win95\Win95Apps\WinClassicWindowsExplorer.cs"> <SubType>UserControl</SubType> </Compile> @@ -291,6 +297,9 @@ <EmbeddedResource Include="OS\Win95\Win95Apps\WinClassicTerminal.resx"> <DependentUpon>WinClassicTerminal.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="OS\Win95\Win95Apps\WinClassicThemePanel.resx"> + <DependentUpon>WinClassicThemePanel.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="OS\Win95\Win95Apps\WinClassicWindowsExplorer.resx"> <DependentUpon>WinClassicWindowsExplorer.cs</DependentUpon> <SubType>Designer</SubType> @@ -460,6 +469,8 @@ <Content Include="Resources\WinClassic\WinClassicComputer.png" /> <None Include="Resources\WinClassic\WinClassicCopy.png" /> <None Include="Resources\WinClassic\WinClassicCut.png" /> + <None Include="Resources\WinClassic\WinClassicDisplayDummy.png" /> + <None Include="Resources\WinClassic\WinClassicDisplayExample.png" /> <Content Include="Resources\WinClassic\WinClassicDocuments.png" /> <Content Include="Resources\WinClassic\WinClassicFind.png" /> <Content Include="Resources\WinClassic\WinClassicFolder.png" /> |
