Public Class Form1
Private Sub fatgramsTextbox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles fatgramsTextbox.TextChanged
caloriesTextbox.Text = CInt(fatgramsTextbox.Text) * 9
End Sub
Private Sub calculateButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles calculateButton.Click
If CInt(caloriesTextbox.Text) <= 30 Then
verdictLabel.Text = "Verdict: Health Verdict Eat Away, this is a low fat healthy option"
ElseIf CInt(caloriesTextbox.Text) > 30 OR <70 Then
verdictLabel.Text = "Verdict: Alright, it won’t kill you but you could choose a lower fat alternative!"
ElseIf CInt(caloriesTextbox.Text) >= 70 Then
verdictLabel.Text = "Verdict: Are you trying to kill yourself? This food is very fattening"
End If
End Sub
Private Sub exitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exitButton.Click
Me.Close()
End Sub
Private Sub clearButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles clearButton.Click
caloriesTextbox.Text = ""
fatgramsTextbox.Text = ""
verdictLabel.Text = "Verdict: "
End Sub
End Class