forked from MarkusMaal/BlueScreenSimulatorPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGen.cs
More file actions
53 lines (50 loc) · 1.35 KB
/
Gen.cs
File metadata and controls
53 lines (50 loc) · 1.35 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
using System;
using System.Windows.Forms;
namespace UltimateBlueScreenSimulator
{
public partial class Gen : Form
{
public Gen()
{
InitializeComponent();
}
private void PreventUserClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing)
{
e.Cancel = true;
}
else
{
e.Cancel = false;
}
}
private void ProgressChecker(object sender, EventArgs e)
{
this.Text = Program.load_message;
if (Program.loadfinished)
{
this.Dispose();
this.Close();
}
if (Program.load_progress < 100)
{
genProgressBar.Style = ProgressBarStyle.Continuous;
genProgressBar.Value = Program.load_progress;
if (Program.load_progress < 10)
{
this.Activate();
this.BringToFront();
}
}
else if (Program.load_progress > 100)
{
genProgressBar.Value = genProgressBar.Maximum;
}
else
{
genProgressBar.Style = ProgressBarStyle.Marquee;
}
}
}
}