Dim NA, NG, MR, SP, TM, TB, MD As String
Dim a, b, c, d, f, g, h As Double
Dim pesan, minum As String
Dim Jumlah As Double
Dim i As Integer = 0
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
i = 0
Me.ProgressBar1.Value = 0
Me.Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
i += 10
If Me.ProgressBar1.Value < Me.ProgressBar1.Maximum Then
Me.ProgressBar1.Value += 10
End If
If i = 150 Then
If Me.CheckBox1.Checked = True Then
NA = "Nasi Goreng + Ayam Goreng Rp.7000" & vbCrLf
a = 7000
Else
NA = ""
a = 0
End If
If Me.CheckBox2.Checked = True Then
NG = "Nasi Goreng Rp.6000" & vbCrLf
b = 6000
Else
NG = ""
b = 0
End If
If Me.CheckBox3.Checked = True Then
MR = "Mie Rebus Rp.6000" & vbCrLf
c = 6000
Else
MR = ""
c = 0
End If
If Me.CheckBox4.Checked = True Then
SP = "Sate Padang Rp.6000" & vbCrLf
d = 6000
Else
SP = ""
d = 0
End If
If Me.CheckBox5.Checked = True Then
TM = "Tea Manis Rp.2000" & vbCrLf
f = 2000
Else
TM = ""
f = 0
End If
If Me.CheckBox6.Checked = True Then
TB = "Tea Botol Rp.3000" & vbCrLf
g = 3000
Else
TB = ""
g = 0
End If
If Me.CheckBox7.Checked = True Then
MD = "Manis Dingin Rp.3000" & vbCrLf
h = 3000
Else
MD = ""
h = 0
End If
pesan = NA + NG + MR + SP
minum = TM + TB + MD
Me.Lbl3.Text = "Makanan yang Dipesan adalah : " & vbNewLine & pesan & vbNewLine & vbNewLine & "Minuman yang dipesan adalah :" & vbNewLine & minum & vbNewLine
Jumlah = a + b + c + d + f + g + h
Me.Lbl4.Text = "Jumlah Bayar : " & Jumlah
Me.Timer1.Stop()
MsgBox("Terima Kasih Atas Kunjungan Anda Lae")
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.ProgressBar1.Maximum = 100
Me.ProgressBar1.Minimum = 0
Me.ProgressBar1.Value = 0
End Sub
End Class
Tidak ada komentar:
Posting Komentar
Berkomentarlah yang baik..