Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' Gambas class file
- Public bebidaElegida As New Bebida
- Public Sub Form_Open()
- Me.center()
- RadioButtonHouse_Click() 'elijo una bebida inicialmente
- End
- Public Sub ToolButtonCalcular_Click()
- 'reviso los checkbox, si esta true, lo añado....
- If CheckBoxCanela.Value = True Then bebidaElegida = New Canela(bebidaElegida)
- If CheckBoxChocolate.Value = True Then bebidaElegida = New Chocolate(bebidaElegida)
- If CheckBoxLeche.Value = True Then bebidaElegida = New Leche(bebidaElegida)
- If CheckBoxLecheCond.Value = True Then bebidaElegida = New LecheCondensada(bebidaElegida)
- If CheckBoxHielo.Value = True Then bebidaElegida = New Hielo(bebidaElegida)
- TextLabelCafeACrear.text = bebidaElegida.getDescripcion() & " Coste " & Format(bebidaElegida.cost(), "0#.##") & " €"
- ToolButtonCalcular.Enabled = False
- End
- Public Sub RadioButtonHouse_Click()
- bebidaElegida = New HouseBlend
- End
- Public Sub RadioButtonDark_Click()
- bebidaElegida = New DarkRoast
- End
- Public Sub RadioButtonDecaf_Click()
- bebidaElegida = New Decaf
- End
- Public Sub RadioButtonEspreso_Click()
- bebidaElegida = New Espresso
- End
- Public Sub ButtonReiniciar_Click()
- CheckBoxCanela.value = False
- CheckBoxChocolate.value = False
- CheckBoxHielo.value = False
- CheckBoxLeche.value = False
- CheckBoxLecheCond.value = False
- RadioButtonHouse.Value = True
- ToolButtonCalcular.Enabled = True
- TextLabelCafeACrear.text = ""
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement