diff options
Diffstat (limited to 'Histacom2.Engine/Template')
| -rw-r--r-- | Histacom2.Engine/Template/DropDownItem.Designer.cs | 63 | ||||
| -rw-r--r-- | Histacom2.Engine/Template/DropDownItem.cs | 42 | ||||
| -rw-r--r-- | Histacom2.Engine/Template/DropDownItem.resx | 120 | ||||
| -rw-r--r-- | Histacom2.Engine/Template/DropDownOverlay.Designer.cs | 64 | ||||
| -rw-r--r-- | Histacom2.Engine/Template/DropDownOverlay.cs | 26 | ||||
| -rw-r--r-- | Histacom2.Engine/Template/DropDownOverlay.resx | 120 | ||||
| -rw-r--r-- | Histacom2.Engine/Template/WinClassic.Designer.cs | 1 | ||||
| -rw-r--r-- | Histacom2.Engine/Template/WinClassic.cs | 13 | ||||
| -rw-r--r-- | Histacom2.Engine/Template/WinXP.cs | 2 |
9 files changed, 438 insertions, 13 deletions
diff --git a/Histacom2.Engine/Template/DropDownItem.Designer.cs b/Histacom2.Engine/Template/DropDownItem.Designer.cs new file mode 100644 index 0000000..1318726 --- /dev/null +++ b/Histacom2.Engine/Template/DropDownItem.Designer.cs @@ -0,0 +1,63 @@ +namespace Histacom2.Engine.Template +{ + partial class DropDownItem + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // label1 + // + this.label1.Dock = System.Windows.Forms.DockStyle.Fill; + this.label1.Location = new System.Drawing.Point(0, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(315, 20); + this.label1.TabIndex = 0; + this.label1.Text = "label1"; + this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter; + this.label1.Click += new System.EventHandler(this.label1_Click); + this.label1.MouseEnter += new System.EventHandler(this.label1_MouseEnter); + this.label1.MouseLeave += new System.EventHandler(this.label1_MouseLeave); + // + // DropDownItem + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Transparent; + this.Controls.Add(this.label1); + this.Name = "DropDownItem"; + this.Size = new System.Drawing.Size(315, 20); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label label1; + } +} diff --git a/Histacom2.Engine/Template/DropDownItem.cs b/Histacom2.Engine/Template/DropDownItem.cs new file mode 100644 index 0000000..8b2c654 --- /dev/null +++ b/Histacom2.Engine/Template/DropDownItem.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Histacom2.Engine.Template +{ + public partial class DropDownItem : UserControl + { + public UI.ClassicDropDown dpdw; + public DropDownItem() + { + InitializeComponent(); + } + + public void ChangeText(string newText, Font fnt) + { + label1.Font = fnt; + label1.Text = newText; + } + + private void label1_MouseLeave(object sender, EventArgs e) + { + label1.BackColor = Color.Transparent; + } + + private void label1_Click(object sender, EventArgs e) + { + dpdw.ChooseItem(label1.Text); + } + + private void label1_MouseEnter(object sender, EventArgs e) + { + label1.BackColor = Color.Blue; + } + } +} diff --git a/Histacom2.Engine/Template/DropDownItem.resx b/Histacom2.Engine/Template/DropDownItem.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Histacom2.Engine/Template/DropDownItem.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/Histacom2.Engine/Template/DropDownOverlay.Designer.cs b/Histacom2.Engine/Template/DropDownOverlay.Designer.cs new file mode 100644 index 0000000..6894433 --- /dev/null +++ b/Histacom2.Engine/Template/DropDownOverlay.Designer.cs @@ -0,0 +1,64 @@ +namespace Histacom2.Engine.Template +{ + partial class DropDownOverlay + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.outline = new System.Windows.Forms.Panel(); + this.SuspendLayout(); + // + // outline + // + this.outline.BackColor = System.Drawing.Color.White; + this.outline.Location = new System.Drawing.Point(230, 56); + this.outline.Name = "outline"; + this.outline.Size = new System.Drawing.Size(200, 100); + this.outline.TabIndex = 0; + this.outline.Paint += new System.Windows.Forms.PaintEventHandler(this.outline_Paint); + // + // DropDownOverlay + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(0)))), ((int)(((byte)(1))))); + this.ClientSize = new System.Drawing.Size(628, 210); + this.Controls.Add(this.outline); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "DropDownOverlay"; + this.Text = "DropDownOverlay"; + this.TopMost = true; + this.TransparencyKey = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(0)))), ((int)(((byte)(1))))); + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.ResumeLayout(false); + + } + + #endregion + + public System.Windows.Forms.Panel outline; + } +}
\ No newline at end of file diff --git a/Histacom2.Engine/Template/DropDownOverlay.cs b/Histacom2.Engine/Template/DropDownOverlay.cs new file mode 100644 index 0000000..4d364d6 --- /dev/null +++ b/Histacom2.Engine/Template/DropDownOverlay.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Histacom2.Engine.Template +{ + public partial class DropDownOverlay : Form + { + public DropDownOverlay() + { + InitializeComponent(); + } + + private void outline_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(Pens.Black, 0, 0, outline.Width - 1, outline.Height - 1); // Draws a 1 pixel border around the dropdown's drop area! + if (SaveSystem.currentTheme != null) outline.BackColor = SaveSystem.currentTheme.threeDObjectsColor; + } + } +} diff --git a/Histacom2.Engine/Template/DropDownOverlay.resx b/Histacom2.Engine/Template/DropDownOverlay.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Histacom2.Engine/Template/DropDownOverlay.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/Histacom2.Engine/Template/WinClassic.Designer.cs b/Histacom2.Engine/Template/WinClassic.Designer.cs index fd1a02d..8b9497f 100644 --- a/Histacom2.Engine/Template/WinClassic.Designer.cs +++ b/Histacom2.Engine/Template/WinClassic.Designer.cs @@ -288,7 +288,6 @@ this.Text = "WinClassic"; this.Activated += new System.EventHandler(this.WinClassic_Activated); this.Deactivate += new System.EventHandler(this.WinClassic_Deactivate); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.WinClassic_Paint); this.program.ResumeLayout(false); this.programtopbar.ResumeLayout(false); this.programtopbar.PerformLayout(); diff --git a/Histacom2.Engine/Template/WinClassic.cs b/Histacom2.Engine/Template/WinClassic.cs index 1f715ab..c911af3 100644 --- a/Histacom2.Engine/Template/WinClassic.cs +++ b/Histacom2.Engine/Template/WinClassic.cs @@ -45,7 +45,7 @@ namespace Histacom2.Engine.Template private void Programtopbar_drag(object sender, MouseEventArgs e) { - if (e.Button == MouseButtons.Left && max == false) + if (e.Button == MouseButtons.Left && !max) { ReleaseCapture(); SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0); @@ -194,15 +194,6 @@ namespace Histacom2.Engine.Template } } - private void WinClassic_Paint(object sender, PaintEventArgs e) - { - if (Resizing) - { - MessageBox.Show("HIT IT"); - e.Graphics.DrawImage(ResizingBmp, 0, 0, this.Width, this.Height); - } - } - private void border_MouseUp(object sender, MouseEventArgs e) { this.Bounds = resizer.ToDraw; @@ -349,7 +340,7 @@ namespace Histacom2.Engine.Template private void maximizebutton_Click(object sender, EventArgs e) { - if (max == false) + if (!max) { this.right.Hide(); this.left.Hide(); diff --git a/Histacom2.Engine/Template/WinXP.cs b/Histacom2.Engine/Template/WinXP.cs index d9b396d..d572fe8 100644 --- a/Histacom2.Engine/Template/WinXP.cs +++ b/Histacom2.Engine/Template/WinXP.cs @@ -67,7 +67,7 @@ namespace Histacom2.Engine.Template private void top_MouseDown(object sender, MouseEventArgs e) { - if (e.Button == MouseButtons.Left && max == false) + if (e.Button == MouseButtons.Left && !max) { ReleaseCapture(); SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0); |
