diff options
| author | lempamo <[email protected]> | 2017-10-29 12:04:18 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-10-29 12:04:18 -0400 |
| commit | 22f94867ba365ec2dd56026684a72905dbe5f5d3 (patch) | |
| tree | e953acaa258191d0f82495bc67ef7ea369a47a57 | |
| parent | 294dc501a4dd8f4c5b22ec646c8d953229efd5eb (diff) | |
| download | histacom2-22f94867ba365ec2dd56026684a72905dbe5f5d3.tar.gz histacom2-22f94867ba365ec2dd56026684a72905dbe5f5d3.tar.bz2 histacom2-22f94867ba365ec2dd56026684a72905dbe5f5d3.zip | |
random virus labels work!
| -rw-r--r-- | Histacom2.Engine/Histacom2.Engine.csproj | 1 | ||||
| -rw-r--r-- | Histacom2/OS/WinXPBad/Story/Hack4.cs | 19 | ||||
| -rw-r--r-- | Histacom2/OS/WinXPBad/VirusLabel.Designer.cs | 4 | ||||
| -rw-r--r-- | Histacom2/OS/WinXPBad/WinClassicIE6Bad.Designer.cs | 8 | ||||
| -rw-r--r-- | Histacom2/OS/WinXPBad/WinClassicIE6Bad.cs | 20 | ||||
| -rw-r--r-- | Histacom2/OS/WinXPBad/WinClassicIE6Bad.resx | 6 |
6 files changed, 26 insertions, 32 deletions
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 @@ <Compile Include="BSODCreator.cs" /> <None Include="packages.config" /> <None Include="Resources\WinClassic\Window\pjBg6mKP.bin" /> + <Compile Include="CryptoRandom.cs" /> <Compile Include="DesktopController.cs" /> <Compile Include="FileDialogBoxManager.cs" /> <Compile Include="Paintbrush.cs" /> 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 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="pictureBox1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> @@ -310,7 +307,4 @@ <metadata name="originalTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>247, 17</value> </metadata> - <metadata name="labelTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>370, 17</value> - </metadata> </root>
\ No newline at end of file |
