-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathQuestion.cs
More file actions
107 lines (96 loc) · 3.89 KB
/
Question.cs
File metadata and controls
107 lines (96 loc) · 3.89 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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
using System.Drawing;
using System;
using System.Windows.Forms;
using Microsoft.VisualBasic.CompilerServices;
using System.ComponentModel;
using NAudio.Wave;
using System.IO;
namespace YouAreAnIdiot_UnFlash
{
public partial class Question : Form
{
IWavePlayer waveOutStart = new WaveOut();
public Question()
{
InitializeComponent();
this.ActiveControl = Label_Question;
FontColour.Start();
Mp3FileReader provider = new Mp3FileReader(new MemoryStream(Properties.Resources.you_are_an_idiot));
waveOutStart.Init(provider);
waveOutStart.Play();
}
private void FontColour_Tick(object sender, EventArgs e)
{
this.Timer_FT.Text = Conversions.ToString(Conversions.ToDouble(this.Timer_FT.Text) + 1.0);
if (Conversions.ToDouble(this.Timer_FT.Text) == 0.0)
this.Label_Question.ForeColor = Color.Indigo;
if (Conversions.ToDouble(this.Timer_FT.Text) == 1.0)
this.Label_Question.ForeColor = Color.Ivory;
if (Conversions.ToDouble(this.Timer_FT.Text) == 2.0)
this.Label_Question.ForeColor = Color.LightPink;
if (Conversions.ToDouble(this.Timer_FT.Text) == 3.0)
this.Label_Question.ForeColor = Color.LightSkyBlue;
if (Conversions.ToDouble(this.Timer_FT.Text) == 4.0)
this.Label_Question.ForeColor = Color.Lime;
if (Conversions.ToDouble(this.Timer_FT.Text) == 5.0)
this.Label_Question.ForeColor = Color.MediumPurple;
if (Conversions.ToDouble(this.Timer_FT.Text) == 6.0)
this.Label_Question.ForeColor = Color.MediumSpringGreen;
if (Conversions.ToDouble(this.Timer_FT.Text) == 7.0)
this.Label_Question.ForeColor = Color.Pink;
if (Conversions.ToDouble(this.Timer_FT.Text) == 8.0)
this.Label_Question.ForeColor = Color.Red;
if (Conversions.ToDouble(this.Timer_FT.Text) != 9.0)
return;
this.Label_Question.ForeColor = Color.Snow;
this.Timer_FT.Text = Conversions.ToString(0);
}
private void No_Click(object sender, EventArgs e)
{
MessageBox.Show("Oh... I think you are an idiot. XD", "YouAreAnIdiot");
this.Close();
}
private void Yes_Click(object sender, EventArgs e)
{
MessageBox.Show("Are you sure?", "YouAreAnIdiot", MessageBoxButtons.YesNo);
this.Close();
}
IWavePlayer waveOut = new WaveOut();
Mp3FileReader provider = new Mp3FileReader(new MemoryStream(Properties.Resources.you_are_an_idiot_long));
private void Question_Closing(object sender, FormClosingEventArgs e)
{
e.Cancel = true;
if (waveOut.PlaybackState != PlaybackState.Playing)
{
waveOutStart.Stop();
waveOut.Init(provider);
waveOut.Play();
waveOut.PlaybackStopped += WaveOut_PlaybackStopped;
}
HAHA haha1 = new HAHA();
HAHA haha2 = new HAHA();
HAHA haha3 = new HAHA();
HAHA haha4 = new HAHA();
HAHA haha5 = new HAHA();
haha1.Show();
haha2.Show();
haha3.Show();
haha4.Show();
haha5.Show();
this.Hide();
}
private void WaveOut_PlaybackStopped(object sender, StoppedEventArgs e)
{
provider.Position = 0;
waveOut.Play();
}
private void button_MouseHover(object sender, EventArgs e)
{
waveOutStart.Dispose();
if (waveOut.PlaybackState == PlaybackState.Playing) return;
waveOut.PlaybackStopped += WaveOut_PlaybackStopped;
waveOut.Init(provider);
waveOut.Play();
}
}
}