From aa44f27eab230f464e9778a4256c330a056a7b3c Mon Sep 17 00:00:00 2001 From: FloppyDiskDrive Date: Sun, 1 Oct 2017 09:52:26 -0500 Subject: Revert "Added a fuckton of changes" This reverts commit c23e42cc396d4fc55799d659bae2149cc183dbf6. --- ShiftOS.Engine/Properties/Resources.Designer.cs | 34 +----- ShiftOS.Engine/Properties/Resources.resx | 15 +-- ShiftOS.Engine/Resources/Symbolinfo - Copy.png | Bin 0 -> 56780 bytes ShiftOS.Engine/Resources/symbolError.png | Bin 3297 -> 0 bytes ShiftOS.Engine/Resources/symbolQuestion.png | Bin 3078 -> 0 bytes ShiftOS.Engine/Resources/symbolWarning.png | Bin 2929 -> 3463 bytes ShiftOS.Engine/ShiftOS.Engine.csproj | 9 -- .../Templates/InfoboxTemplate.Designer.cs | 110 +++++++++++++++++++ ShiftOS.Engine/Templates/InfoboxTemplate.cs | 35 ++++++ ShiftOS.Engine/Templates/InfoboxTemplate.resx | 120 +++++++++++++++++++++ .../WindowManager/InfoboxTemplate.Designer.cs | 3 +- ShiftOS.Engine/WindowManager/InfoboxTemplate.cs | 29 +---- 12 files changed, 276 insertions(+), 79 deletions(-) create mode 100644 ShiftOS.Engine/Resources/Symbolinfo - Copy.png delete mode 100644 ShiftOS.Engine/Resources/symbolError.png delete mode 100644 ShiftOS.Engine/Resources/symbolQuestion.png create mode 100644 ShiftOS.Engine/Templates/InfoboxTemplate.Designer.cs create mode 100644 ShiftOS.Engine/Templates/InfoboxTemplate.cs create mode 100644 ShiftOS.Engine/Templates/InfoboxTemplate.resx (limited to 'ShiftOS.Engine') diff --git a/ShiftOS.Engine/Properties/Resources.Designer.cs b/ShiftOS.Engine/Properties/Resources.Designer.cs index 470100c..db83dd9 100644 --- a/ShiftOS.Engine/Properties/Resources.Designer.cs +++ b/ShiftOS.Engine/Properties/Resources.Designer.cs @@ -92,39 +92,9 @@ namespace ShiftOS.Engine.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap symbolError { + internal static System.Drawing.Bitmap Symbolinfo { get { - object obj = ResourceManager.GetObject("symbolError", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap symbolInfo { - get { - object obj = ResourceManager.GetObject("symbolInfo", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap symbolQuestion { - get { - object obj = ResourceManager.GetObject("symbolQuestion", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap symbolWarning { - get { - object obj = ResourceManager.GetObject("symbolWarning", resourceCulture); + object obj = ResourceManager.GetObject("Symbolinfo", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } diff --git a/ShiftOS.Engine/Properties/Resources.resx b/ShiftOS.Engine/Properties/Resources.resx index 7c6edde..db3d27b 100644 --- a/ShiftOS.Engine/Properties/Resources.resx +++ b/ShiftOS.Engine/Properties/Resources.resx @@ -121,22 +121,13 @@ ..\Resources\nullIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Symbolinfo1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\iconInfoBox.fw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\infobox.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\Resources\symbolError.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Symbolinfo1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\symbolQuestion.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\symbolWarning.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - \ No newline at end of file diff --git a/ShiftOS.Engine/Resources/Symbolinfo - Copy.png b/ShiftOS.Engine/Resources/Symbolinfo - Copy.png new file mode 100644 index 0000000..659d9b3 Binary files /dev/null and b/ShiftOS.Engine/Resources/Symbolinfo - Copy.png differ diff --git a/ShiftOS.Engine/Resources/symbolError.png b/ShiftOS.Engine/Resources/symbolError.png deleted file mode 100644 index 83c210d..0000000 Binary files a/ShiftOS.Engine/Resources/symbolError.png and /dev/null differ diff --git a/ShiftOS.Engine/Resources/symbolQuestion.png b/ShiftOS.Engine/Resources/symbolQuestion.png deleted file mode 100644 index f6f9325..0000000 Binary files a/ShiftOS.Engine/Resources/symbolQuestion.png and /dev/null differ diff --git a/ShiftOS.Engine/Resources/symbolWarning.png b/ShiftOS.Engine/Resources/symbolWarning.png index 1ea4287..f8805f6 100644 Binary files a/ShiftOS.Engine/Resources/symbolWarning.png and b/ShiftOS.Engine/Resources/symbolWarning.png differ diff --git a/ShiftOS.Engine/ShiftOS.Engine.csproj b/ShiftOS.Engine/ShiftOS.Engine.csproj index 6da50d0..2b436c1 100644 --- a/ShiftOS.Engine/ShiftOS.Engine.csproj +++ b/ShiftOS.Engine/ShiftOS.Engine.csproj @@ -92,14 +92,5 @@ - - - - - - - - - \ No newline at end of file diff --git a/ShiftOS.Engine/Templates/InfoboxTemplate.Designer.cs b/ShiftOS.Engine/Templates/InfoboxTemplate.Designer.cs new file mode 100644 index 0000000..ca37891 --- /dev/null +++ b/ShiftOS.Engine/Templates/InfoboxTemplate.Designer.cs @@ -0,0 +1,110 @@ +namespace ShiftOS.Engine.Templates +{ + partial class InfoboxTemplate + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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 new file mode 100644 index 0000000..bfc91a6 --- /dev/null +++ b/ShiftOS.Engine/Templates/InfoboxTemplate.cs @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.Engine/Templates/InfoboxTemplate.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs b/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs index 2675935..a076c2a 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,6 +80,7 @@ // 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 c5e49de..a5be129 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, ErrorIcon icon) + public InfoboxTemplate(ButtonType type) { InitializeComponent(); @@ -34,21 +34,6 @@ 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 @@ -58,13 +43,6 @@ namespace ShiftOS.Engine.WindowManager Ok } - public enum ErrorIcon - { - Info, - Critical, - Error, - Question - } private void btnOpt1_Click(object sender, EventArgs e) { switch (btnOpt1.Text) @@ -104,9 +82,10 @@ namespace ShiftOS.Engine.WindowManager private void InfoboxTemplate_Load(object sender, EventArgs e) => Play(); - private void SetImage(Image imageType) + private void changeSize_Tick(object sender, EventArgs e) { - pictureBox1.Image = imageType; + this.Height += label1.Height; + this.Width += label1.Width; } } } -- cgit v1.2.3