aboutsummaryrefslogtreecommitdiff
path: root/Histacom2/OS/Win95/Win95Apps/12padamsViruses/ErrorBlaster95.cs
diff options
context:
space:
mode:
authorlempamo <lempamo@users.noreply.github.com>2017-09-18 16:49:14 -0500
committerGitHub <noreply@github.com>2017-09-18 16:49:14 -0500
commit2d83155d9833a7ea1396ee62265f900be258a5eb (patch)
tree28c7cfc42927d9c340a5f17048a024227358fc5f /Histacom2/OS/Win95/Win95Apps/12padamsViruses/ErrorBlaster95.cs
parent92495924b688faf93d37929a8dab27554ac78e4f (diff)
parent3188a4eac09bbcfb1dffaa2e001f1f76137ed1ac (diff)
downloadhistacom2-2d83155d9833a7ea1396ee62265f900be258a5eb.tar.gz
histacom2-2d83155d9833a7ea1396ee62265f900be258a5eb.tar.bz2
histacom2-2d83155d9833a7ea1396ee62265f900be258a5eb.zip
Merge pull request #161 from IBMPCDOS5/master
Added Error Blaster 95, see Description for details
Diffstat (limited to 'Histacom2/OS/Win95/Win95Apps/12padamsViruses/ErrorBlaster95.cs')
-rw-r--r--Histacom2/OS/Win95/Win95Apps/12padamsViruses/ErrorBlaster95.cs75
1 files changed, 75 insertions, 0 deletions
diff --git a/Histacom2/OS/Win95/Win95Apps/12padamsViruses/ErrorBlaster95.cs b/Histacom2/OS/Win95/Win95Apps/12padamsViruses/ErrorBlaster95.cs
new file mode 100644
index 0000000..3d6f064
--- /dev/null
+++ b/Histacom2/OS/Win95/Win95Apps/12padamsViruses/ErrorBlaster95.cs
@@ -0,0 +1,75 @@
+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;
+using Histacom2.Engine;
+using System.Drawing.Text;
+using static Histacom2.Engine.SaveSystem;
+
+namespace Histacom2.OS.Win95.Win95Apps._12padamViruses
+{
+ public partial class ErrorBlaster95 : UserControl
+ {
+ Timer messageGen = new Timer();
+ Random messageChooser = new Random();
+ WindowManager wm = new WindowManager();
+ private static PrivateFontCollection pfc = new PrivateFontCollection();
+ public ErrorBlaster95()
+ {
+ InitializeComponent();
+ messageGen.Interval = 3000;
+ messageGen.Tick += MessageGen_Tick;
+ pfc.AddFontFile(DataDirectory + "\\LeviWindows.ttf");
+ label1.Font=new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ }
+
+ private void MessageGen_Tick(object sender, EventArgs e)
+ {
+ int messageRandomizer = messageChooser.Next(1, 3);
+ switch (messageRandomizer)
+ {
+ case 1:
+ wm.StartInfobox95("Alert!", "A virus has been detected on your computer! Press OK to disinfect!", Engine.Template.InfoboxType.Error, Engine.Template.InfoboxButtons.OK);
+ messageGen.Interval -= 300;
+ break;
+
+ case 2:
+ wm.StartInfobox95("Microsoft Security Alert", "Microsoft says to install UltraSurpremeAntiVirus1998 to get rid of any viruses!", Engine.Template.InfoboxType.Info, Engine.Template.InfoboxButtons.OK);
+ messageGen.Interval -= 300;
+ break;
+ case 3:
+ wm.StartInfobox95("Error", "A BSOD.exe virus has been found on your computer!", Engine.Template.InfoboxType.Warning, Engine.Template.InfoboxButtons.OK);
+ messageGen.Interval -= 300;
+ break;
+ }
+ if (messageGen.Interval == 300)
+ {
+ messageGen.Stop();
+
+ BSODCreator bs = new BSODCreator();
+
+ bs.throw9XBSOD(true, BSODCreator.BSODCauses.Generic);
+ }
+ }
+
+ private void classicButton3_Click(object sender, EventArgs e)
+ {
+ ParentForm.Close();
+ }
+
+ private void classicButton1_Click(object sender, EventArgs e)
+ {
+ messageGen.Start();
+ }
+
+ private void classicButton2_Click(object sender, EventArgs e)
+ {
+ messageGen.Stop();
+ }
+ }
+}