forked from MarkusMaal/BlueScreenSimulatorPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmetaerror.cs
82 lines (75 loc) · 2.37 KB
/
metaerror.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace UltimateBlueScreenSimulator
{
public partial class Metaerror : Form
{
internal string message = "";
internal string stack_trace = "";
internal string type = "GreenScreen";
public Metaerror()
{
InitializeComponent();
}
private void TextBox1_KeyDown(object sender, KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.Escape:
this.DialogResult = DialogResult.Abort;
this.Close();
break;
case Keys.Enter:
this.DialogResult = DialogResult.Ignore;
this.Close();
break;
case Keys.Space:
this.DialogResult = DialogResult.Retry;
this.Close();
break;
}
}
private void Metaerror_Load(object sender, EventArgs e)
{
technicalinfoLabel.Text = type + " Exception\n\n" + message + "\n\n" + stack_trace;
switch (type)
{
case "GreenScreen":
this.BackColor = Color.ForestGreen;
this.ForeColor = Color.White;
break;
case "OrangeScreen":
this.BackColor = Color.DarkOrange;
this.ForeColor = Color.White;
break;
case "VioletScreen":
this.BackColor = Color.BlueViolet;
this.ForeColor = Color.White;
retryButton.Visible = true;
abortButton.Visible = true;
break;
}
}
private void Button1_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Ignore;
this.Close();
}
private void Button2_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Retry;
this.Close();
}
private void Button3_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Abort;
this.Close();
}
}
}