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:
@@ -103,6 +103,12 @@ Sub Class_Globals
|
||||
Private b_cargaLocalCancelar As Button
|
||||
Private p_botones As Panel
|
||||
Private b_importarBD As Button
|
||||
Private cb_geocerca As CheckBox
|
||||
Private p_geocerca As Panel
|
||||
Private et_geocerca As EditText
|
||||
Private b_geocerca As Button
|
||||
Private l_greocerca As Label
|
||||
Private b_aceptarGC As Button
|
||||
End Sub
|
||||
|
||||
Public Sub Initialize
|
||||
@@ -343,6 +349,8 @@ Sub B4XPage_Appear
|
||||
End If
|
||||
End If
|
||||
kh.RD_Init
|
||||
kh.SetButtonTintList(cb_geocerca, Colors.LightGray, Colors.RGB(43, 154, 211))
|
||||
cb_geocerca.Checked = kh.traeUsarGeocerca
|
||||
' server = "http://keymon.com.mx:1782"
|
||||
' server = "http://201.99.139.28:1782"
|
||||
' server = "http://177.244.63.54:1782"
|
||||
@@ -596,7 +604,7 @@ Private Sub ImageView4_LongClick
|
||||
' Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
|
||||
' Wait For B4XPage_PermissionResult (Permission As String, Result As Boolean)
|
||||
' Subs.copiaDB(Result)
|
||||
Dim x As Int = "a"
|
||||
' Dim x As Int = "a"
|
||||
End Sub
|
||||
|
||||
Sub B_SERVER_Click
|
||||
@@ -734,4 +742,38 @@ Private Sub b_importarBD_Click
|
||||
Else
|
||||
ToastMessageShow($"¡BD importada!"$, True)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cb_geocerca_CheckedChange(Checked As Boolean)
|
||||
Starter.skmt.ExecNonQuery("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = 'GEOCERCA'")
|
||||
Starter.skmt.ExecNonQuery($"insert into CAT_VARIABLES (CAT_VA_DESCRIPCION, CAT_VA_VALOR) values ('GEOCERCA', '${Checked}')"$)
|
||||
End Sub
|
||||
|
||||
Private Sub et_geocerca_TextChanged (Old As String, New As String)
|
||||
Private x As Cursor = Starter.skmt.ExecQuery($"select CAT_VA_VALOR from CAT_VARIABLES where CAT_VA_DESCRIPCION = 'FINDIA_PASS'"$)
|
||||
If x.RowCount > 0 Then
|
||||
x.Position = 0
|
||||
If New = x.GetString("CAT_VA_VALOR") Then
|
||||
cb_geocerca.Enabled = True
|
||||
l_greocerca.TextColor = Colors.RGB(43, 154, 211)
|
||||
Else
|
||||
cb_geocerca.Enabled = False
|
||||
l_greocerca.TextColor = Colors.LightGray
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub b_geocerca_Click
|
||||
p_geocerca.Top = p_botones.Top
|
||||
kh.centraPanel(p_geocerca, Root.Width)
|
||||
p_geocerca.Elevation = 100dip
|
||||
p_geocerca.BringToFront
|
||||
p_geocerca.Visible = True
|
||||
End Sub
|
||||
|
||||
Private Sub p_geocerca_Click
|
||||
End Sub
|
||||
|
||||
Private Sub b_aceptarGC_Click
|
||||
p_geocerca.Visible = False
|
||||
End Sub
|
||||
Reference in New Issue
Block a user