From bd74f334cf0a2fcb4f98b1d33fa909bce766d02b Mon Sep 17 00:00:00 2001 From: lempamo Date: Fri, 22 Sep 2017 21:18:09 -0400 Subject: new installer prototype --- .../GlobalPrograms/WinClassicInstaller.Designer.cs | 110 +++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs (limited to 'Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs') diff --git a/Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs b/Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs new file mode 100644 index 0000000..c8bea62 --- /dev/null +++ b/Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs @@ -0,0 +1,110 @@ +namespace Histacom2.GlobalPrograms +{ + partial class WinClassicInstaller + { + /// + /// 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.panel1 = new System.Windows.Forms.Panel(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.classicButton1 = new Histacom2.Engine.UI.ClassicButton(); + this.classicButton2 = new Histacom2.Engine.UI.ClassicButton(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(495, 314); + this.panel1.TabIndex = 0; + // + // pictureBox1 + // + this.pictureBox1.BackgroundImage = global::Histacom2.Properties.Resources.ie4_hsplitter; + this.pictureBox1.Location = new System.Drawing.Point(0, 314); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(495, 2); + this.pictureBox1.TabIndex = 1; + this.pictureBox1.TabStop = false; + // + // 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(408, 326); + this.classicButton1.Name = "classicButton1"; + this.classicButton1.Size = new System.Drawing.Size(75, 23); + this.classicButton1.TabIndex = 2; + this.classicButton1.Text = "Cancel"; + // + // classicButton2 + // + this.classicButton2.AdaptBackColorWithTheme = true; + this.classicButton2.AdaptFontWithTheme = true; + this.classicButton2.AdaptForeColorWithTheme = true; + this.classicButton2.BackColor = System.Drawing.Color.Silver; + this.classicButton2.DialogResult = System.Windows.Forms.DialogResult.None; + this.classicButton2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.classicButton2.ForeColor = System.Drawing.Color.Black; + this.classicButton2.Location = new System.Drawing.Point(323, 326); + this.classicButton2.Name = "classicButton2"; + this.classicButton2.Size = new System.Drawing.Size(75, 23); + this.classicButton2.TabIndex = 3; + this.classicButton2.Text = "&Next >"; + // + // WinClassicInstaller + // + 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.classicButton2); + this.Controls.Add(this.classicButton1); + this.Controls.Add(this.pictureBox1); + this.Controls.Add(this.panel1); + this.MaximumSize = new System.Drawing.Size(495, 358); + this.MinimumSize = new System.Drawing.Size(495, 358); + this.Name = "WinClassicInstaller"; + this.Size = new System.Drawing.Size(495, 358); + this.Load += new System.EventHandler(this.WinClassicInstaller_Load); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.PictureBox pictureBox1; + private Engine.UI.ClassicButton classicButton1; + private Engine.UI.ClassicButton classicButton2; + } +} -- cgit v1.2.3 From 245a7c360bf2b6a6892abd32d3693847103d1132 Mon Sep 17 00:00:00 2001 From: lempamo Date: Sat, 23 Sep 2017 10:29:27 -0400 Subject: added directory pane to installer --- .../InstallerPanes/DirectoryPane.Designer.cs | 165 +++++++++++++++++++++ .../GlobalPrograms/InstallerPanes/DirectoryPane.cs | 26 ++++ .../InstallerPanes/DirectoryPane.resx | 120 +++++++++++++++ .../GlobalPrograms/WinClassicInstaller.Designer.cs | 20 +++ Histacom2/GlobalPrograms/WinClassicInstaller.cs | 13 ++ Histacom2/Histacom2.csproj | 10 ++ Histacom2/Properties/Resources.resx | 3 + Histacom2/Properties/Resources1.Designer.cs | 10 ++ .../Resources/WinClassic/WinClassicInstallIcon.png | Bin 0 -> 982 bytes 9 files changed, 367 insertions(+) create mode 100644 Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.Designer.cs create mode 100644 Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.cs create mode 100644 Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.resx create mode 100644 Histacom2/Resources/WinClassic/WinClassicInstallIcon.png (limited to 'Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs') diff --git a/Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.Designer.cs b/Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.Designer.cs new file mode 100644 index 0000000..6759dd9 --- /dev/null +++ b/Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.Designer.cs @@ -0,0 +1,165 @@ +namespace Histacom2.GlobalPrograms.InstallerPanes +{ + partial class DirectoryPane + { + /// + /// 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.panel1 = new System.Windows.Forms.Panel(); + this.classicLabel2 = new Histacom2.Engine.UI.ClassicLabel(); + this.classicLabel1 = new Histacom2.Engine.UI.ClassicLabel(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.classicLabel3 = new Histacom2.Engine.UI.ClassicLabel(); + this.classicLabel4 = new Histacom2.Engine.UI.ClassicLabel(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.classicLabel5 = new Histacom2.Engine.UI.ClassicLabel(); + this.classicButton1 = new Histacom2.Engine.UI.ClassicButton(); + this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.pictureBox1); + this.panel1.Controls.Add(this.classicLabel2); + this.panel1.Controls.Add(this.classicLabel1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(495, 58); + this.panel1.TabIndex = 0; + // + // classicLabel2 + // + this.classicLabel2.Location = new System.Drawing.Point(40, 28); + this.classicLabel2.Name = "classicLabel2"; + this.classicLabel2.Size = new System.Drawing.Size(259, 13); + this.classicLabel2.TabIndex = 1; + this.classicLabel2.Text = "Select folder where setup will install files."; + // + // classicLabel1 + // + this.classicLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.classicLabel1.Location = new System.Drawing.Point(25, 12); + this.classicLabel1.Name = "classicLabel1"; + this.classicLabel1.Size = new System.Drawing.Size(274, 13); + this.classicLabel1.TabIndex = 0; + this.classicLabel1.Text = "Choose Destination L o c a t i o n"; + // + // pictureBox1 + // + this.pictureBox1.BackgroundImage = global::Histacom2.Properties.Resources.WinClassicInstallIcon; + this.pictureBox1.Location = new System.Drawing.Point(440, 2); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(53, 53); + this.pictureBox1.TabIndex = 2; + this.pictureBox1.TabStop = false; + // + // classicLabel3 + // + this.classicLabel3.Location = new System.Drawing.Point(25, 73); + this.classicLabel3.Name = "classicLabel3"; + this.classicLabel3.Size = new System.Drawing.Size(446, 13); + this.classicLabel3.TabIndex = 1; + this.classicLabel3.Text = "Setup will install Program to the destination folder."; + // + // classicLabel4 + // + this.classicLabel4.Location = new System.Drawing.Point(25, 99); + this.classicLabel4.Name = "classicLabel4"; + this.classicLabel4.Size = new System.Drawing.Size(446, 26); + this.classicLabel4.TabIndex = 2; + this.classicLabel4.Text = "To install to the default folder, click Next. To install to a different folder, c" + + "lick Browse and select another folder."; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.classicButton1); + this.groupBox1.Controls.Add(this.classicLabel5); + this.groupBox1.Location = new System.Drawing.Point(24, 231); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(447, 50); + this.groupBox1.TabIndex = 3; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Destination Folder"; + // + // classicLabel5 + // + this.classicLabel5.Location = new System.Drawing.Point(12, 22); + this.classicLabel5.Name = "classicLabel5"; + this.classicLabel5.Size = new System.Drawing.Size(311, 13); + this.classicLabel5.TabIndex = 0; + this.classicLabel5.Text = "C:\\Program Files\\12padams\\Program\\"; + // + // 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(365, 16); + this.classicButton1.Name = "classicButton1"; + this.classicButton1.Size = new System.Drawing.Size(75, 23); + this.classicButton1.TabIndex = 1; + this.classicButton1.Text = "B&rowse..."; + // + // DirectoryPane + // + 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.groupBox1); + this.Controls.Add(this.classicLabel4); + this.Controls.Add(this.classicLabel3); + this.Controls.Add(this.panel1); + this.Name = "DirectoryPane"; + this.Size = new System.Drawing.Size(495, 314); + this.Load += new System.EventHandler(this.DirectoryPane_Load); + this.panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.groupBox1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private Engine.UI.ClassicLabel classicLabel1; + private Engine.UI.ClassicLabel classicLabel2; + private System.Windows.Forms.PictureBox pictureBox1; + private Engine.UI.ClassicLabel classicLabel3; + private Engine.UI.ClassicLabel classicLabel4; + private System.Windows.Forms.GroupBox groupBox1; + private Engine.UI.ClassicButton classicButton1; + private Engine.UI.ClassicLabel classicLabel5; + } +} diff --git a/Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.cs b/Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.cs new file mode 100644 index 0000000..7e415dd --- /dev/null +++ b/Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.cs @@ -0,0 +1,26 @@ +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.GlobalPrograms.InstallerPanes +{ + public partial class DirectoryPane : UserControl + { + public DirectoryPane() + { + InitializeComponent(); + } + + private void DirectoryPane_Load(object sender, EventArgs e) + { + classicLabel3.Text = $"Setup will install {((WinClassicInstaller)Parent.Parent).progName} to the destination folder."; + classicLabel5.Text = $"C:\\Program Files\\12padams\\{((WinClassicInstaller)Parent.Parent).progName}\\"; + } + } +} diff --git a/Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.resx b/Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.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/GlobalPrograms/WinClassicInstaller.Designer.cs b/Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs index c8bea62..246f7aa 100644 --- a/Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs +++ b/Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs @@ -32,6 +32,7 @@ this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.classicButton1 = new Histacom2.Engine.UI.ClassicButton(); this.classicButton2 = new Histacom2.Engine.UI.ClassicButton(); + this.classicButton3 = new Histacom2.Engine.UI.ClassicButton(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // @@ -80,12 +81,30 @@ this.classicButton2.Size = new System.Drawing.Size(75, 23); this.classicButton2.TabIndex = 3; this.classicButton2.Text = "&Next >"; + this.classicButton2.Click += new System.EventHandler(this.classicButton2_Click); + // + // classicButton3 + // + this.classicButton3.AdaptBackColorWithTheme = true; + this.classicButton3.AdaptFontWithTheme = true; + this.classicButton3.AdaptForeColorWithTheme = true; + this.classicButton3.BackColor = System.Drawing.Color.Silver; + this.classicButton3.DialogResult = System.Windows.Forms.DialogResult.None; + this.classicButton3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.classicButton3.ForeColor = System.Drawing.Color.Black; + this.classicButton3.Location = new System.Drawing.Point(248, 326); + this.classicButton3.Name = "classicButton3"; + this.classicButton3.Size = new System.Drawing.Size(75, 23); + this.classicButton3.TabIndex = 4; + this.classicButton3.Text = "< &Back"; + this.classicButton3.Visible = false; // // WinClassicInstaller // 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.classicButton3); this.Controls.Add(this.classicButton2); this.Controls.Add(this.classicButton1); this.Controls.Add(this.pictureBox1); @@ -106,5 +125,6 @@ private System.Windows.Forms.PictureBox pictureBox1; private Engine.UI.ClassicButton classicButton1; private Engine.UI.ClassicButton classicButton2; + private Engine.UI.ClassicButton classicButton3; } } diff --git a/Histacom2/GlobalPrograms/WinClassicInstaller.cs b/Histacom2/GlobalPrograms/WinClassicInstaller.cs index 8f262fb..ff1b7c4 100644 --- a/Histacom2/GlobalPrograms/WinClassicInstaller.cs +++ b/Histacom2/GlobalPrograms/WinClassicInstaller.cs @@ -26,5 +26,18 @@ namespace Histacom2.GlobalPrograms var welkom = new InstallerPanes.WelcomePane(); welkom.Parent = panel1; } + + private void classicButton2_Click(object sender, EventArgs e) + { + classicButton3.Show(); + + panel1.Controls.Clear(); + + if (state == 0) + { + var dir = new InstallerPanes.DirectoryPane(); + dir.Parent = panel1; + } + } } } diff --git a/Histacom2/Histacom2.csproj b/Histacom2/Histacom2.csproj index fc87093..2411b68 100644 --- a/Histacom2/Histacom2.csproj +++ b/Histacom2/Histacom2.csproj @@ -132,6 +132,12 @@ AchievementBox.cs + + UserControl + + + DirectoryPane.cs + UserControl @@ -413,6 +419,9 @@ AchievementBox.cs + + DirectoryPane.cs + WelcomePane.cs @@ -784,6 +793,7 @@ + diff --git a/Histacom2/Properties/Resources.resx b/Histacom2/Properties/Resources.resx index 366c7a9..16044e5 100644 --- a/Histacom2/Properties/Resources.resx +++ b/Histacom2/Properties/Resources.resx @@ -1954,6 +1954,9 @@ ..\Resources\IE4\IE4Home_WinTechLogo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\WinClassic\WinClassicInstallIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\WinClassic\WinClassicInstallSidebar.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/Histacom2/Properties/Resources1.Designer.cs b/Histacom2/Properties/Resources1.Designer.cs index 465250d..8c290f0 100644 --- a/Histacom2/Properties/Resources1.Designer.cs +++ b/Histacom2/Properties/Resources1.Designer.cs @@ -1703,6 +1703,16 @@ namespace Histacom2.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap WinClassicInstallIcon { + get { + object obj = ResourceManager.GetObject("WinClassicInstallIcon", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/Histacom2/Resources/WinClassic/WinClassicInstallIcon.png b/Histacom2/Resources/WinClassic/WinClassicInstallIcon.png new file mode 100644 index 0000000..edfcba0 Binary files /dev/null and b/Histacom2/Resources/WinClassic/WinClassicInstallIcon.png differ -- cgit v1.2.3 From 1ee3e00f8f0ee879fce4edf7d1ba9889335bc826 Mon Sep 17 00:00:00 2001 From: lempamo Date: Sat, 23 Sep 2017 12:23:10 -0400 Subject: EULA Pane & Disabled buttons --- Histacom2.Engine/UI/ClassicButton.cs | 8 +- .../InstallerPanes/DirectoryPane.Designer.cs | 8 +- .../GlobalPrograms/InstallerPanes/DirectoryPane.cs | 3 + .../InstallerPanes/EULAPane.Designer.cs | 159 +++++++++++++++++++++ .../GlobalPrograms/InstallerPanes/EULAPane.cs | 28 ++++ .../GlobalPrograms/InstallerPanes/EULAPane.resx | 137 ++++++++++++++++++ .../GlobalPrograms/WinClassicInstaller.Designer.cs | 1 + Histacom2/GlobalPrograms/WinClassicInstaller.cs | 6 +- Histacom2/Histacom2.csproj | 9 ++ 9 files changed, 350 insertions(+), 9 deletions(-) create mode 100644 Histacom2/GlobalPrograms/InstallerPanes/EULAPane.Designer.cs create mode 100644 Histacom2/GlobalPrograms/InstallerPanes/EULAPane.cs create mode 100644 Histacom2/GlobalPrograms/InstallerPanes/EULAPane.resx (limited to 'Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs') diff --git a/Histacom2.Engine/UI/ClassicButton.cs b/Histacom2.Engine/UI/ClassicButton.cs index 29b3a3b..4ccdbe6 100644 --- a/Histacom2.Engine/UI/ClassicButton.cs +++ b/Histacom2.Engine/UI/ClassicButton.cs @@ -63,16 +63,17 @@ namespace Histacom2.Engine.UI g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit; StringFormat sf = new StringFormat(); sf.Alignment = StringAlignment.Center; + sf.LineAlignment = StringAlignment.Center; sf.HotkeyPrefix = System.Drawing.Text.HotkeyPrefix.Show; - if (_pressing) + if (_pressing && Enabled) { g.FillRectangle(new SolidBrush(_lightBack), new Rectangle(0, 0, Width, Height)); g.FillRectangle(Brushes.Black, new Rectangle(0, 0, Width - 1, Height - 1)); g.FillRectangle(new SolidBrush(_darkBack), new Rectangle(1, 1, Width - 2, Height - 2)); g.FillRectangle(new SolidBrush(BackColor), new Rectangle(2, 2, Width - 3, Height - 3)); - g.DrawString(Text, Font, new SolidBrush(ForeColor), ((Width / 2) + 1) + Padding.Left, (Height / 2) - (g.MeasureString(Text, Font).Height / 2) + 2, sf); + g.DrawString(Text, Font, new SolidBrush(ForeColor), new Rectangle(2, 2, Width - 3, Height - 3), sf); } else { @@ -81,7 +82,8 @@ namespace Histacom2.Engine.UI g.FillRectangle(new SolidBrush(_darkBack), new Rectangle(1, 1, Width - 2, Height - 2)); g.FillRectangle(new SolidBrush(BackColor), new Rectangle(1, 1, Width - 3, Height - 3)); - g.DrawString(Text, Font, new SolidBrush(ForeColor), (Width / 2) + Padding.Left, (Height / 2) - (g.MeasureString(Text, Font).Height / 2) + 1, sf); + if (Enabled) g.DrawString(Text, Font, new SolidBrush(ForeColor), new Rectangle(1, 1, Width - 3, Height - 3), sf); + else g.DrawString(Text, Font, new SolidBrush(_darkBack), new Rectangle(1, 1, Width - 3, Height - 3), sf); } } diff --git a/Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.Designer.cs b/Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.Designer.cs index 6759dd9..6946002 100644 --- a/Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.Designer.cs +++ b/Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.Designer.cs @@ -101,16 +101,16 @@ // this.groupBox1.Controls.Add(this.classicButton1); this.groupBox1.Controls.Add(this.classicLabel5); - this.groupBox1.Location = new System.Drawing.Point(24, 231); + this.groupBox1.Location = new System.Drawing.Point(24, 225); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(447, 50); + this.groupBox1.Size = new System.Drawing.Size(447, 56); this.groupBox1.TabIndex = 3; this.groupBox1.TabStop = false; this.groupBox1.Text = "Destination Folder"; // // classicLabel5 // - this.classicLabel5.Location = new System.Drawing.Point(12, 22); + this.classicLabel5.Location = new System.Drawing.Point(12, 27); this.classicLabel5.Name = "classicLabel5"; this.classicLabel5.Size = new System.Drawing.Size(311, 13); this.classicLabel5.TabIndex = 0; @@ -125,7 +125,7 @@ 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(365, 16); + this.classicButton1.Location = new System.Drawing.Point(365, 22); this.classicButton1.Name = "classicButton1"; this.classicButton1.Size = new System.Drawing.Size(75, 23); this.classicButton1.TabIndex = 1; diff --git a/Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.cs b/Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.cs index 7e415dd..ae30ae0 100644 --- a/Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.cs +++ b/Histacom2/GlobalPrograms/InstallerPanes/DirectoryPane.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using Histacom2.Engine; namespace Histacom2.GlobalPrograms.InstallerPanes { @@ -21,6 +22,8 @@ namespace Histacom2.GlobalPrograms.InstallerPanes { classicLabel3.Text = $"Setup will install {((WinClassicInstaller)Parent.Parent).progName} to the destination folder."; classicLabel5.Text = $"C:\\Program Files\\12padams\\{((WinClassicInstaller)Parent.Parent).progName}\\"; + + groupBox1.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular); } } } diff --git a/Histacom2/GlobalPrograms/InstallerPanes/EULAPane.Designer.cs b/Histacom2/GlobalPrograms/InstallerPanes/EULAPane.Designer.cs new file mode 100644 index 0000000..90dbbb1 --- /dev/null +++ b/Histacom2/GlobalPrograms/InstallerPanes/EULAPane.Designer.cs @@ -0,0 +1,159 @@ +namespace Histacom2.GlobalPrograms.InstallerPanes +{ + partial class EULAPane + { + /// + /// 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() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EULAPane)); + this.panel1 = new System.Windows.Forms.Panel(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.classicLabel2 = new Histacom2.Engine.UI.ClassicLabel(); + this.classicLabel1 = new Histacom2.Engine.UI.ClassicLabel(); + this.classicLabel3 = new Histacom2.Engine.UI.ClassicLabel(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.radioButton1 = new System.Windows.Forms.RadioButton(); + this.radioButton2 = new System.Windows.Forms.RadioButton(); + this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.pictureBox1); + this.panel1.Controls.Add(this.classicLabel2); + this.panel1.Controls.Add(this.classicLabel1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(495, 58); + this.panel1.TabIndex = 0; + // + // pictureBox1 + // + this.pictureBox1.BackgroundImage = global::Histacom2.Properties.Resources.WinClassicInstallIcon; + this.pictureBox1.Location = new System.Drawing.Point(440, 2); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(53, 53); + this.pictureBox1.TabIndex = 2; + this.pictureBox1.TabStop = false; + // + // classicLabel2 + // + this.classicLabel2.Location = new System.Drawing.Point(40, 28); + this.classicLabel2.Name = "classicLabel2"; + this.classicLabel2.Size = new System.Drawing.Size(394, 13); + this.classicLabel2.TabIndex = 1; + this.classicLabel2.Text = "Please read the following important information before continuing."; + // + // classicLabel1 + // + this.classicLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.classicLabel1.Location = new System.Drawing.Point(25, 12); + this.classicLabel1.Name = "classicLabel1"; + this.classicLabel1.Size = new System.Drawing.Size(274, 13); + this.classicLabel1.TabIndex = 0; + this.classicLabel1.Text = "License  Agree m e n t"; + // + // classicLabel3 + // + this.classicLabel3.Location = new System.Drawing.Point(25, 73); + this.classicLabel3.Name = "classicLabel3"; + this.classicLabel3.Size = new System.Drawing.Size(457, 26); + this.classicLabel3.TabIndex = 1; + this.classicLabel3.Text = "Please read the following license agreement. You must accept the terms of this ag" + + "reement before continuing with the installation."; + // + // textBox1 + // + this.textBox1.BackColor = System.Drawing.Color.White; + this.textBox1.Location = new System.Drawing.Point(25, 105); + this.textBox1.Multiline = true; + this.textBox1.Name = "textBox1"; + this.textBox1.ReadOnly = true; + this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.textBox1.Size = new System.Drawing.Size(446, 147); + this.textBox1.TabIndex = 2; + this.textBox1.Text = resources.GetString("textBox1.Text"); + // + // radioButton1 + // + this.radioButton1.AutoSize = true; + this.radioButton1.BackColor = System.Drawing.Color.Silver; + this.radioButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.radioButton1.Location = new System.Drawing.Point(25, 259); + this.radioButton1.Name = "radioButton1"; + this.radioButton1.Size = new System.Drawing.Size(134, 17); + this.radioButton1.TabIndex = 3; + this.radioButton1.Text = "I &accept the agreement"; + this.radioButton1.UseVisualStyleBackColor = false; + // + // radioButton2 + // + this.radioButton2.AutoSize = true; + this.radioButton2.Checked = true; + this.radioButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.radioButton2.Location = new System.Drawing.Point(25, 280); + this.radioButton2.Name = "radioButton2"; + this.radioButton2.Size = new System.Drawing.Size(167, 17); + this.radioButton2.TabIndex = 4; + this.radioButton2.TabStop = true; + this.radioButton2.Text = "I &do not accept the agreement"; + this.radioButton2.UseVisualStyleBackColor = true; + // + // EULAPane + // + 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.radioButton2); + this.Controls.Add(this.radioButton1); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.classicLabel3); + this.Controls.Add(this.panel1); + this.Name = "EULAPane"; + this.Size = new System.Drawing.Size(495, 314); + this.Load += new System.EventHandler(this.DirectoryPane_Load); + this.panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private Engine.UI.ClassicLabel classicLabel1; + private Engine.UI.ClassicLabel classicLabel2; + private System.Windows.Forms.PictureBox pictureBox1; + private Engine.UI.ClassicLabel classicLabel3; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.RadioButton radioButton1; + private System.Windows.Forms.RadioButton radioButton2; + } +} diff --git a/Histacom2/GlobalPrograms/InstallerPanes/EULAPane.cs b/Histacom2/GlobalPrograms/InstallerPanes/EULAPane.cs new file mode 100644 index 0000000..c477836 --- /dev/null +++ b/Histacom2/GlobalPrograms/InstallerPanes/EULAPane.cs @@ -0,0 +1,28 @@ +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; +using Histacom2.Engine; + +namespace Histacom2.GlobalPrograms.InstallerPanes +{ + public partial class EULAPane : UserControl + { + public EULAPane() + { + InitializeComponent(); + } + + private void DirectoryPane_Load(object sender, EventArgs e) + { + textBox1.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular); + radioButton1.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular); + radioButton2.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular); + } + } +} diff --git a/Histacom2/GlobalPrograms/InstallerPanes/EULAPane.resx b/Histacom2/GlobalPrograms/InstallerPanes/EULAPane.resx new file mode 100644 index 0000000..fec481c --- /dev/null +++ b/Histacom2/GlobalPrograms/InstallerPanes/EULAPane.resx @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + By installing this software you agree that you will not try to reverse engineer it in anyway or claim it as your own work. + +You agree that you will not try to spread this software or any of its components to other companies without rightful permission from the owner. + +You agree that if you bought this program, you own it and that nobody else is allowed to use it on your computer or on their computer. + +You understand that trying to upload this software online or any other forms of spreading this software will result in the FBI coming into your home and killing you with knives. + +You agree that taking a picture of this software and sending it to someone will cause you to get 15 years in jail for software exposing. + +You agree that if you tell someone else about this software's features that you will wake up dead in the morning because the owner would have killed you in your sleep. + +You know that using this software will alert the maker of it and then cause him to monitor every moment of your life after you install this software. + +You agree to all of the above and will not commit any of the crimes otherwise you will go to Hell. + + \ No newline at end of file diff --git a/Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs b/Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs index 246f7aa..20688b5 100644 --- a/Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs +++ b/Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs @@ -90,6 +90,7 @@ this.classicButton3.AdaptForeColorWithTheme = true; this.classicButton3.BackColor = System.Drawing.Color.Silver; this.classicButton3.DialogResult = System.Windows.Forms.DialogResult.None; + this.classicButton3.Enabled = false; this.classicButton3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.classicButton3.ForeColor = System.Drawing.Color.Black; this.classicButton3.Location = new System.Drawing.Point(248, 326); diff --git a/Histacom2/GlobalPrograms/WinClassicInstaller.cs b/Histacom2/GlobalPrograms/WinClassicInstaller.cs index ff1b7c4..4e0098c 100644 --- a/Histacom2/GlobalPrograms/WinClassicInstaller.cs +++ b/Histacom2/GlobalPrograms/WinClassicInstaller.cs @@ -35,8 +35,10 @@ namespace Histacom2.GlobalPrograms if (state == 0) { - var dir = new InstallerPanes.DirectoryPane(); - dir.Parent = panel1; + var eula = new InstallerPanes.EULAPane(); + eula.Parent = panel1; + state = 1; + classicButton2.Enabled = false; } } } diff --git a/Histacom2/Histacom2.csproj b/Histacom2/Histacom2.csproj index 2411b68..1edcc08 100644 --- a/Histacom2/Histacom2.csproj +++ b/Histacom2/Histacom2.csproj @@ -132,6 +132,12 @@ AchievementBox.cs + + UserControl + + + EULAPane.cs + UserControl @@ -419,6 +425,9 @@ AchievementBox.cs + + EULAPane.cs + DirectoryPane.cs -- cgit v1.2.3