From 26f2a5fb9e4c19ce4d2feac2565eac5319f0f9d8 Mon Sep 17 00:00:00 2001 From: jtsshieh Date: Wed, 5 Jul 2017 12:54:34 -0400 Subject: Welcome Page Working welcome page for winn95 except I cannot get the system to save the settings so it will appear every single time! --- TimeHACK.Main/OS/Win95/Win95.cs | 18 ++- .../Win95/Win95Apps/WinClassicWelcome.Designer.cs | 173 +++++++++++++++++++++ .../OS/Win95/Win95Apps/WinClassicWelcome.cs | 25 +++ .../OS/Win95/Win95Apps/WinClassicWelcome.resx | 120 ++++++++++++++ 4 files changed, 335 insertions(+), 1 deletion(-) create mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWelcome.Designer.cs create mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWelcome.cs create mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWelcome.resx (limited to 'TimeHACK.Main/OS') diff --git a/TimeHACK.Main/OS/Win95/Win95.cs b/TimeHACK.Main/OS/Win95/Win95.cs index 3bd63b5..6a4addf 100644 --- a/TimeHACK.Main/OS/Win95/Win95.cs +++ b/TimeHACK.Main/OS/Win95/Win95.cs @@ -10,7 +10,7 @@ using TimeHACK.Engine.Template.Taskbars; using TimeHACK.OS.Win95.Win95Apps; using TimeHACK.WinClassicForms; using TimeHACK.OS.Win95.Win95Apps.Story; - +using static TimeHACK.Engine.SaveSystem; namespace TimeHACK.OS.Win95 { @@ -96,6 +96,22 @@ namespace TimeHACK.OS.Win95 // Bring to this the front this.BringToFront(); + + //Check if it is the first time + if (CurrentSave.FTime95 == false) + { + CurrentSave.FTime95 = true; + WinClassicWelcome welcome = new WinClassicWelcome(); + WinClassic app = wm.StartWin95(welcome, "Welcome", null, false, false); + AddTaskBarItem(app, app.Tag.ToString(), "Welcome", null); + + nonimportantapps.Add(app); + nonimportantapps[nonimportantapps.Count - 1].BringToFront(); + nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing); + + app.BringToFront(); + + } } private void fontLoad() diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWelcome.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWelcome.Designer.cs new file mode 100644 index 0000000..8e26658 --- /dev/null +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWelcome.Designer.cs @@ -0,0 +1,173 @@ +namespace TimeHACK.OS.Win95.Win95Apps +{ + partial class WinClassicWelcome + { + /// + /// 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.pictureBox2 = new System.Windows.Forms.PictureBox(); + this.btnClose = new System.Windows.Forms.Button(); + this.btnOnline = new System.Windows.Forms.Button(); + this.btnNew = new System.Windows.Forms.Button(); + this.btnTour = new System.Windows.Forms.Button(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); + this.SuspendLayout(); + // + // pictureBox1 + // + this.pictureBox1.Image = global::TimeHACK.Properties.Resources.Win95Help; + this.pictureBox1.Location = new System.Drawing.Point(27, 69); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(384, 248); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBox1.TabIndex = 17; + this.pictureBox1.TabStop = false; + // + // pictureBox2 + // + this.pictureBox2.Image = global::TimeHACK.Properties.Resources.WinAboutSeparator95; + this.pictureBox2.Location = new System.Drawing.Point(445, 154); + this.pictureBox2.Name = "pictureBox2"; + this.pictureBox2.Size = new System.Drawing.Size(115, 10); + this.pictureBox2.TabIndex = 16; + this.pictureBox2.TabStop = false; + // + // btnClose + // + this.btnClose.BackColor = System.Drawing.Color.Silver; + this.btnClose.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnClose.Location = new System.Drawing.Point(443, 167); + this.btnClose.Name = "btnClose"; + this.btnClose.Size = new System.Drawing.Size(117, 23); + this.btnClose.TabIndex = 15; + this.btnClose.Text = "Close"; + this.btnClose.UseVisualStyleBackColor = false; + this.btnClose.Click += new System.EventHandler(this.btnClose_Click); + // + // btnOnline + // + this.btnOnline.BackColor = System.Drawing.Color.Silver; + this.btnOnline.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnOnline.Location = new System.Drawing.Point(443, 125); + this.btnOnline.Name = "btnOnline"; + this.btnOnline.Size = new System.Drawing.Size(117, 23); + this.btnOnline.TabIndex = 14; + this.btnOnline.Text = "Online Registration"; + this.btnOnline.UseVisualStyleBackColor = false; + // + // btnNew + // + this.btnNew.BackColor = System.Drawing.Color.Silver; + this.btnNew.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnNew.Location = new System.Drawing.Point(443, 96); + this.btnNew.Name = "btnNew"; + this.btnNew.Size = new System.Drawing.Size(117, 23); + this.btnNew.TabIndex = 13; + this.btnNew.Text = "What\'s new"; + this.btnNew.UseVisualStyleBackColor = false; + // + // btnTour + // + this.btnTour.BackColor = System.Drawing.Color.Silver; + this.btnTour.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnTour.Location = new System.Drawing.Point(445, 69); + this.btnTour.Name = "btnTour"; + this.btnTour.Size = new System.Drawing.Size(117, 23); + this.btnTour.TabIndex = 12; + this.btnTour.Text = "Windows Tour"; + this.btnTour.UseVisualStyleBackColor = false; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Segoe UI", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.ForeColor = System.Drawing.Color.White; + this.label3.Location = new System.Drawing.Point(378, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(62, 50); + this.label3.TabIndex = 11; + this.label3.Text = "95"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Segoe UI", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.Location = new System.Drawing.Point(209, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(184, 50); + this.label2.TabIndex = 10; + this.label2.Text = "Windows"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Segoe UI", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(3, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(219, 50); + this.label1.TabIndex = 9; + this.label1.Text = "Welcome to"; + // + // WinClassicWelcome + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.pictureBox1); + this.Controls.Add(this.pictureBox2); + this.Controls.Add(this.btnClose); + this.Controls.Add(this.btnOnline); + this.Controls.Add(this.btnNew); + this.Controls.Add(this.btnTour); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Name = "WinClassicWelcome"; + this.Size = new System.Drawing.Size(577, 344); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.PictureBox pictureBox2; + private System.Windows.Forms.Button btnClose; + private System.Windows.Forms.Button btnOnline; + private System.Windows.Forms.Button btnNew; + private System.Windows.Forms.Button btnTour; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + } +} diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWelcome.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWelcome.cs new file mode 100644 index 0000000..52a8938 --- /dev/null +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWelcome.cs @@ -0,0 +1,25 @@ +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 TimeHACK.OS.Win95.Win95Apps +{ + public partial class WinClassicWelcome : UserControl + { + public WinClassicWelcome() + { + InitializeComponent(); + } + + private void btnClose_Click(object sender, EventArgs e) + { + this.ParentForm.Close(); + } + } +} diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWelcome.resx b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWelcome.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWelcome.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 -- cgit v1.2.3