aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Engine/BSODCreator.cs
diff options
context:
space:
mode:
authorAShifter <[email protected]>2017-04-13 12:43:13 -0700
committerGitHub <[email protected]>2017-04-13 12:43:13 -0700
commit69e90dc5e03f73a36c5ed069d9814b5c2900cc90 (patch)
treeee047052f0dae8b05059630cda9ce067469a871c /TimeHACK.Engine/BSODCreator.cs
parent4cc2631a033d2bfb7a7e926f9b17d85862c2eea3 (diff)
parent036a986ce1f56e6cda0617e6e574a875b847911b (diff)
downloadhistacom2-69e90dc5e03f73a36c5ed069d9814b5c2900cc90.tar.gz
histacom2-69e90dc5e03f73a36c5ed069d9814b5c2900cc90.tar.bz2
histacom2-69e90dc5e03f73a36c5ed069d9814b5c2900cc90.zip
Merge pull request #43 from lempamo/master
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;
}
}
}