diff options
Diffstat (limited to 'ShiftOS.Engine')
| -rw-r--r-- | ShiftOS.Engine/Properties/Resources.Designer.cs | 34 | ||||
| -rw-r--r-- | ShiftOS.Engine/Properties/Resources.resx | 15 | ||||
| -rw-r--r-- | ShiftOS.Engine/Resources/Symbolinfo - Copy.png | bin | 56780 -> 0 bytes | |||
| -rw-r--r-- | ShiftOS.Engine/Resources/symbolError.png | bin | 0 -> 3297 bytes | |||
| -rw-r--r-- | ShiftOS.Engine/Resources/symbolQuestion.png | bin | 0 -> 3078 bytes | |||
| -rw-r--r-- | ShiftOS.Engine/Resources/symbolWarning.png | bin | 3463 -> 2929 bytes | |||
| -rw-r--r-- | ShiftOS.Engine/ShiftOS.Engine.csproj | 9 | ||||
| -rw-r--r-- | ShiftOS.Engine/Templates/InfoboxTemplate.Designer.cs | 110 | ||||
| -rw-r--r-- | ShiftOS.Engine/Templates/InfoboxTemplate.cs | 35 | ||||
| -rw-r--r-- | ShiftOS.Engine/Templates/InfoboxTemplate.resx | 120 | ||||
| -rw-r--r-- | ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs | 3 | ||||
| -rw-r--r-- | ShiftOS.Engine/WindowManager/InfoboxTemplate.cs | 29 |
12 files changed, 79 insertions, 276 deletions
diff --git a/ShiftOS.Engine/Properties/Resources.Designer.cs b/ShiftOS.Engine/Properties/Resources.Designer.cs index db83dd9..470100c 100644 --- a/ShiftOS.Engine/Properties/Resources.Designer.cs +++ b/ShiftOS.Engine/Properties/Resources.Designer.cs @@ -92,9 +92,39 @@ namespace ShiftOS.Engine.Properties { /// <summary> /// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary> - internal static System.Drawing.Bitmap Symbolinfo { + internal static System.Drawing.Bitmap symbolError { get { - object obj = ResourceManager.GetObject("Symbolinfo", resourceCulture); + object obj = ResourceManager.GetObject("symbolError", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + internal static System.Drawing.Bitmap symbolInfo { + get { + object obj = ResourceManager.GetObject("symbolInfo", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + internal static System.Drawing.Bitmap symbolQuestion { + get { + object obj = ResourceManager.GetObject("symbolQuestion", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + internal static System.Drawing.Bitmap symbolWarning { + get { + object obj = ResourceManager.GetObject("symbolWarning", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } diff --git a/ShiftOS.Engine/Properties/Resources.resx b/ShiftOS.Engine/Properties/Resources.resx index db3d27b..7c6edde 100644 --- a/ShiftOS.Engine/Properties/Resources.resx +++ b/ShiftOS.Engine/Properties/Resources.resx @@ -121,13 +121,22 @@ <data name="nullIcon" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\nullIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Symbolinfo" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Symbolinfo1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> - </data> <data name="iconInfoBox_fw" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\iconInfoBox.fw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="infobox" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\infobox.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </data> + <data name="symbolError" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\symbolError.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="symbolInfo" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Symbolinfo1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="symbolQuestion" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\symbolQuestion.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="symbolWarning" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\symbolWarning.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/ShiftOS.Engine/Resources/Symbolinfo - Copy.png b/ShiftOS.Engine/Resources/Symbolinfo - Copy.png Binary files differdeleted file mode 100644 index 659d9b3..0000000 --- a/ShiftOS.Engine/Resources/Symbolinfo - Copy.png +++ /dev/null diff --git a/ShiftOS.Engine/Resources/symbolError.png b/ShiftOS.Engine/Resources/symbolError.png Binary files differnew file mode 100644 index 0000000..83c210d --- /dev/null +++ b/ShiftOS.Engine/Resources/symbolError.png diff --git a/ShiftOS.Engine/Resources/symbolQuestion.png b/ShiftOS.Engine/Resources/symbolQuestion.png Binary files differnew file mode 100644 index 0000000..f6f9325 --- /dev/null +++ b/ShiftOS.Engine/Resources/symbolQuestion.png diff --git a/ShiftOS.Engine/Resources/symbolWarning.png b/ShiftOS.Engine/Resources/symbolWarning.png Binary files differindex f8805f6..1ea4287 100644 --- a/ShiftOS.Engine/Resources/symbolWarning.png +++ b/ShiftOS.Engine/Resources/symbolWarning.png diff --git a/ShiftOS.Engine/ShiftOS.Engine.csproj b/ShiftOS.Engine/ShiftOS.Engine.csproj index 2b436c1..6da50d0 100644 --- a/ShiftOS.Engine/ShiftOS.Engine.csproj +++ b/ShiftOS.Engine/ShiftOS.Engine.csproj @@ -92,5 +92,14 @@ <ItemGroup> <None Include="Resources\iconInfoBox.fw.png" /> </ItemGroup> + <ItemGroup> + <None Include="Resources\symbolWarning.png" /> + </ItemGroup> + <ItemGroup> + <None Include="Resources\symbolQuestion.png" /> + </ItemGroup> + <ItemGroup> + <None Include="Resources\symbolError.png" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project>
\ No newline at end of file diff --git a/ShiftOS.Engine/Templates/InfoboxTemplate.Designer.cs b/ShiftOS.Engine/Templates/InfoboxTemplate.Designer.cs deleted file mode 100644 index ca37891..0000000 --- a/ShiftOS.Engine/Templates/InfoboxTemplate.Designer.cs +++ /dev/null @@ -1,110 +0,0 @@ -namespace ShiftOS.Engine.Templates -{ - partial class InfoboxTemplate - { - /// <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.label1 = new System.Windows.Forms.Label(); - this.button2 = new System.Windows.Forms.Button(); - this.button1 = new System.Windows.Forms.Button(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - this.SuspendLayout(); - // - // pictureBox1 - // - this.pictureBox1.Image = global::ShiftOS.Engine.Properties.Resources.Symbolinfo; - this.pictureBox1.Location = new System.Drawing.Point(15, 17); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(80, 70); - this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; - this.pictureBox1.TabIndex = 0; - this.pictureBox1.TabStop = false; - // - // label1 - // - this.label1.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.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Lucida Console", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.Location = new System.Drawing.Point(114, 40); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(115, 15); - this.label1.TabIndex = 1; - this.label1.Text = "Generic Body"; - // - // button2 - // - this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("Lucida Console", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.button2.Location = new System.Drawing.Point(194, 122); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(116, 27); - this.button2.TabIndex = 3; - this.button2.Text = "No"; - this.button2.UseVisualStyleBackColor = true; - // - // button1 - // - this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button1.Font = new System.Drawing.Font("Lucida Console", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.button1.Location = new System.Drawing.Point(51, 122); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(116, 27); - this.button1.TabIndex = 4; - this.button1.Text = "Yes"; - this.button1.UseVisualStyleBackColor = true; - // - // InfoboxTemplate - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.button1); - this.Controls.Add(this.button2); - this.Controls.Add(this.label1); - this.Controls.Add(this.pictureBox1); - this.Name = "InfoboxTemplate"; - this.Size = new System.Drawing.Size(367, 177); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.PictureBox pictureBox1; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Button button2; - private System.Windows.Forms.Button button1; - } -} diff --git a/ShiftOS.Engine/Templates/InfoboxTemplate.cs b/ShiftOS.Engine/Templates/InfoboxTemplate.cs deleted file mode 100644 index bfc91a6..0000000 --- a/ShiftOS.Engine/Templates/InfoboxTemplate.cs +++ /dev/null @@ -1,35 +0,0 @@ -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 ShiftOS.Engine.Templates -{ - public partial class InfoboxTemplate : UserControl - { - public int buttonResult; - public InfoboxTemplate(buttonType type) - { - InitializeComponent(); - switch (type) - { - case buttonType.OK: - button1.Text = "OK"; - button2.Visible = false; - button1.Location = new Point(117, 122); - - } - } - public enum buttonType - { - YesNo, - OK, - OKCancel, - } - } -} diff --git a/ShiftOS.Engine/Templates/InfoboxTemplate.resx b/ShiftOS.Engine/Templates/InfoboxTemplate.resx deleted file mode 100644 index 1af7de1..0000000 --- a/ShiftOS.Engine/Templates/InfoboxTemplate.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?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/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs b/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs index a076c2a..2675935 100644 --- a/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs +++ b/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs @@ -69,7 +69,7 @@ // this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left))); - this.pictureBox1.Image = global::ShiftOS.Engine.Properties.Resources.Symbolinfo; + this.pictureBox1.Image = global::ShiftOS.Engine.Properties.Resources.symbolInfo; this.pictureBox1.Location = new System.Drawing.Point(3, 35); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(80, 70); @@ -80,7 +80,6 @@ // changeSize // this.changeSize.Interval = 1; - this.changeSize.Tick += new System.EventHandler(this.changeSize_Tick); // // label1 // diff --git a/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs b/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs index a5be129..c5e49de 100644 --- a/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs +++ b/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs @@ -11,7 +11,7 @@ namespace ShiftOS.Engine.WindowManager Stream _str; private int _buttonChoice; private int _buttonSelected; - public InfoboxTemplate(ButtonType type) + public InfoboxTemplate(ButtonType type, ErrorIcon icon) { InitializeComponent(); @@ -34,6 +34,21 @@ namespace ShiftOS.Engine.WindowManager _buttonChoice = 3; break; } + switch (icon) + { + case ErrorIcon.Critical: + SetImage(Properties.Resources.symbolError); + break; + case ErrorIcon.Error: + SetImage(Properties.Resources.symbolWarning); + break; + case ErrorIcon.Info: + SetImage(Properties.Resources.symbolInfo); + break; + case ErrorIcon.Question: + SetImage(Properties.Resources.symbolQuestion); + break; + } } public enum ButtonType @@ -43,6 +58,13 @@ namespace ShiftOS.Engine.WindowManager Ok } + public enum ErrorIcon + { + Info, + Critical, + Error, + Question + } private void btnOpt1_Click(object sender, EventArgs e) { switch (btnOpt1.Text) @@ -82,10 +104,9 @@ namespace ShiftOS.Engine.WindowManager private void InfoboxTemplate_Load(object sender, EventArgs e) => Play(); - private void changeSize_Tick(object sender, EventArgs e) + private void SetImage(Image imageType) { - this.Height += label1.Height; - this.Width += label1.Width; + pictureBox1.Image = imageType; } } } |
