From 3f03fdb36c72812ec7b899ba533260b06286de55 Mon Sep 17 00:00:00 2001 From: lempamo Date: Wed, 15 Nov 2017 15:49:35 -0500 Subject: a few minor fixes involving the about box --- Histacom2.Engine/Histacom2.Engine.csproj | 9 ++ Histacom2.Engine/Template/AboutBox95.Designer.cs | 18 +-- Histacom2.Engine/Template/AboutBox98.Designer.cs | 151 +++++++++++++++++++++++ Histacom2.Engine/Template/AboutBox98.cs | 23 ++++ Histacom2.Engine/Template/AboutBox98.resx | 120 ++++++++++++++++++ Histacom2.Engine/WindowManager.cs | 14 ++- 6 files changed, 326 insertions(+), 9 deletions(-) create mode 100644 Histacom2.Engine/Template/AboutBox98.Designer.cs create mode 100644 Histacom2.Engine/Template/AboutBox98.cs create mode 100644 Histacom2.Engine/Template/AboutBox98.resx (limited to 'Histacom2.Engine') diff --git a/Histacom2.Engine/Histacom2.Engine.csproj b/Histacom2.Engine/Histacom2.Engine.csproj index 69443b1..170d135 100644 --- a/Histacom2.Engine/Histacom2.Engine.csproj +++ b/Histacom2.Engine/Histacom2.Engine.csproj @@ -57,6 +57,12 @@ + + UserControl + + + AboutBox98.cs + UserControl @@ -144,6 +150,9 @@ PublicResXFileCodeGenerator Resources.Designer.cs + + AboutBox98.cs + DropDownItem.cs diff --git a/Histacom2.Engine/Template/AboutBox95.Designer.cs b/Histacom2.Engine/Template/AboutBox95.Designer.cs index c6877f6..d83e5d1 100644 --- a/Histacom2.Engine/Template/AboutBox95.Designer.cs +++ b/Histacom2.Engine/Template/AboutBox95.Designer.cs @@ -32,8 +32,8 @@ this.textBox1 = new System.Windows.Forms.TextBox(); 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(); + this.textBox3 = new Histacom2.Engine.UI.ClassicLabel(); + this.textBox4 = new Histacom2.Engine.UI.ClassicLabel(); this.classicButton1 = new Histacom2.Engine.UI.ClassicButton(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); @@ -83,18 +83,20 @@ // textBox3 // this.textBox3.BackColor = System.Drawing.Color.Silver; + this.textBox3.DropShadow = false; this.textBox3.Location = new System.Drawing.Point(76, 162); this.textBox3.Name = "textBox3"; - this.textBox3.Size = new System.Drawing.Size(250, 16); + this.textBox3.Size = new System.Drawing.Size(270, 13); 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.DropShadow = false; this.textBox4.Location = new System.Drawing.Point(76, 184); this.textBox4.Name = "textBox4"; - this.textBox4.Size = new System.Drawing.Size(250, 16); + this.textBox4.Size = new System.Drawing.Size(270, 13); this.textBox4.TabIndex = 0; this.textBox4.Text = "System Resources: 97% Free"; // @@ -139,11 +141,11 @@ #endregion internal System.Windows.Forms.PictureBox pictureBox1; - internal System.Windows.Forms.TextBox textBox1; - internal System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.PictureBox pictureBox2; - private System.Windows.Forms.Label textBox3; - private System.Windows.Forms.Label textBox4; + private UI.ClassicLabel textBox3; + private UI.ClassicLabel textBox4; private UI.ClassicButton classicButton1; + public System.Windows.Forms.TextBox textBox1; + public System.Windows.Forms.TextBox textBox2; } } diff --git a/Histacom2.Engine/Template/AboutBox98.Designer.cs b/Histacom2.Engine/Template/AboutBox98.Designer.cs new file mode 100644 index 0000000..11b1d40 --- /dev/null +++ b/Histacom2.Engine/Template/AboutBox98.Designer.cs @@ -0,0 +1,151 @@ +namespace Histacom2.Engine.Template +{ + partial class AboutBox98 + { + /// + /// 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.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.pictureBox2 = new System.Windows.Forms.PictureBox(); + this.textBox3 = new Histacom2.Engine.UI.ClassicLabel(); + this.textBox4 = new Histacom2.Engine.UI.ClassicLabel(); + this.classicButton1 = new Histacom2.Engine.UI.ClassicButton(); + ((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 98\r\nCopyright © 1981-1997 Microsoft Corp."; + // + // 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.DropShadow = false; + this.textBox3.Location = new System.Drawing.Point(74, 162); + this.textBox3.Name = "textBox3"; + this.textBox3.Size = new System.Drawing.Size(274, 13); + this.textBox3.TabIndex = 1; + this.textBox3.Text = "Physical Memory Available to Windows: 196,052 KB"; + // + // textBox4 + // + this.textBox4.BackColor = System.Drawing.Color.Silver; + this.textBox4.DropShadow = false; + this.textBox4.Location = new System.Drawing.Point(74, 184); + this.textBox4.Name = "textBox4"; + this.textBox4.Size = new System.Drawing.Size(274, 13); + this.textBox4.TabIndex = 0; + this.textBox4.Text = "System Resources: 90% Free"; + // + // classicButton1 + // + this.classicButton1.AdaptBackColorWithTheme = true; + this.classicButton1.AdaptFontWithTheme = true; + this.classicButton1.AdaptForeColorWithTheme = true; + this.classicButton1.BackColor = System.Drawing.Color.Silver; + this.classicButton1.DialogResult = System.Windows.Forms.DialogResult.None; + this.classicButton1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.classicButton1.ForeColor = System.Drawing.Color.Black; + this.classicButton1.Location = new System.Drawing.Point(251, 223); + this.classicButton1.Name = "classicButton1"; + this.classicButton1.Size = new System.Drawing.Size(75, 23); + this.classicButton1.TabIndex = 6; + this.classicButton1.Text = "OK"; + this.classicButton1.Click += new System.EventHandler(this.classicButton1_Click); + // + // AboutBox98 + // + 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.classicButton1); + this.Controls.Add(this.textBox4); + this.Controls.Add(this.textBox3); + this.Controls.Add(this.pictureBox2); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.pictureBox1); + this.Name = "AboutBox98"; + this.Size = new System.Drawing.Size(342, 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; + internal System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.PictureBox pictureBox2; + private UI.ClassicLabel textBox3; + private UI.ClassicLabel textBox4; + private UI.ClassicButton classicButton1; + } +} diff --git a/Histacom2.Engine/Template/AboutBox98.cs b/Histacom2.Engine/Template/AboutBox98.cs new file mode 100644 index 0000000..f5a9ad4 --- /dev/null +++ b/Histacom2.Engine/Template/AboutBox98.cs @@ -0,0 +1,23 @@ +using System; +using System.Windows.Forms; + +namespace Histacom2.Engine.Template +{ + public partial class AboutBox98 : UserControl + { + public AboutBox98() + { + InitializeComponent(); + this.textBox2.Text = "This product is licensed to:\r\n" + Environment.UserName + "\r\n"; + textBox1.BackColor = SaveSystem.currentTheme.threeDObjectsColor; + textBox2.BackColor = SaveSystem.currentTheme.threeDObjectsColor; + textBox3.BackColor = SaveSystem.currentTheme.threeDObjectsColor; + textBox4.BackColor = SaveSystem.currentTheme.threeDObjectsColor; + } + + private void classicButton1_Click(object sender, EventArgs e) + { + ParentForm.Close(); + } + } +} diff --git a/Histacom2.Engine/Template/AboutBox98.resx b/Histacom2.Engine/Template/AboutBox98.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Histacom2.Engine/Template/AboutBox98.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/Histacom2.Engine/WindowManager.cs b/Histacom2.Engine/WindowManager.cs index 03fe91b..c95d13d 100644 --- a/Histacom2.Engine/WindowManager.cs +++ b/Histacom2.Engine/WindowManager.cs @@ -167,7 +167,19 @@ namespace Histacom2.Engine 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))); + uc.textBox1.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0))); + uc.textBox2.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0))); + + return Init(uc, "About " + shortname, null, false, false, resize: false); + } + + public WinClassic StartAboutBox98(string shortname, string longname, Image appicon) + { + AboutBox98 uc = new AboutBox98(); + uc.pictureBox1.Image = appicon; + uc.textBox1.Text = longname + "\r\nWindows 98\r\nCopyright © 1981-1997 Microsoft Corp."; + uc.textBox1.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0))); + uc.textBox2.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0))); return Init(uc, "About " + shortname, null, false, false, resize: false); } -- cgit v1.2.3