Advertisement
jsbsan

estrategiaBorrar

Jan 19th, 2014
2,130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GAMBAS 0.72 KB | None | 0 0
  1. ' Gambas class file
  2.  
  3. Inherits InterfaceCrearComando
  4. Private comandotmpBorrar As New Borrar
  5.  
  6. Public Sub guard(valor As String) As Boolean
  7.  
  8.   If valor = ("Borrar") Then
  9.     Return True
  10.   Else
  11.     Return False
  12.   Endif
  13.  
  14. End
  15.  
  16. Public Sub crearComando(linea As String) As Comando
  17.  
  18.   Dim palabras As New String[]
  19.   Dim listaExtensiones As New String[]
  20.  
  21.   palabras = Split(linea, gb.Tab)
  22.   palabras = Split(linea, gb.Tab)
  23.   If palabras.count = 0 Then
  24.     Return Null
  25.   Else
  26.     comandotmpBorrar.nombre = palabras[0] 'nombre
  27.     listaExtensiones = Split(Replace$(palabras[2], ",", ";"), ";") 'extensiones
  28.     comandotmpBorrar.extensiones = listaExtensiones
  29.     Return comandotmpBorrar
  30.   Endif
  31.  
  32. End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement