Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Class MainWindow
- Dim answer, score As Integer
- Private Sub btnQuestionOne_Click(sender As Object, e As RoutedEventArgs) Handles btnQuestionOne.Click
- My.Computer.Audio.Play(My.Resources.alien_spaceship_daniel_simion, AudioPlayMode.Background)
- btnAnswer.IsEnabled = True
- btnQuestionOne.IsEnabled = False
- txtQuestions.Text = "What horror movie has gotten the most sales?"
- rdo1.Content = "It"
- rdo2.Content = "Jaws"
- rdo3.Content = "The Sixth sense"
- rdo4.Content = "Hannibal"
- answer = 1
- End Sub
- Private Sub btnAnswer.Click(sender As Object, e As RoutedEventArgs) Handles btnAnswer.Click
- btnAnswer.IsEnabled = False
- Dim input As Integer = 0
- If (rdo1.IsChecked) Then
- input = 1
- ElseIf (rdo2.IsChecked) Then
- input = 2
- ElseIf (rdo3.IsChecked) Then
- input = 3
- ElseIf (rdo4.IsChecked) Then
- input = 4
- End If
- If (input = answer) Then
- My.Computer.Audio.Play(My.Resources.applause2, AudioPlayMode.Background)
- score += 10
- Else
- My.Computer.Audio.Play(My.Resources.Crowd_Boo_2_SoundBible_com_1053910591, AudioPlayMode.Background)
- score -= 10
- End If
- End Sub
- Private Sub btnQuestionTwo_Click(sender As Object, e As RoutedEventArgs) Handles btnQuestionTwo.Click
- My.Computer.Audio.Play(My.Resources.alien_spaceship_daniel_simion, AudioPlayMode.Background)
- btnAnswer.IsEnabled = True
- btnQuestionOne.IsEnabled = False
- txtQuestions.Text = "which horror movie has the most sequels"
- rdo1.Content = "A Nightmare on Elm Street"
- rdo2.Content = "Halloween"
- rdo3.Content = "Friday the 13th"
- rdo4.Content = "Scream"
- answer = 3
- End Sub
- Private Sub btnAnswer_Click(sender As Object, e As RoutedEventArgs) Handles btnAnswer.Click
- btnAnswer.IsEnabled = False
- Dim input As Integer = 0
- If (rdo1.IsChecked) Then
- input = 1
- ElseIf (rdo2.IsChecked) Then
- input = 2
- ElseIf (rdo3.IsChecked) Then
- input = 3
- ElseIf (rdo4.IsChecked) Then
- input = 4
- End If
- If (input = answer) Then
- My.Computer.Audio.Play(My.Resources.applause2, AudioPlayMode.Background)
- score += 10
- Else
- My.Computer.Audio.Play(My.Resources.Crowd_Boo_2_SoundBible_com_1053910591, AudioPlayMode.Background)
- score -= 10
- End If
- Private Sub btnQuestionThree_Click(sender As Object, e As RoutedEventArgs) Handles btnQuestionThree.Click
- My.Computer.Audio.Play(My.Resources.alien_spaceship_daniel_simion, AudioPlayMode.Background)
- btnAnswer.IsEnabled = True
- btnQuestionOne.IsEnabled = False
- txtQuestions.Text = "Which Horror Movie is Jason From"
- rdo1.Content = "Scream"
- rdo2.Content = "It"
- rdo3.Content = "Friday the 13th"
- rdo4.Content = "The Shinning"
- answer = 3
- End Sub
- Private Sub btnAnswer_Click(sender As Object, e As RoutedEventArgs) Handles btnAnswer.Click
- btnAnswer.IsEnabled = False
- Dim input As Integer = 0
- If (rdo1.IsChecked) Then
- input = 1
- ElseIf (rdo2.IsChecked) Then
- input = 2
- ElseIf (rdo3.IsChecked) Then
- input = 3
- ElseIf (rdo4.IsChecked) Then
- input = 4
- End If
- If (input = answer) Then
- My.Computer.Audio.Play(My.Resources.applause2, AudioPlayMode.Background)
- score += 10
- Else
- My.Computer.Audio.Play(My.Resources.Crowd_Boo_2_SoundBible_com_1053910591, AudioPlayMode.Background)
- score -= 10
- End If
- End Sub
- lblScore.Content = score.ToString()
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement