\' Gambas class file
\' basado en el ejemplo de
\' http://codejavu.blogspot.com.es/2013/07/ejemplo-patron-abstract-factory.html
\' Convertido a Gambas3 por jsbsan
\' blog: jsbsan.blogspot.com
Private Fab_MicroBus As New FabricaMicroBuses
Private Fab_Bus As New FabricasBuses
Private Fab_Taxi As New FabricaTaxis
Public Sub Form_Open()
Me.Title = "Fabrica de Vehiculos"
Me.center
End
Public Sub Button1_Click()
Dim Fab As New FabricaDeVehiculos
If RadioButtonBus.value = True Then
Fab.crearFabricaDeVehiculos(fab_bus)
Endif
If RadioButtonMicroBus.value = True Then
Fab.crearFabricaDeVehiculos(fab_MicroBus)
Endif
If RadioButtonTaxi.value = True Then
Fab.crearFabricaDeVehiculos(fab_Taxi)
Endif
End