Public Class About
	Dim BlinkenLights(50) As RadioButton
	Dim FirstLightFirstRound As Boolean = False
	Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
		Close()
	End Sub

	Private Sub About_Load(sender As Object, e As EventArgs) Handles MyBase.Load
		Icon = ProgramIcon() 'so you can see the icon in the taskbar
		For i = 1 To 50
			BlinkenLights(i - 1) = Controls.Find("RadioButton" & i, True)(0)
			If (i Mod 3) = 0 Then BlinkenLights(i - 1).Checked = True
		Next
		BlinkenLights(0).Checked = True
		BlinkenlightsTimer.Start()
		AnimationCheckbox.Checked = True
	End Sub

	Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
		'Process.Start("Changelog.txt")
		ChangelogViewer.Show()
	End Sub

	Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
		Process.Start("http://25.60.11.62/wiki/index.php/Notepad_Ultra")
	End Sub

	Private Sub BlinkenlightsTimer_Tick(sender As Object, e As EventArgs) Handles BlinkenlightsTimer.Tick
		'i regret nothing.
		For i = 49 To 0 Step -1
			If BlinkenLights(i).Checked Then
				If FirstLightFirstRound = True And i = 0 Then
					FirstLightFirstRound = False
				Else
					BlinkenLights(i).Checked = False
					If i <> 49 Then
						BlinkenLights(i + 1).Checked = True
					Else
						BlinkenLights(0).Checked = True
						FirstLightFirstRound = True
					End If
				End If

			End If
		Next
	End Sub

	Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton1.Click, RadioButton2.Click, RadioButton3.Click, RadioButton4.Click, RadioButton5.Click, RadioButton6.Click, RadioButton7.Click, RadioButton8.Click, RadioButton9.Click, RadioButton10.Click, RadioButton11.Click, RadioButton12.Click, RadioButton13.Click, RadioButton14.Click, RadioButton15.Click, RadioButton16.Click, RadioButton17.Click, RadioButton18.Click, RadioButton19.Click, RadioButton20.Click, RadioButton21.Click, RadioButton22.Click, RadioButton23.Click, RadioButton24.Click, RadioButton25.Click, RadioButton26.Click, RadioButton27.Click, RadioButton28.Click, RadioButton29.Click, RadioButton30.Click, RadioButton31.Click, RadioButton32.Click, RadioButton33.Click, RadioButton34.Click, RadioButton35.Click, RadioButton36.Click, RadioButton37.Click, RadioButton38.Click, RadioButton39.Click, RadioButton40.Click, RadioButton41.Click, RadioButton42.Click, RadioButton43.Click, RadioButton44.Click, RadioButton45.Click, RadioButton46.Click, RadioButton47.Click, RadioButton48.Click, RadioButton49.Click, RadioButton50.Click
		'once again: i regret nothing.
		BlinkenlightsTimer.Stop()
		Dim modstep As Integer = Rnd() * 7 + 2
		For i = 1 To 50
			BlinkenLights(i - 1).Checked = False
			If (i Mod modstep) = 0 Then BlinkenLights(i - 1).Checked = True
		Next
		If Not BlinkenLights(0).Checked Then BlinkenLights(0).Checked = True
		BlinkenlightsTimer.Interval = Rnd() * 250 + 50
		BlinkenlightsTimer.Start()
	End Sub

	Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click
		For i = 0 To 49
			BlinkenLights(i).Enabled = Not BlinkenLights(i).Enabled
		Next
	End Sub

	Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles AnimationCheckbox.CheckedChanged
		For i = 0 To 49
			BlinkenLights(i).Visible = AnimationCheckbox.Checked
		Next
		ProgressBar1.Visible = AnimationCheckbox.Checked
		If Not AnimationCheckbox.Checked Then BlinkenlightsTimer.Stop() Else BlinkenlightsTimer.Start()
	End Sub
End Class