forked from MarkusMaal/BlueScreenSimulatorPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindowScreen.cs
More file actions
54 lines (50 loc) · 1.54 KB
/
WindowScreen.cs
File metadata and controls
54 lines (50 loc) · 1.54 KB
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
using System;
using System.Drawing;
using System.Windows.Forms;
namespace UltimateBlueScreenSimulator
{
public partial class WindowScreen : Form
{
public Bitmap bmp;
public bool primary = true;
public WindowScreen()
{
InitializeComponent();
}
private void WindowScreen_Load(object sender, EventArgs e)
{
if (!Program.f1.showcursor) { Cursor.Hide(); }
if (this.primary) { this.Text += " (primary)"; }
else { this.Text += " (secondary)"; }
}
private void WindowScreen_FormClosing(object sender, FormClosingEventArgs e)
{
if (!Program.f1.lockout) { this.Hide(); }
// Prevent closing when Alt + F4 is pressed
if (e.CloseReason == CloseReason.UserClosing)
{
e.Cancel = Program.f1.lockout;
}
else
{
e.Cancel = false;
}
}
private void WindowScreen_FormClosed(object sender, FormClosedEventArgs e)
{
if (Program.f1.closecuzhidden == true)
{
try
{
Program.f1.Close();
} catch { }
}
if ((screenDisplay != null) && (screenDisplay.Image != null))
{
this.screenDisplay.Image.Dispose();
this.screenDisplay.Dispose();
}
this.Dispose();
}
}
}