Advertisement
Guest User

Untitled

a guest
Oct 15th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. Class MainWindow
  2. Dim answer, score As Integer
  3.  
  4. Private Sub btnQuestionOne_Click(sender As Object, e As RoutedEventArgs) Handles btnQuestionOne.Click
  5.  
  6. My.Computer.Audio.Play(My.Resources.alien_spaceship_daniel_simion, AudioPlayMode.Background)
  7.  
  8. btnAnswer.IsEnabled = True
  9. btnQuestionOne.IsEnabled = False
  10.  
  11. txtQuestions.Text = "What horror movie has gotten the most sales?"
  12. rdo1.Content = "It"
  13. rdo2.Content = "Jaws"
  14. rdo3.Content = "The Sixth sense"
  15. rdo4.Content = "Hannibal"
  16.  
  17. answer = 1
  18.  
  19. End Sub
  20.  
  21. Private Sub btnAnswer.Click(sender As Object, e As RoutedEventArgs) Handles btnAnswer.Click
  22. btnAnswer.IsEnabled = False
  23.  
  24. Dim input As Integer = 0
  25.  
  26. If (rdo1.IsChecked) Then
  27. input = 1
  28. ElseIf (rdo2.IsChecked) Then
  29. input = 2
  30. ElseIf (rdo3.IsChecked) Then
  31. input = 3
  32. ElseIf (rdo4.IsChecked) Then
  33. input = 4
  34.  
  35. End If
  36.  
  37. If (input = answer) Then
  38. My.Computer.Audio.Play(My.Resources.applause2, AudioPlayMode.Background)
  39.  
  40. score += 10
  41. Else
  42. My.Computer.Audio.Play(My.Resources.Crowd_Boo_2_SoundBible_com_1053910591, AudioPlayMode.Background)
  43.  
  44. score -= 10
  45. End If
  46. End Sub
  47. Private Sub btnQuestionTwo_Click(sender As Object, e As RoutedEventArgs) Handles btnQuestionTwo.Click
  48. My.Computer.Audio.Play(My.Resources.alien_spaceship_daniel_simion, AudioPlayMode.Background)
  49.  
  50. btnAnswer.IsEnabled = True
  51. btnQuestionOne.IsEnabled = False
  52.  
  53. txtQuestions.Text = "which horror movie has the most sequels"
  54. rdo1.Content = "A Nightmare on Elm Street"
  55. rdo2.Content = "Halloween"
  56. rdo3.Content = "Friday the 13th"
  57. rdo4.Content = "Scream"
  58.  
  59. answer = 3
  60.  
  61. End Sub
  62.  
  63.  
  64.  
  65. Private Sub btnAnswer_Click(sender As Object, e As RoutedEventArgs) Handles btnAnswer.Click
  66. btnAnswer.IsEnabled = False
  67.  
  68. Dim input As Integer = 0
  69.  
  70. If (rdo1.IsChecked) Then
  71. input = 1
  72. ElseIf (rdo2.IsChecked) Then
  73. input = 2
  74. ElseIf (rdo3.IsChecked) Then
  75. input = 3
  76. ElseIf (rdo4.IsChecked) Then
  77. input = 4
  78.  
  79. End If
  80.  
  81. If (input = answer) Then
  82. My.Computer.Audio.Play(My.Resources.applause2, AudioPlayMode.Background)
  83.  
  84. score += 10
  85. Else
  86. My.Computer.Audio.Play(My.Resources.Crowd_Boo_2_SoundBible_com_1053910591, AudioPlayMode.Background)
  87.  
  88. score -= 10
  89. End If
  90.  
  91. Private Sub btnQuestionThree_Click(sender As Object, e As RoutedEventArgs) Handles btnQuestionThree.Click
  92.  
  93. My.Computer.Audio.Play(My.Resources.alien_spaceship_daniel_simion, AudioPlayMode.Background)
  94.  
  95. btnAnswer.IsEnabled = True
  96. btnQuestionOne.IsEnabled = False
  97.  
  98. txtQuestions.Text = "Which Horror Movie is Jason From"
  99. rdo1.Content = "Scream"
  100. rdo2.Content = "It"
  101. rdo3.Content = "Friday the 13th"
  102. rdo4.Content = "The Shinning"
  103.  
  104. answer = 3
  105.  
  106. End Sub
  107.  
  108. Private Sub btnAnswer_Click(sender As Object, e As RoutedEventArgs) Handles btnAnswer.Click
  109. btnAnswer.IsEnabled = False
  110.  
  111. Dim input As Integer = 0
  112.  
  113. If (rdo1.IsChecked) Then
  114. input = 1
  115. ElseIf (rdo2.IsChecked) Then
  116. input = 2
  117. ElseIf (rdo3.IsChecked) Then
  118. input = 3
  119. ElseIf (rdo4.IsChecked) Then
  120. input = 4
  121.  
  122. End If
  123.  
  124. If (input = answer) Then
  125. My.Computer.Audio.Play(My.Resources.applause2, AudioPlayMode.Background)
  126.  
  127. score += 10
  128. Else
  129. My.Computer.Audio.Play(My.Resources.Crowd_Boo_2_SoundBible_com_1053910591, AudioPlayMode.Background)
  130.  
  131. score -= 10
  132. End If
  133. End Sub
  134. lblScore.Content = score.ToString()
  135.  
  136.  
  137.  
  138. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement