Advertisement
jsbsan

fmainPatronFactory

Oct 23rd, 2013
1,869
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GAMBAS 0.76 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement