Public Class Form2

    Private Sub GroupBox2_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox2.Enter

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnVeilTail.Click
        GroupBox2.Show()
        GroupBox3.Hide()
        GroupBox4.Hide()

        GroupBox6.Hide()
    End Sub

    Private Sub CheckBox12_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox12.CheckedChanged
        If CheckBox12.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 150
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 150
        End If
    End Sub

    Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
        If CheckBox1.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 150
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 150
        End If
    End Sub

    Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
        If CheckBox2.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 150
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 150
        End If
    End Sub

    Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox3.CheckedChanged
        If CheckBox3.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 150
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 150
        End If
    End Sub

    Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.CheckedChanged
        If CheckBox4.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 75
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 75
        End If
    End Sub

    Private Sub CheckBox5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox5.CheckedChanged
        If CheckBox5.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 75
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 75
        End If
    End Sub

    Private Sub CheckBox6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox6.CheckedChanged
        If CheckBox6.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 75
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 75
        End If
    End Sub

    Private Sub CheckBox11_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox11.CheckedChanged
        If CheckBox11.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 150
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 150
        End If
    End Sub

    Private Sub CheckBox10_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox10.CheckedChanged
        If CheckBox10.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 150
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 150
        End If
    End Sub

    Private Sub CheckBox9_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox9.CheckedChanged
        If CheckBox9.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 75
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 75
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCrownTail.Click
        GroupBox2.Hide()
        GroupBox3.Show()
        GroupBox4.Hide()

        GroupBox6.Hide()
    End Sub

    Private Sub CheckBox18_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox18.CheckedChanged
        If CheckBox18.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 150
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 150
        End If
    End Sub

    Private Sub CheckBox17_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox17.CheckedChanged
        If CheckBox17.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 150
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 150
        End If
    End Sub

    Private Sub CheckBox16_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox16.CheckedChanged
        If CheckBox16.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 150
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 150
        End If
    End Sub

    Private Sub CheckBox14_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox14.CheckedChanged
        If CheckBox14.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 75
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 75
        End If
    End Sub

    Private Sub CheckBox15_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox15.CheckedChanged
        If CheckBox15.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 75
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 75
        End If
    End Sub

    Private Sub CheckBox13_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox13.CheckedChanged
        If CheckBox13.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 75
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 75
        End If
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSuperDelta.Click
        GroupBox2.Hide()
        GroupBox3.Hide()
        GroupBox4.Show()

        GroupBox6.Hide()

    End Sub

    Private Sub CheckBox30_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox30.CheckedChanged
        If CheckBox30.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 150
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 150
        End If
    End Sub

    Private Sub CheckBox29_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox29.CheckedChanged
        If CheckBox29.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 150
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 150
        End If
    End Sub

    Private Sub CheckBox28_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox28.CheckedChanged
        If CheckBox28.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 150
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 150
        End If
    End Sub

    Private Sub CheckBox26_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox26.CheckedChanged
        If CheckBox26.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 75
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 75
        End If
    End Sub

    Private Sub CheckBox27_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox27.CheckedChanged
        If CheckBox27.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 75
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 75
        End If
    End Sub

    Private Sub CheckBox25_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox25.CheckedChanged

        If CheckBox25.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 75
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 75
        End If
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHalfmoon.Click
        GroupBox2.Hide()
        GroupBox3.Hide()
        GroupBox4.Hide()

        GroupBox6.Show()


    End Sub

    Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
        'If RadioButton1.Checked = True Then
        '    TextBox2.Text = 85
        'End If
    End Sub

    Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
        'If RadioButton2.Checked = True Then
        '    TextBox2.Text = 150 + Val(TextBox1.Text)
        'End If
    End Sub

    Private Sub CheckBox19_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox19.CheckedChanged
        If CheckBox19.Checked = True Then
            RadioButton1.Enabled = True
            RadioButton2.Enabled = True
            TextBox6.Show()
        Else
            RadioButton1.Enabled = False
            RadioButton2.Enabled = False
            TextBox6.Hide()
            txtPrecoComida.Text = Val(txtPrecoComida.Text) - Val(txtPrecoComida.Text)
        End If

    End Sub

    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        btnConcluirCompra.Enabled = False
        TextBox6.Hide()
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConcluirCompra.Click
        Form3.Show()
        Me.Hide()
        Form3.Label4.Text = txtTotal.Text
        Form3.Label6.Text = txtRecebido.Text
        Form3.Label7.Text = txtTroco.Text

    End Sub

    Private Sub TextBox4_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtRecebido.KeyPress
        If Char.IsLetter(e.KeyChar) Then
            e.Handled = True
        End If
    End Sub

    Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtRecebido.TextChanged

        txtTroco.Text = Val(txtRecebido.Text) - Val(txtTotal.Text)

        If Val(txtRecebido.Text) <= Val(txtTotal.Text) Then
            txtTroco.Text = "R$0.00"
            btnConcluirCompra.Enabled = False
        Else
            txtTroco.Text = "R$" & Val(txtTroco.Text) & ".00"
            btnConcluirCompra.Enabled = True
        End If
        If Val(txtTotal.Text) = Val(txtRecebido.Text) Then
            btnConcluirCompra.Enabled = True
        End If
    End Sub

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtPrecoBeta.TextChanged
        txtTotal.Text = Val(txtPrecoBeta.Text) + Val(txtPrecoComida.Text)
    End Sub

    Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtPrecoComida.TextChanged
        txtTotal.Text = Val(txtPrecoBeta.Text) + Val(txtPrecoComida.Text)
    End Sub




    Private Sub GroupBox6_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox6.Enter

    End Sub


    Private Sub CheckBox7_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
        If CheckBox7.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 75
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 75
        End If
    End Sub



    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSair.Click
        If (MessageBox.Show("Deseja encerrar o programa ?", "Encerrar", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes) Then
            Application.Exit()
        End If
    End Sub



    Private Sub PictureBox5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNovaTransacao.Click


        If txtPrecoBeta.Text = Nothing And txtPrecoComida.Text = Nothing And txtPrecoComida.Text = Nothing And txtTotal.Text = Nothing And txtRecebido.Text = Nothing And txtTroco.Text = Nothing Then
            MsgBox("Ops!")
        Else
            CheckBox1.Checked = False
            CheckBox2.Checked = False
            CheckBox3.Checked = False
            CheckBox4.Checked = False
            CheckBox5.Checked = False
            CheckBox6.Checked = False
            CheckBox7.Checked = False
            CheckBox8.Checked = False
            CheckBox9.Checked = False
            CheckBox10.Checked = False
            CheckBox11.Checked = False
            CheckBox12.Checked = False
            CheckBox13.Checked = False
            CheckBox14.Checked = False
            CheckBox15.Checked = False
            CheckBox16.Checked = False
            CheckBox17.Checked = False
            CheckBox18.Checked = False
            CheckBox19.Checked = False
            CheckBox25.Checked = False
            CheckBox26.Checked = False
            CheckBox27.Checked = False
            CheckBox28.Checked = False
            CheckBox29.Checked = False
            CheckBox30.Checked = False
            txtPrecoBeta.Text = Nothing
            txtPrecoComida.Text = Nothing
            txtTotal.Text = Nothing
            txtRecebido.Text = Nothing
            txtTroco.Text = Nothing
        End If













    End Sub

    Private Sub CheckBox7_CheckedChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox7.CheckedChanged
        If CheckBox7.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 75
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 75
        End If
    End Sub

    Private Sub CheckBox8_CheckedChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox8.CheckedChanged
        If CheckBox8.Checked = True Then
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) + 75
        Else
            txtPrecoBeta.Text = Val(txtPrecoBeta.Text) - 75
        End If
    End Sub


    Private Sub TextBox5_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtTroco.TextChanged

    End Sub

    Private Sub TextBox6_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox6.TextChanged
        If RadioButton1.Checked = True Then
            txtPrecoComida.Text = Val(TextBox6.Text) * 85
        ElseIf RadioButton2.Checked = True Then
            txtPrecoComida.Text = Val(TextBox6.Text) * 150
        End If

    End Sub
End Class