Sub Class_Globals
'__________BetterDialogsInput
Private BetterDialogs1 As BetterDialogs 'Trabajos con Dialogos (Libreria BetterDialogs )
Private IP As BD_InputBoxParams 'Trabajos con Dialogos (Libreria BetterDialogs )
Dim MyCursorPantallas As Cursor
Dim DR As Int
Dim IP1 As String
Dim TecladoSoft As IME
'__________BetterDialogsRadioButton
Private SVCheckBox As ScrollView2D 'Trabajos con ScrollView
Dim GD As GradientDrawable
Dim RadioBotonRespuestaTexto, RadioBotonRespuestaPosicion As String
Dim EsUnico As Boolean
Dim CheckBoxSeries(0) As CheckBox
Dim CheckedCambios As Boolean = False
Dim L1 As List
End Sub
Public Sub Initialize(MySQL As String)
MyCursorPantallas=Main.MySQLMain.ExecQuery(MySQL)
End Sub
'++++++++++++++++++++ BetterDialogsInput ++++++++++++++++++++++++++++++++++++++++ BetterDialogsInput ++++++++++++++++++++
Public Sub Input(Posicion As Int,Texto As String,Texto1 As String)
MyCursorPantallas.Position = Posicion
IP.Initialize
IP.Default = Texto 'Texto
IP.HintColor = Colors.Red 'Color de la Insinuación
IP.InputTextSize = Modulo1.IntToDIP(30) 'Tamaño de letra del Input
IP.Gravity = Gravity.CENTER_VERTICAL + Gravity.CENTER_HORIZONTAL 'Horientacion
IP.Multiline = False 'Multiples lineas
IP.QuestionTextSize = Modulo1.IntToDIP(30) 'Tamaño de letra de la Pregunta
IP.SpaceBetween = 4dip 'Espacio entre la Pregunta y el Input.
IP.ValidationCallback = "Input_Validation" 'Validar datos
IP.WithSuggestions =True 'Teclado con Sugerencias
IP.Format = MyCursorPantallas.GetString ("Format") 'Formato
IP.Hint = MyCursorPantallas.GetString ("Hint") 'Insinuación
IP.Question = MyCursorPantallas.GetString ("Question") 'Pregunta
Select MyCursorPantallas.GetString ("Teclado") 'Tipo de teclado
Case 1 'Numeros con decimales
IP.InputType = IP.INPUT_TYPE_DECIMAL_NUMBERS
Case 2 'Numeros
IP.InputType = IP.INPUT_TYPE_NUMBERS
Case 3 'Numeros con signos
IP.InputType = IP.INPUT_TYPE_NUMBERS_WITH_SIGN
Case 4 'Telefono
IP.InputType = IP.INPUT_TYPE_PHONE
Case 5 'Texto
IP.InputType = IP.INPUT_TYPE_TEXT
Case 6 'Texto con 1º letra mayuscula
IP.InputType = IP.INPUT_TYPE_TEXT_WITH_CAPS
End Select
TecladoSoft.HideKeyboard
If Texto1 <> "" Then Texto = Texto1
If MyCursorPantallas.GetString ("Necesario") = "True" And IP.Default = "" Then
DR = BetterDialogs1.InputBox(MyCursorPantallas.GetString ("Nombre") & " " & Main.TituloAdicionalImput, IP, "Ok", "", "", "")
Else
DR = BetterDialogs1.InputBox(MyCursorPantallas.GetString ("Nombre") & " " & Main.TituloAdicionalImput, IP, "Ok", "Cancelar", "", "")
End If
If DR = DialogResponse.POSITIVE Then
IP1 = IP.CompactAnswer.Replace("'","´")
Else
IP1 = Texto
End If
End Sub
'__________Valida el BetterDialogs
Sub Input_Validation(Answer As String, CompactAnswer As String) As String
TecladoSoft.HideKeyboard
If CompactAnswer.Length>MyCursorPantallas.GetString ("Caracteres") Then
Modulo1.Sonido_Error
Return CompactAnswer.Length & " Carácteres." & CRLF & "Maximo " & MyCursorPantallas.GetString ("Caracteres") & " carácteres"
Else If CompactAnswer = "" And MyCursorPantallas.GetString ("Necesario")= "True" Then
Modulo1.Sonido_Error
Return "No puede estar vacio"
Else
Return ""
End If
End