aboutsummaryrefslogtreecommitdiff
path: root/BSODPrank/BSOD.cs
blob: 427121ff37e9d745b479c51d65a0c3e8984d3a63 (plain) (blame)
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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Media;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BSODPrank
{
    public partial class BSOD : Form
    {
        public BSOD()
        {
            InitializeComponent();
        }

        private async void Form1_Load(object sender, EventArgs e)
        {
#if DEBUG
            MessageBox.Show("Debug mode is on.");
            btnExitDebug.Visible = true;
#endif
            this.KeyPreview = true;
            this.KeyDown += new KeyEventHandler(Form1_KeyDown);
            await Task.Delay(5000);
            Boot boot = new Boot();
            boot.Show();
            this.Hide();
        }

        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            System.IO.Stream str = Properties.Resources.bleep;
            System.Media.SoundPlayer snd = new System.Media.SoundPlayer(str);
            snd.Play();
        }

        private void btnExitDebug_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}