Professional Documents
Culture Documents
vhoraentrada = 0
Dim Player As New System.Media.SoundPlayer
Try
Player.SoundLocation = "erro.wav"
Player.LoadAsync()
If Player.IsLoadCompleted Then Player.Play()
Catch ex As Exception
End Try
MessageBox.Show("Horário incorrecto, Volte a inserir dados")
ElseIf vhoraentrada > 24 Then
vhoraentrada = 0
Dim Player As New System.Media.SoundPlayer
Try
Player.SoundLocation = "erro.wav"
Player.LoadAsync()
If Player.IsLoadCompleted Then Player.Play()
Catch ex As Exception
End Try
MessageBox.Show("Horário incorrecto, Volte a inserir dados")
End If
Loop Until vhoraentrada >= 7 And vhoraentrada < 24
Do
vminutoentrada = Val(InputBox("Complete e insira a informação dos
Minutos", "Hora"))
If vminutoentrada > 59 Then
vminutoentrada = -1
End Try
End If
Loop Until vminutoentrada >= 0 And vminutoentrada < 60
ventrada = (vhoraentrada * 60) + vminutoentrada
If ventrada > 1350 Then
MessageBox.Show("Atenção o ESSES Park encerra à Meia Noite", "Aviso!!!")
End If
End Sub
lblduracao.Text = ""
lbllegendaduracao.Text = ""
lblvalor.Text = ""
lbllegendavalorapagar.Text = ""
Dim Player As New System.Media.SoundPlayer
Try
Player.SoundLocation = "erro.wav"
Player.LoadAsync()
If Player.IsLoadCompleted Then Player.Play()
Catch ex As Exception
End Try
MessageBox.Show("Não efectuou o registo de entrada, Termine este
processo, Pagamento não válido!!! Clique no botão Reíniciar ou dirija-se à caixa
central")
End If
Do
vhorasaida = Val(InputBox("Insira a Hora de Saída", "Hora"))
If vhorasaida < 7 Or vhorasaida > 23 Then
vhorasaida = 0
Dim Player As New System.Media.SoundPlayer
Try
Player.SoundLocation = "erro.wav"
Player.LoadAsync()
If Player.IsLoadCompleted Then Player.Play()
Catch ex As Exception
End Try
MessageBox.Show("Horário incorrecto, insira valor entre 7 e 23")
End If
Loop Until vhorasaida >= 7 And vhorasaida < 24
Do
vminutosaida = Val(InputBox("Complete e insira a informação dos
Minutos", "Hora"))
If vminutosaida > 59 Then
End Try
MessageBox.Show("Horário incorrecto, Volte a inserir dados")
vminutosaida = -1
End If
Loop Until vminutosaida >= 0 And vminutosaida < 60
lblduracao.Text = ""
lbllegendaduracao.Text = ""
lbllegendavalorapagar.Text = ""
lbltroco.Text = ""
lblvalor.Text = ""
lbllegendahoraentrada.Text = ""
lbllegendahorasaida.Text = ""
lblhorasaida.Text = ""
lblhoraentrada.Text = ""
Dim Player As New System.Media.SoundPlayer
Try
Player.SoundLocation = "erro.wav"
Player.LoadAsync()
If Player.IsLoadCompleted Then Player.Play()
Catch ex As Exception
End Try
MessageBox.Show("Algo está errado, a sua hora de saída é inferior á sua
hora de entrada. Reínicie o processo de registo")
End If
If vvalor > 0 Then
MessageBox.Show("Muito Obrigado. Efetue Pagamento", "Efetuar Pagamento")
End If
End Sub
lblduracao.Text = ""
lbllegendaduracao.Text = ""
lblvalor.Text = ""
lbllegendavalorapagar.Text = ""
vtroco = 0
Dim Player As New System.Media.SoundPlayer
Try
Player.SoundLocation = "erro.wav"
Player.LoadAsync()
If Player.IsLoadCompleted Then Player.Play()
Catch ex As Exception
End Try
MessageBox.Show("Faça os registos de entrada ou saida. Insira valor
zero, carregue no botão Reíniciar ou dirija-se à caixa central")
End If
vsoma = 0
Do
vnum = Val(InputBox("Insira o valor", "Pagamento"))
End Try
MessageBox.Show("Insira o valor de moeda correcto", "Valor")
vnum = 0
End Select
If vtroco = 0 Then
MessageBox.Show("Pagamento efetuado. Muito obrigado", "Obrigado")
Dim Player As New System.Media.SoundPlayer
Try
Player.SoundLocation = "impressora.wav"
Player.LoadAsync()
If Player.IsLoadCompleted Then Player.Play()
Catch ex As Exception
End Try
Else
MessageBox.Show("Pagamento efectuado. Muito obrigado, recolha o seu
troco no valor de " & Format(vtroco, "0.00€"), "Obrigado")
Dim Player As New System.Media.SoundPlayer
Try
Player.SoundLocation = "impressora.wav"
Player.LoadAsync()
If Player.IsLoadCompleted Then Player.Play()
Catch ex As Exception
End Try
End If
If vcinco = 0 Then
euro5.Visible = False
Else
euro5.Visible = True
End If
vvinte = ((((vnotamoeda Mod 500) Mod 200) Mod 100) Mod 50) \ 20
If vvinte = 0 Then
euro20ctns.Visible = False
euro20actns.Visible = False
ElseIf vvinte = 1 Then
euro20ctns.Visible = True
euro20actns.Visible = False
ElseIf vvinte = 2 Then
euro20ctns.Visible = True
euro20actns.Visible = True
End If
vdez = (((((vnotamoeda Mod 500) Mod 200) Mod 100) Mod 50) Mod 20) \ 10
If vdez = 0 Then
euro10.Visible = False
Else
euro10.Visible = True
End If
End Sub
End Sub
End Try
lblduracao.Text = ""
lbllegendaduracao.Text = ""
lbllegendavalorapagar.Text = ""
lbltroco.Text = ""
lblvalor.Text = ""
lbllegendahoraentrada.Text = ""
lbllegendahorasaida.Text = ""
lblhorasaida.Text = ""
lblhoraentrada.Text = ""
euro10.Visible = False
eurodez.Visible = False
euro1.Visible = False
euro2.Visible = False
euro20actns.Visible = False
euro20ctns.Visible = False
euro2a.Visible = False
euro50ctns.Visible = False
euro5.Visible = False
ventrada = 0
End Sub
End Sub
End Class