mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-20 19:49:12 +00:00
2/11/23 - Código para activar la Geocerca desde el engrane.
- Se agregó código para activar o desactivar la geocerca en el engrane, se requiere ingresar la contraseña del supervisor
This commit is contained in:
@@ -28,6 +28,7 @@ Sub Class_Globals
|
||||
End Sub
|
||||
|
||||
'Inicializa la clase "kms_helperSubs".
|
||||
'Ej. kh.Initialize(Me, "kh")
|
||||
Public Sub Initialize (vCallback As Object, vEventName As String) As Object
|
||||
EventName = vEventName
|
||||
CallBack = vCallback
|
||||
@@ -576,6 +577,31 @@ Sub CheckNotificationAccess As Boolean
|
||||
Return nstr.Contains(pstr)
|
||||
End Sub
|
||||
|
||||
'Change CheckBox colors
|
||||
Sub SetButtonTintList(View As View, Disabled As Int, Enabled As Int) 'ignore
|
||||
Dim States(2,1) As Int
|
||||
Dim sd As StateListDrawable 'ignore
|
||||
States(0, 0) = sd.State_Enabled
|
||||
States(1, 0) = sd.State_Disabled
|
||||
Dim Color(2) As Int = Array As Int(Enabled, Disabled)
|
||||
Dim CSL As JavaObject
|
||||
CSL.InitializeNewInstance("android.content.res.ColorStateList",Array(States,Color))
|
||||
Dim jo As JavaObject
|
||||
jo.InitializeStatic("android.support.v4.widget.CompoundButtonCompat")
|
||||
jo.RunMethod("setButtonTintList", Array(View, CSL))
|
||||
End Sub
|
||||
|
||||
'Regresa si la geocerca se DEBE o NO de tomar en cuenta para la venta.
|
||||
Sub traeUsarGeocerca As Boolean 'ignore
|
||||
Private GC As Boolean = False
|
||||
Private x As Cursor = Starter.skmt.ExecQuery($"select CAT_VA_VALOR from CAT_VARIABLES where CAT_VA_DESCRIPCION = 'GEOCERCA'"$)
|
||||
If x.RowCount > 0 Then
|
||||
x.Position = 0
|
||||
If x.GetString("CAT_VA_VALOR") = "true" Then GC = True
|
||||
End If
|
||||
Return GC
|
||||
End Sub
|
||||
|
||||
'################ Manage External Storage (MES) #########################
|
||||
'
|
||||
''Inicializa "Manage External Storage" (MES), que nos da acceso a la tarjeta de memoria en Android 11+
|
||||
|
||||
Reference in New Issue
Block a user