aboutsummaryrefslogtreecommitdiff
path: root/Histacom2.Engine/BSODCreator.cs
diff options
context:
space:
mode:
authorAlex-TIMEHACK <[email protected]>2017-08-27 11:32:44 +0100
committerAlex-TIMEHACK <[email protected]>2017-08-27 11:32:44 +0100
commitf8f3bd0b1eb57c5a289513200b192e1d54d58292 (patch)
treec9b79515fb81d90320ef386a522a5830875f6d49 /Histacom2.Engine/BSODCreator.cs
parentbffcb720f811623015ed4795032e5c57d1064c8a (diff)
parentcd6273d7c95098e0e0dd9948c6b5cec1c5f9cd3f (diff)
downloadhistacom2-f8f3bd0b1eb57c5a289513200b192e1d54d58292.tar.gz
histacom2-f8f3bd0b1eb57c5a289513200b192e1d54d58292.tar.bz2
histacom2-f8f3bd0b1eb57c5a289513200b192e1d54d58292.zip
Updated my fork!
Diffstat (limited to 'Histacom2.Engine/BSODCreator.cs')
-rw-r--r--Histacom2.Engine/BSODCreator.cs54
1 files changed, 54 insertions, 0 deletions
diff --git a/Histacom2.Engine/BSODCreator.cs b/Histacom2.Engine/BSODCreator.cs
new file mode 100644
index 0000000..fb693a9
--- /dev/null
+++ b/Histacom2.Engine/BSODCreator.cs
@@ -0,0 +1,54 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using Histacom2.Engine.Template;
+
+namespace Histacom2.Engine
+{
+ public class BSODCreator
+ {
+ public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection();
+
+ public enum BSODCauses
+ {
+ Testing,
+ WimpEnding,
+ PiracyEnding,
+ }
+
+ public Win9XBSOD throw9XBSOD(bool except, BSODCauses type)
+ {
+ pfc.AddFontFile($@"{SaveSystem.GameDirectory}\Data\windows_command_prompt.ttf");
+ Win9XBSOD bsod = new Win9XBSOD();
+ foreach (Control ctrl in bsod.Controls) {
+ ctrl.Font = new System.Drawing.Font(pfc.Families[0], 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((0)));
+ }
+ bsod.TopMost = true;
+ bsod.FormBorderStyle = FormBorderStyle.None;
+ bsod.WindowState = FormWindowState.Maximized;
+ switch (type)
+ {
+ case BSODCauses.Testing:
+ bsod.textBox1.Text = "This is the testing type of BSOD. Hurrah.";
+ break;
+ case BSODCauses.WimpEnding:
+ bsod.textBox1.Text = "An unknown but fatal exception has occured in the program \"wchat98.exe\". The current processes will be terminated.";
+ break;
+ case BSODCauses.PiracyEnding:
+ bsod.textBox1.Text = "Vital elements of Windows were removed, but recovered. However, your data has been lost.";
+ bsod.BackColor = System.Drawing.Color.Black;
+ foreach (Control ctrl in bsod.Controls) ctrl.ForeColor = System.Drawing.Color.Silver;
+ bsod.label1.BackColor = System.Drawing.Color.Silver;
+ bsod.label1.ForeColor = System.Drawing.Color.Black;
+ break;
+ default:
+ break;
+ }
+ bsod.Show();
+ return bsod;
+ }
+ }
+}