From 7ce95f837d4318397e6749250e53fe7a85fe8f77 Mon Sep 17 00:00:00 2001 From: lempamo Date: Sun, 15 Oct 2017 11:40:01 -0400 Subject: [PATCH] hack3 made --- Histacom2.Engine/Histacom2.Engine.csproj | 3 +++ Histacom2.Engine/UI/ClassicLabel.cs | 2 +- Histacom2/Histacom2.csproj | 2 +- .../Win95/Win95Apps/WebChat1998.Designer.cs | 2 +- Histacom2/OS/Win98/Win98.Designer.cs | 1 + Histacom2/OS/Win98/Win98.cs | 10 +++++++--- Histacom2/OS/Win98/Win98Apps/Story/Hack3.cs | 19 +++++++++++++++++++ .../WinClassicTimeDistorter2.Designer.cs | 9 +++++++++ .../Win98Apps/WinClassicTimeDistorter2.cs | 15 +++++++++++++++ .../Win98Apps/WinClassicTimeDistorter2.resx | 3 +++ 10 files changed, 60 insertions(+), 6 deletions(-) create mode 100644 Histacom2/OS/Win98/Win98Apps/Story/Hack3.cs diff --git a/Histacom2.Engine/Histacom2.Engine.csproj b/Histacom2.Engine/Histacom2.Engine.csproj index 889c071..ec3fad8 100644 --- a/Histacom2.Engine/Histacom2.Engine.csproj +++ b/Histacom2.Engine/Histacom2.Engine.csproj @@ -138,6 +138,9 @@ WinXP.cs + + ClassicLabel.cs + diff --git a/Histacom2.Engine/UI/ClassicLabel.cs b/Histacom2.Engine/UI/ClassicLabel.cs index f207eb1..c7007bd 100644 --- a/Histacom2.Engine/UI/ClassicLabel.cs +++ b/Histacom2.Engine/UI/ClassicLabel.cs @@ -14,7 +14,7 @@ public class ClassicLabel : Control { public ClassicLabel() { - + TextChanged += (s, e) => Invalidate(); } protected override void OnPaint(PaintEventArgs e) diff --git a/Histacom2/Histacom2.csproj b/Histacom2/Histacom2.csproj index da772b6..b47b4ff 100644 --- a/Histacom2/Histacom2.csproj +++ b/Histacom2/Histacom2.csproj @@ -322,6 +322,7 @@ IENoPage.cs + UserControl @@ -868,7 +869,6 @@ - diff --git a/Histacom2/OS/Win95/Win95Apps/WebChat1998.Designer.cs b/Histacom2/OS/Win95/Win95Apps/WebChat1998.Designer.cs index 05e6add..314bf7b 100644 --- a/Histacom2/OS/Win95/Win95Apps/WebChat1998.Designer.cs +++ b/Histacom2/OS/Win95/Win95Apps/WebChat1998.Designer.cs @@ -29,7 +29,7 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WebChat1998)); + this.resources = new System.ComponentModel.ComponentResourceManager(typeof(WebChat1998)); this.Chat = new System.Windows.Forms.Timer(this.components); this.listBox1 = new System.Windows.Forms.ListBox(); this.label1 = new Histacom2.Engine.UI.ClassicLabel(); diff --git a/Histacom2/OS/Win98/Win98.Designer.cs b/Histacom2/OS/Win98/Win98.Designer.cs index e2cf49c..30b31bb 100644 --- a/Histacom2/OS/Win98/Win98.Designer.cs +++ b/Histacom2/OS/Win98/Win98.Designer.cs @@ -704,6 +704,7 @@ private void InitializeComponent() this.TimeDistorterToolStripMenuItem.Size = new System.Drawing.Size(181, 28); this.TimeDistorterToolStripMenuItem.Text = "Time Distorter"; this.TimeDistorterToolStripMenuItem.Visible = false; + this.TimeDistorterToolStripMenuItem.Click += new System.EventHandler(TimeDistorterToolStripMenuItem_Click); // // DocumentsToolStripMenuItem // diff --git a/Histacom2/OS/Win98/Win98.cs b/Histacom2/OS/Win98/Win98.cs index 3365def..3795c8b 100644 --- a/Histacom2/OS/Win98/Win98.cs +++ b/Histacom2/OS/Win98/Win98.cs @@ -21,7 +21,7 @@ public partial class Windows98 : Form public WindowManager wm = new WindowManager(); public List nonimportantapps = new List(); - public WinClassic webchat; + public WebChat1999 webchat; public WinClassic ie; public TaskBarController tb = new TaskBarController(); @@ -331,13 +331,16 @@ private void infoboxTestToolStripMenuItem_Click(object sender, EventArgs e) } private void WebChatToolStripMenuItem_Click(object sender, EventArgs e) { - WebChat1999 wc = new WebChat1999(); - WinClassic app = wm.Init(wc, "Web Chat 1999", null, true, true); + if (webchat != null) return; + webchat = new WebChat1999(); + WinClassic app = wm.Init(webchat, "Web Chat 1999", null, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Web Chat 1999", null); app.BringToFront(); startmenu.Hide(); + + app.FormClosing += (s, fe) => webchat = null; } public void NonImportantApp_Closing(object sender, FormClosingEventArgs e) { @@ -456,6 +459,7 @@ private void PropertiesToolStripMenuItem1_Click(object sender, EventArgs e) private void TimeDistorterToolStripMenuItem_Click(object sender, EventArgs e) { + if (distort != null) return; distort = new WinClassicTimeDistorter2(); WinClassic app = wm.Init(distort, "Time Distorter", null, false, false, false); AddTaskBarItem(app, app.Tag.ToString(), "Time Distorter", null); diff --git a/Histacom2/OS/Win98/Win98Apps/Story/Hack3.cs b/Histacom2/OS/Win98/Win98Apps/Story/Hack3.cs new file mode 100644 index 0000000..9758a7e --- /dev/null +++ b/Histacom2/OS/Win98/Win98Apps/Story/Hack3.cs @@ -0,0 +1,19 @@ +using Histacom2.Engine; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Histacom2.OS.Win98.Win98Apps.Story +{ + public class Hack3 : object + { + static WindowManager wm = new WindowManager(); + + public static async void StartObjective() + { + + } + } +} diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicTimeDistorter2.Designer.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicTimeDistorter2.Designer.cs index 1b32d32..57ce08a 100644 --- a/Histacom2/OS/Win98/Win98Apps/WinClassicTimeDistorter2.Designer.cs +++ b/Histacom2/OS/Win98/Win98Apps/WinClassicTimeDistorter2.Designer.cs @@ -28,11 +28,13 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.classicButton1 = new Histacom2.Engine.UI.ClassicButton(); this.classicLabel1 = new Histacom2.Engine.UI.ClassicLabel(); this.classicLabel2 = new Histacom2.Engine.UI.ClassicLabel(); this.classicLabel3 = new Histacom2.Engine.UI.ClassicLabel(); this.classicLabel4 = new Histacom2.Engine.UI.ClassicLabel(); + this.timer1 = new System.Windows.Forms.Timer(this.components); this.SuspendLayout(); // // classicButton1 @@ -50,6 +52,7 @@ private void InitializeComponent() this.classicButton1.Size = new System.Drawing.Size(276, 23); this.classicButton1.TabIndex = 0; this.classicButton1.Text = "Take me to 2000!"; + this.classicButton1.Click += new System.EventHandler(this.classicButton1_Click); // // classicLabel1 // @@ -90,6 +93,11 @@ private void InitializeComponent() this.classicLabel4.Text = "Preparing to travel. ETA: N/A secs."; this.classicLabel4.Visible = false; // + // timer1 + // + this.timer1.Interval = 1000; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // // WinClassicTimeDistorter2 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -113,5 +121,6 @@ private void InitializeComponent() private Engine.UI.ClassicLabel classicLabel2; private Engine.UI.ClassicLabel classicLabel3; private Engine.UI.ClassicLabel classicLabel4; + private System.Windows.Forms.Timer timer1; } } diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicTimeDistorter2.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicTimeDistorter2.cs index 62c055b..764a615 100644 --- a/Histacom2/OS/Win98/Win98Apps/WinClassicTimeDistorter2.cs +++ b/Histacom2/OS/Win98/Win98Apps/WinClassicTimeDistorter2.cs @@ -12,9 +12,24 @@ namespace Histacom2.OS.Win98.Win98Apps { public partial class WinClassicTimeDistorter2 : UserControl { + public int secsLeft = 180; + public WinClassicTimeDistorter2() { InitializeComponent(); } + + private void classicButton1_Click(object sender, EventArgs e) + { + classicButton1.Hide(); + classicLabel4.Show(); + classicLabel4.Text = "Preparing to travel. ETA: 180 secs."; + timer1.Start(); + } + + private void timer1_Tick(object sender, EventArgs e) + { + classicLabel4.Text = $"Preparing to travel. ETA: {secsLeft--} secs."; + } } } diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicTimeDistorter2.resx b/Histacom2/OS/Win98/Win98Apps/WinClassicTimeDistorter2.resx index 1af7de1..1f666f2 100644 --- a/Histacom2/OS/Win98/Win98Apps/WinClassicTimeDistorter2.resx +++ b/Histacom2/OS/Win98/Win98Apps/WinClassicTimeDistorter2.resx @@ -117,4 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + \ No newline at end of file