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 +- Histacom2/GlobalPrograms/WinClassicNotepad.cs | 3 +- .../OS/Win95/Win95Apps/Win95WindowsExplorer.cs | 2 +- Histacom2/OS/Win98/Win98.cs | 44 ++---- .../Win98/Win98Apps/WinClassicWindowsExplorer.cs | 2 +- Histacom2/OS/WinXPBad/WinXPBad.cs | 4 +- 11 files changed, 342 insertions(+), 48 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 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); } diff --git a/Histacom2/GlobalPrograms/WinClassicNotepad.cs b/Histacom2/GlobalPrograms/WinClassicNotepad.cs index de838e0..4334a5e 100644 --- a/Histacom2/GlobalPrograms/WinClassicNotepad.cs +++ b/Histacom2/GlobalPrograms/WinClassicNotepad.cs @@ -37,7 +37,8 @@ namespace Histacom2.GlobalPrograms private void aboutNotepadToolStripMenuItem_Click(object sender, EventArgs e) { WindowManager wm = new WindowManager(); - wm.StartAboutBox95("Notepad", "Microsoft Notepad", Properties.Resources.WinClassicNotepad); + if (SaveSystem.CurrentSave.CurrentOS == "95") wm.StartAboutBox95("Notepad", "Microsoft Notepad", Properties.Resources.WinClassicNotepad); + else wm.StartAboutBox98("Notepad", "Microsoft Notepad", Properties.Resources.WinClassicNotepad); } private void wordWrapToolStripMenuItem_Click(object sender, EventArgs e) diff --git a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs index e743b30..3f24049 100644 --- a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs +++ b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs @@ -656,7 +656,7 @@ namespace Histacom2.OS.Win95.Win95Apps private void AboutWindows95ToolStripMenuItem_Click(object sender, EventArgs e) { WindowManager wm = new WindowManager(); - wm.StartAboutBox95("Windows 95", "Microsoft Windows 95 Rev B", Properties.Resources.WinClassicAbout95); + wm.StartAboutBox95("Windows 95", "Microsoft Windows", Properties.Resources.WinClassicAbout95); } private void RenameToolStripMenuItem_Click(object sender, EventArgs e) diff --git a/Histacom2/OS/Win98/Win98.cs b/Histacom2/OS/Win98/Win98.cs index ce7cd65..e9a7d60 100644 --- a/Histacom2/OS/Win98/Win98.cs +++ b/Histacom2/OS/Win98/Win98.cs @@ -499,21 +499,21 @@ namespace Histacom2.OS.Win98 private void desktopupdate_Tick(object sender, EventArgs e) { - DesktopController.RefreshDesktopIcons(new ListViewItem[] { new System.Windows.Forms.ListViewItem("My Computer", 0), - new System.Windows.Forms.ListViewItem("Network Neighborhood", 5), - new System.Windows.Forms.ListViewItem("Inbox", 3), - new System.Windows.Forms.ListViewItem("Recycle Bin", 7), - new System.Windows.Forms.ListViewItem("Internet Explorer", 2), - new System.Windows.Forms.ListViewItem("Online Services", 1), - new System.Windows.Forms.ListViewItem("Set Up The Microsoft Network", 4), - new System.Windows.Forms.ListViewItem("Outlook Express", 6) }, ref desktopicons, Path.Combine(ProfileWindowsDirectory, "Desktop")); + DesktopController.RefreshDesktopIcons(new ListViewItem[] { new ListViewItem("My Computer", 0), + new ListViewItem("Network Neighborhood", 5), + new ListViewItem("Inbox", 3), + new ListViewItem("Recycle Bin", 7), + new ListViewItem("Internet Explorer", 2), + new ListViewItem("Online Services", 1), + new ListViewItem("Set Up The Microsoft Network", 4), + new ListViewItem("Outlook Express", 6) }, ref desktopicons, Path.Combine(ProfileWindowsDirectory, "Desktop")); } private void FolderToolStripMenuItem_Click(object sender, EventArgs e) { if (Directory.Exists(Path.Combine(ProfileWindowsDirectory, "Desktop", "New Folder"))) { - wm.StartAboutBox95("Windows Explorer", "A folder called New Folder already exists - please rename it.", Properties.Resources.Win95Error); + wm.StartInfobox95("Windows Explorer", "A folder called New Folder already exists - please rename it.", InfoboxType.Error, InfoboxButtons.OK); } else { @@ -525,7 +525,7 @@ namespace Histacom2.OS.Win98 { if (File.Exists(Path.Combine(ProfileWindowsDirectory, "Desktop", "New Text Document.txt"))) { - wm.StartAboutBox95("Windows Explorer", "A folder called New Text Document already exists - please rename it.", Properties.Resources.Win95Error); + wm.StartInfobox95("Windows Explorer", "A folder called New Text Document already exists - please rename it.", InfoboxType.Error, InfoboxButtons.OK); } else { @@ -573,29 +573,5 @@ namespace Histacom2.OS.Win98 } } } - public class MyRenderer : ToolStripProfessionalRenderer - { - public MyRenderer() : base(new MyColors()) { } - } - - public class MyColors : ProfessionalColorTable - { - public override Color MenuItemSelectedGradientBegin - { - get { return Color.Navy; } - } - public override Color MenuItemSelectedGradientEnd - { - get { return Color.Navy; } - } - public override Color MenuItemPressedGradientBegin - { - get { return Color.Navy; } - } - public override Color MenuItemPressedGradientEnd - { - get { return Color.Navy; } - } - } } diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs index bc121e6..e02fe00 100644 --- a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs +++ b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs @@ -626,7 +626,7 @@ namespace Histacom2.OS.Win95.Win95Apps private void AboutWindows95ToolStripMenuItem_Click(object sender, EventArgs e) { WindowManager wm = new WindowManager(); - wm.StartAboutBox95("Windows 98", "Microsoft Windows 98", Properties.Resources.WinClassicAbout95); + wm.StartAboutBox98("Windows 98", "Microsoft (R) Windows", Properties.Resources.WinClassicAbout95); } private void RenameToolStripMenuItem_Click(object sender, EventArgs e) diff --git a/Histacom2/OS/WinXPBad/WinXPBad.cs b/Histacom2/OS/WinXPBad/WinXPBad.cs index 4326d99..5e368fb 100644 --- a/Histacom2/OS/WinXPBad/WinXPBad.cs +++ b/Histacom2/OS/WinXPBad/WinXPBad.cs @@ -231,7 +231,7 @@ namespace Histacom2.OS.WinXPBad { if (Directory.Exists(Path.Combine(ProfileWindowsDirectory, "Desktop", "New Folder"))) { - wm.StartAboutBox95("Windows Explorer", "A folder called New Folder already exists - please rename it.", Properties.Resources.Win95Error); + //wm.StartAboutBox95("Windows Explorer", "A folder called New Folder already exists - please rename it.", Properties.Resources.Win95Error); } else { @@ -243,7 +243,7 @@ namespace Histacom2.OS.WinXPBad { if (File.Exists(Path.Combine(ProfileWindowsDirectory, "Desktop", "New Text Document.txt"))) { - wm.StartAboutBox95("Windows Explorer", "A folder called New Text Document already exists - please rename it.", Properties.Resources.Win95Error); + //wm.StartAboutBox95("Windows Explorer", "A folder called New Text Document already exists - please rename it.", Properties.Resources.Win95Error); } else { -- cgit v1.2.3