document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. \' Gambas class file
  2.  
  3. \' basado en el ejemplo de
  4. \' http://codejavu.blogspot.com.es/2013/07/ejemplo-patron-abstract-factory.html
  5. \' Convertido a Gambas3 por  jsbsan
  6. \' blog: jsbsan.blogspot.com
  7. Private Fab_MicroBus As New FabricaMicroBuses
  8. Private Fab_Bus As New FabricasBuses
  9. Private Fab_Taxi As New FabricaTaxis
  10.  
  11. Public Sub Form_Open()
  12.  
  13.   Me.Title = "Fabrica de Vehiculos"
  14.   Me.center
  15.  
  16. End
  17.  
  18. Public Sub Button1_Click()
  19.  
  20.   Dim Fab As New FabricaDeVehiculos
  21.  
  22.   If RadioButtonBus.value = True Then
  23.     Fab.crearFabricaDeVehiculos(fab_bus)
  24.   Endif
  25.   If RadioButtonMicroBus.value = True Then
  26.     Fab.crearFabricaDeVehiculos(fab_MicroBus)
  27.   Endif
  28.   If RadioButtonTaxi.value = True Then
  29.     Fab.crearFabricaDeVehiculos(fab_Taxi)
  30.   Endif
  31.  
  32. End
');