mirror of
https://github.com/HistacomUnity/Histacom2-old.git
synced 2025-01-22 09:02:01 -05:00
random virus labels work!
This commit is contained in:
parent
294dc501a4
commit
22f94867ba
6 changed files with 26 additions and 32 deletions
|
@ -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" />
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Histacom2.OS.WinXPBad.Story
|
||||
{
|
||||
|
@ -14,6 +15,8 @@ public class Hack4 : object
|
|||
{
|
||||
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 @@ public static async void StartObjective()
|
|||
|
||||
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 @@ public static async void VirusDestruction(WinClassicIE6Bad ie)
|
|||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
4
Histacom2/OS/WinXPBad/VirusLabel.Designer.cs
generated
4
Histacom2/OS/WinXPBad/VirusLabel.Designer.cs
generated
|
@ -35,7 +35,6 @@ private void InitializeComponent()
|
|||
//
|
||||
// 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 @@ private void InitializeComponent()
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Timer timer1;
|
||||
public System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
|
@ -57,7 +57,6 @@ private void InitializeComponent()
|
|||
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 @@ private void InitializeComponent()
|
|||
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 void InitializeComponent()
|
|||
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;
|
||||
|
|
|
@ -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 @@ private void originalTimer_Tick(object sender, EventArgs e)
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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>
|
Loading…
Reference in a new issue