aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Engine/BSODCreator.cs
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-04-13 14:04:41 -0400
committerlempamo <[email protected]>2017-04-13 14:04:41 -0400
commit036a986ce1f56e6cda0617e6e574a875b847911b (patch)
treeee047052f0dae8b05059630cda9ce067469a871c /TimeHACK.Engine/BSODCreator.cs
parentf1e0c8f75de4a5086ff955789e9397696df25199 (diff)
downloadhistacom2-036a986ce1f56e6cda0617e6e574a875b847911b.tar.gz
histacom2-036a986ce1f56e6cda0617e6e574a875b847911b.tar.bz2
histacom2-036a986ce1f56e6cda0617e6e574a875b847911b.zip
WebChat1998 crash works!
Diffstat (limited to 'TimeHACK.Engine/BSODCreator.cs')
-rw-r--r--TimeHACK.Engine/BSODCreator.cs31
1 files changed, 29 insertions, 2 deletions
diff --git a/TimeHACK.Engine/BSODCreator.cs b/TimeHACK.Engine/BSODCreator.cs
index eb9c9a5..fe19dfd 100644
--- a/TimeHACK.Engine/BSODCreator.cs
+++ b/TimeHACK.Engine/BSODCreator.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Windows.Forms;
using TimeHACK.Engine.Template;
namespace TimeHACK.Engine
@@ -11,9 +12,35 @@ namespace TimeHACK.Engine
{
public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection();
- public Win9XBSOD throw9XBSOD(bool except, int type)
+ public enum BSODCauses
{
- return null;
+ Testing,
+ ExitChat98Early
+ }
+
+ public Win9XBSOD throw9XBSOD(bool except, BSODCauses type)
+ {
+ pfc.AddFontFile(AppDomain.CurrentDomain.BaseDirectory + "\\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.ExitChat98Early:
+ bsod.textBox1.Text = "An unknown but fatal exception has occured has occured in the program \"wchat98.exe\". The current processes will be terminated.";
+ break;
+ default:
+ break;
+ }
+ bsod.Show();
+ return bsod;
}
}
}