From 609deb1c4e9bdae400e92a008b99f9cc62b4f9c8 Mon Sep 17 00:00:00 2001 From: lempamo Date: Wed, 25 Oct 2017 00:18:50 -0400 Subject: close buttons glow when moused over in xp --- Histacom2.Engine/Histacom2.Engine.csproj | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Histacom2.Engine/Histacom2.Engine.csproj') diff --git a/Histacom2.Engine/Histacom2.Engine.csproj b/Histacom2.Engine/Histacom2.Engine.csproj index 3dee2f9..6abc85d 100644 --- a/Histacom2.Engine/Histacom2.Engine.csproj +++ b/Histacom2.Engine/Histacom2.Engine.csproj @@ -221,6 +221,8 @@ + + -- cgit v1.2.3 From e99433e1932c780c6b369ed656c26a11da41fe73 Mon Sep 17 00:00:00 2001 From: lempamo Date: Thu, 26 Oct 2017 00:03:57 -0400 Subject: more hack4 stuff --- Histacom2.Engine/Histacom2.Engine.csproj | 2 +- Histacom2.Engine/Paintbrush.cs | 5 +++++ .../Resources/WinXP/Window/WinXP_TopBar.png | Bin 241 -> 1452 bytes Histacom2.Engine/UI/ClassicButton.cs | 2 +- Histacom2.Engine/WindowManager.cs | 2 +- Histacom2/OS/WinXPBad/Story/Hack4.cs | 20 +++++++++++++++++++- 6 files changed, 27 insertions(+), 4 deletions(-) (limited to 'Histacom2.Engine/Histacom2.Engine.csproj') diff --git a/Histacom2.Engine/Histacom2.Engine.csproj b/Histacom2.Engine/Histacom2.Engine.csproj index 6abc85d..6f852ed 100644 --- a/Histacom2.Engine/Histacom2.Engine.csproj +++ b/Histacom2.Engine/Histacom2.Engine.csproj @@ -20,7 +20,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU pdbonly diff --git a/Histacom2.Engine/Paintbrush.cs b/Histacom2.Engine/Paintbrush.cs index cab493a..923d836 100644 --- a/Histacom2.Engine/Paintbrush.cs +++ b/Histacom2.Engine/Paintbrush.cs @@ -46,6 +46,11 @@ namespace Histacom2.Engine e.Graphics.DrawLine(new Pen(foreColor), 4, height / 2, width - 4, height / 2); } + /// + /// Get a color lighter than the input color. + /// + /// The color to lighten. + /// public static Color GetLightFromColor(Color basecolor) { if (basecolor == Color.Silver) return Color.White; diff --git a/Histacom2.Engine/Resources/WinXP/Window/WinXP_TopBar.png b/Histacom2.Engine/Resources/WinXP/Window/WinXP_TopBar.png index b251673..4ed8242 100644 Binary files a/Histacom2.Engine/Resources/WinXP/Window/WinXP_TopBar.png and b/Histacom2.Engine/Resources/WinXP/Window/WinXP_TopBar.png differ diff --git a/Histacom2.Engine/UI/ClassicButton.cs b/Histacom2.Engine/UI/ClassicButton.cs index 4ccdbe6..683b71b 100644 --- a/Histacom2.Engine/UI/ClassicButton.cs +++ b/Histacom2.Engine/UI/ClassicButton.cs @@ -94,7 +94,7 @@ namespace Histacom2.Engine.UI public void PerformClick() { - this.OnClick(new EventArgs()); + OnClick(EventArgs.Empty); } } } diff --git a/Histacom2.Engine/WindowManager.cs b/Histacom2.Engine/WindowManager.cs index 6dacee4..4829154 100644 --- a/Histacom2.Engine/WindowManager.cs +++ b/Histacom2.Engine/WindowManager.cs @@ -112,7 +112,7 @@ namespace Histacom2.Engine { app.programIcon.Hide(); app.programIcon.Image = Properties.Resources.nullIcon; - app.programname.Location = new Point(6, 6); + app.programname.Location = new Point(3, 6); } else app.programIcon.Image = icon; diff --git a/Histacom2/OS/WinXPBad/Story/Hack4.cs b/Histacom2/OS/WinXPBad/Story/Hack4.cs index bf6e6c9..70b80aa 100644 --- a/Histacom2/OS/WinXPBad/Story/Hack4.cs +++ b/Histacom2/OS/WinXPBad/Story/Hack4.cs @@ -22,7 +22,25 @@ namespace Histacom2.OS.WinXPBad.Story await Task.Delay(2500); Console.WriteLine("telnet> 104.27.135.159 Connected."); await Task.Delay(2500); Console.WriteLine("telnet> 104.27.135.159 set hostname to 'TheHiddenHacker'."); await Task.Delay(2500); Console.WriteLine("TheHiddenHacker> STOP!"); - await Task.Delay(3500); Console.WriteLine("TheHiddenHacker> DON'T OPEN INTERNET EXPLORER!"); + await Task.Delay(3000); Console.WriteLine("TheHiddenHacker> DON'T OPEN INTERNET EXPLORER!"); + await Task.Delay(3500); Console.WriteLine("TheHiddenHacker> the whole web is infected with a virus"); + await Task.Delay(3500); Console.WriteLine("TheHiddenHacker> and if you open internet explorer, your pc will get infected!"); + await Task.Delay(2500); Console.WriteLine("TheHiddenHacker> trust me"); + await Task.Delay(3500); Console.WriteLine("TheHiddenHacker> now i have a lot of things to tell you, so pay attention"); + await Task.Delay(3500); Console.WriteLine("TheHiddenHacker> the world is in chaos, and it all started back in 1999, right when you left"); + await Task.Delay(3500); Console.WriteLine("TheHiddenHacker> as you know, 12padams told me to let him know when you got to 2000"); + await Task.Delay(3500); Console.WriteLine("TheHiddenHacker> and he believed that you would get there without any problems"); + await Task.Delay(3500); Console.WriteLine("TheHiddenHacker> but, as you saw, you ended up travelling to 2002 instead of 2000"); + await Task.Delay(3500); Console.WriteLine("TheHiddenHacker> 2000 came and went, and when you never showed up"); + await Task.Delay(3500); Console.WriteLine("TheHiddenHacker> 12padams refused to believe that his program failed"); + await Task.Delay(3500); Console.WriteLine("TheHiddenHacker> and so he thought that you did make it to 2000 and i was hiding you"); + await Task.Delay(3000); Console.WriteLine("TheHiddenHacker> and he lost complete trust in me"); + await Task.Delay(3500); Console.WriteLine("TheHiddenHacker> later, in march 2001, 12padams made viruses to try to infect my pc"); + await Task.Delay(4500); Console.WriteLine("TheHiddenHacker> not only because he lost trust in me, but i also had the latest version of the time distorter"); + await Task.Delay(3000); Console.WriteLine("TheHiddenHacker> thankfully, i avoided those early viruses"); + await Task.Delay(3000); Console.WriteLine("TheHiddenHacker> but then, he released something dastardly"); + await Task.Delay(5000); Console.WriteLine("TheHiddenHacker> a virus that infected every single website, and people who visited infected websites got their computers infected and rendered unusable"); + await Task.Delay(4000); Console.WriteLine("TheHiddenHacker> now, its 2002. every website is infected, and 12padams has disappeared..."); } } } -- cgit v1.2.3 From 22f94867ba365ec2dd56026684a72905dbe5f5d3 Mon Sep 17 00:00:00 2001 From: lempamo Date: Sun, 29 Oct 2017 12:04:18 -0400 Subject: random virus labels work! --- Histacom2.Engine/Histacom2.Engine.csproj | 1 + Histacom2/OS/WinXPBad/Story/Hack4.cs | 19 +++++++++++++++++++ Histacom2/OS/WinXPBad/VirusLabel.Designer.cs | 4 +--- Histacom2/OS/WinXPBad/WinClassicIE6Bad.Designer.cs | 8 -------- Histacom2/OS/WinXPBad/WinClassicIE6Bad.cs | 20 +++++--------------- Histacom2/OS/WinXPBad/WinClassicIE6Bad.resx | 6 ------ 6 files changed, 26 insertions(+), 32 deletions(-) (limited to 'Histacom2.Engine/Histacom2.Engine.csproj') diff --git a/Histacom2.Engine/Histacom2.Engine.csproj b/Histacom2.Engine/Histacom2.Engine.csproj index 6f852ed..b10bd1c 100644 --- a/Histacom2.Engine/Histacom2.Engine.csproj +++ b/Histacom2.Engine/Histacom2.Engine.csproj @@ -49,6 +49,7 @@ + diff --git a/Histacom2/OS/WinXPBad/Story/Hack4.cs b/Histacom2/OS/WinXPBad/Story/Hack4.cs index 3ed2244..ced4a13 100644 --- a/Histacom2/OS/WinXPBad/Story/Hack4.cs +++ b/Histacom2/OS/WinXPBad/Story/Hack4.cs @@ -7,6 +7,7 @@ using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Windows.Forms; namespace Histacom2.OS.WinXPBad.Story { @@ -14,6 +15,8 @@ namespace Histacom2.OS.WinXPBad.Story { public static Win95.Win95Apps.WinClassicTerminal Console = new Win95.Win95Apps.WinClassicTerminal(true); static WindowManager wm = new WindowManager(); + public static bool Stop = false; + static Random Rnd = new Random(); public static async void StartObjective() { @@ -73,6 +76,7 @@ namespace Histacom2.OS.WinXPBad.Story public static async void VirusDestruction(WinClassicIE6Bad ie) { + LabelMaker(); Console.ParentForm.Close(); await Task.Delay(10000); ((WinXP)ie.ParentForm).maximizebutton.Image = ((WinXP)ie.ParentForm).closebutton.Image; await Task.Delay(1000); ((WinXP)ie.ParentForm).minimizebutton.Image = ((WinXP)ie.ParentForm).closebutton.Image; @@ -96,6 +100,21 @@ namespace Histacom2.OS.WinXPBad.Story await Task.Delay(1000); ie.backToolStripMenuItem.Visible = false; ie.panel1.Hide(); ie.label1.BackColor = Color.Black; await Task.Delay(1000); ie.label1.BackColor = Color.White; await Task.Delay(1000); ie.Hide(); + Stop = true; + } + + public static async void LabelMaker() + { + while (!Stop) + { + await Task.Delay(1000); + VirusLabel v = new VirusLabel(); + v.WindowState = FormWindowState.Maximized; + v.label1.Location = new Point(Rnd.Next(Screen.PrimaryScreen.Bounds.Width), Rnd.Next(Screen.PrimaryScreen.Bounds.Height)); + v.Show(); + v.TopMost = true; + v.BringToFront(); + } } } } diff --git a/Histacom2/OS/WinXPBad/VirusLabel.Designer.cs b/Histacom2/OS/WinXPBad/VirusLabel.Designer.cs index 34922ed..d711758 100644 --- a/Histacom2/OS/WinXPBad/VirusLabel.Designer.cs +++ b/Histacom2/OS/WinXPBad/VirusLabel.Designer.cs @@ -35,7 +35,6 @@ // // label1 // - this.label1.Dock = System.Windows.Forms.DockStyle.Fill; this.label1.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.ForeColor = System.Drawing.Color.PaleGreen; this.label1.Location = new System.Drawing.Point(0, 0); @@ -66,8 +65,7 @@ } #endregion - - private System.Windows.Forms.Label label1; private System.Windows.Forms.Timer timer1; + public System.Windows.Forms.Label label1; } } \ No newline at end of file diff --git a/Histacom2/OS/WinXPBad/WinClassicIE6Bad.Designer.cs b/Histacom2/OS/WinXPBad/WinClassicIE6Bad.Designer.cs index 1f51c7d..ca106d0 100644 --- a/Histacom2/OS/WinXPBad/WinClassicIE6Bad.Designer.cs +++ b/Histacom2/OS/WinXPBad/WinClassicIE6Bad.Designer.cs @@ -57,7 +57,6 @@ this.panel3 = new System.Windows.Forms.Panel(); this.label1 = new System.Windows.Forms.Label(); this.originalTimer = new System.Windows.Forms.Timer(this.components); - this.labelTimer = new System.Windows.Forms.Timer(this.components); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.menuStrip1.SuspendLayout(); @@ -318,12 +317,6 @@ this.originalTimer.Enabled = true; this.originalTimer.Tick += new System.EventHandler(this.originalTimer_Tick); // - // labelTimer - // - this.labelTimer.Enabled = true; - this.labelTimer.Interval = 1000; - this.labelTimer.Tick += new System.EventHandler(this.labelTimer_Tick); - // // WinClassicIE6Bad // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -366,7 +359,6 @@ private System.Windows.Forms.PictureBox pictureBox3; private System.Windows.Forms.Panel panel3; private System.Windows.Forms.Timer originalTimer; - private System.Windows.Forms.Timer labelTimer; public System.Windows.Forms.ToolStripMenuItem backToolStripMenuItem; public System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2; public System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3; diff --git a/Histacom2/OS/WinXPBad/WinClassicIE6Bad.cs b/Histacom2/OS/WinXPBad/WinClassicIE6Bad.cs index c4740fc..dfce481 100644 --- a/Histacom2/OS/WinXPBad/WinClassicIE6Bad.cs +++ b/Histacom2/OS/WinXPBad/WinClassicIE6Bad.cs @@ -15,11 +15,10 @@ namespace Histacom2.OS.WinXPBad public partial class WinClassicIE6Bad : UserControl { private bool light = true; - private Random r = new Random(); - private Random r2 = new Random(); + private static readonly Random Rnd = new Random(); - private int maxX; - private int maxY; + private int maxX = Screen.PrimaryScreen.Bounds.Width; + private int maxY = Screen.PrimaryScreen.Bounds.Height; public WinClassicIE6Bad() { @@ -40,19 +39,10 @@ namespace Histacom2.OS.WinXPBad } } - private void labelTimer_Tick(object sender, EventArgs e) - { - VirusLabel v = new VirusLabel(); - v.Location = new Point(r.Next(0, maxX), r2.Next(0, maxY)); - v.Show(); - v.TopMost = true; - v.BringToFront(); - } - private void WinClassicIE6Bad_Load(object sender, EventArgs e) { - maxX = Screen.PrimaryScreen.Bounds.Width; - maxY = Screen.PrimaryScreen.Bounds.Height; + Console.WriteLine($"{maxX}, {maxY}."); + Hack4.VirusDestruction(this); ((WinXP)ParentForm).closeDisabled = true; } diff --git a/Histacom2/OS/WinXPBad/WinClassicIE6Bad.resx b/Histacom2/OS/WinXPBad/WinClassicIE6Bad.resx index 7ce63c0..1f5eeb4 100644 --- a/Histacom2/OS/WinXPBad/WinClassicIE6Bad.resx +++ b/Histacom2/OS/WinXPBad/WinClassicIE6Bad.resx @@ -117,9 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 17, 17 - @@ -310,7 +307,4 @@ 247, 17 - - 370, 17 - \ No newline at end of file -- cgit v1.2.3 From 1b0053509bce231da4beaa6a4d4a373578a8d345 Mon Sep 17 00:00:00 2001 From: lempamo Date: Sun, 29 Oct 2017 12:08:57 -0400 Subject: should compile now --- Histacom2.Engine/Histacom2.Engine.csproj | 1 - 1 file changed, 1 deletion(-) (limited to 'Histacom2.Engine/Histacom2.Engine.csproj') diff --git a/Histacom2.Engine/Histacom2.Engine.csproj b/Histacom2.Engine/Histacom2.Engine.csproj index b10bd1c..6f852ed 100644 --- a/Histacom2.Engine/Histacom2.Engine.csproj +++ b/Histacom2.Engine/Histacom2.Engine.csproj @@ -49,7 +49,6 @@ - -- cgit v1.2.3