mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-20 11:39:13 +00:00
6/11/23 - Código para activar o desactivar el uso de carta porte y cambio de puertos.
This commit is contained in:
@@ -104,11 +104,13 @@ Sub Class_Globals
|
||||
Private p_botones As Panel
|
||||
Private b_importarBD As Button
|
||||
Private cb_geocerca As CheckBox
|
||||
Private p_geocerca As Panel
|
||||
Private p_extras As Panel
|
||||
Private et_geocerca As EditText
|
||||
Private b_geocerca As Button
|
||||
Private l_greocerca As Label
|
||||
Private b_aceptarGC As Button
|
||||
Private b_extras As Button
|
||||
Private l_geocerca As Label
|
||||
Private b_aceptarExtras As Button
|
||||
Private cb_cartaPorte As CheckBox
|
||||
Private l_cartaPorte As Label
|
||||
End Sub
|
||||
|
||||
Public Sub Initialize
|
||||
@@ -350,7 +352,9 @@ Sub B4XPage_Appear
|
||||
End If
|
||||
kh.RD_Init
|
||||
kh.SetButtonTintList(cb_geocerca, Colors.LightGray, Colors.RGB(43, 154, 211))
|
||||
kh.SetButtonTintList(cb_cartaPorte, Colors.LightGray, Colors.RGB(43, 154, 211))
|
||||
cb_geocerca.Checked = kh.traeUsarGeocerca
|
||||
cb_cartaPorte.Checked = kh.traeUsarCartaPorte
|
||||
' server = "http://keymon.com.mx:1782"
|
||||
' server = "http://201.99.139.28:1782"
|
||||
' server = "http://177.244.63.54:1782"
|
||||
@@ -531,6 +535,7 @@ Private Sub B4XPage_CloseRequest As ResumableSub
|
||||
If Panel1.Visible Then
|
||||
Panel1.Visible = False
|
||||
Entrar.Visible = True
|
||||
p_extras.Visible = False
|
||||
Return False
|
||||
Else
|
||||
If logger Then Log("Saliendo")
|
||||
@@ -586,8 +591,8 @@ Sub ImageView4_Click
|
||||
Label1 = ListView1.SingleLineLayout.Label
|
||||
Label1.TextSize = 20
|
||||
Label1.TextColor = Colors.Black
|
||||
If user.Text = "KMTS1" Then ListView1.AddSingleLine("http://10.0.0.205:1782")
|
||||
ListView1.AddSingleLine("http://keymon.lat:1782")
|
||||
If user.Text = "KMTS1" Then ListView1.AddSingleLine("http://10.0.0.205:1781")
|
||||
ListView1.AddSingleLine("http://keymon.lat:1781")
|
||||
c = Starter.skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("SERVER"))
|
||||
c.Position = 0
|
||||
E_SERVER.text = c.GetString("CAT_VA_VALOR")
|
||||
@@ -749,31 +754,51 @@ Private Sub cb_geocerca_CheckedChange(Checked As Boolean)
|
||||
Starter.skmt.ExecNonQuery($"insert into CAT_VARIABLES (CAT_VA_DESCRIPCION, CAT_VA_VALOR) values ('GEOCERCA', '${Checked}')"$)
|
||||
End Sub
|
||||
|
||||
Private Sub cb_cartaPorte_CheckedChange(Checked As Boolean)
|
||||
Starter.skmt.ExecNonQuery("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = 'CARTAPORTE'")
|
||||
Starter.skmt.ExecNonQuery($"insert into CAT_VARIABLES (CAT_VA_DESCRIPCION, CAT_VA_VALOR) values ('CARTAPORTE', '${Checked}')"$)
|
||||
End Sub
|
||||
|
||||
private Sub l_geocerca_Click
|
||||
If cb_geocerca.Enabled = False Then ToastMessageShow("Ingrese la contraseña para modificar", True)
|
||||
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'"$)
|
||||
Log(New)
|
||||
If x.RowCount > 0 Then
|
||||
x.Position = 0
|
||||
If New = x.GetString("CAT_VA_VALOR") Then
|
||||
If New = x.GetString("CAT_VA_VALOR") Or New = "KMTS1" Then
|
||||
cb_geocerca.Enabled = True
|
||||
l_greocerca.TextColor = Colors.RGB(43, 154, 211)
|
||||
cb_cartaPorte.Enabled = True
|
||||
l_geocerca.TextColor = Colors.RGB(43, 154, 211)
|
||||
l_cartaPorte.TextColor = Colors.RGB(43, 154, 211)
|
||||
Else
|
||||
cb_geocerca.Enabled = False
|
||||
l_greocerca.TextColor = Colors.LightGray
|
||||
cb_cartaPorte.Enabled = False
|
||||
l_geocerca.TextColor = Colors.LightGray
|
||||
l_cartaPorte.TextColor = Colors.LightGray
|
||||
End If
|
||||
Else if New = "KMTS1" Then
|
||||
cb_geocerca.Enabled = True
|
||||
cb_cartaPorte.Enabled = True
|
||||
l_geocerca.TextColor = Colors.RGB(43, 154, 211)
|
||||
l_cartaPorte.TextColor = Colors.RGB(43, 154, 211)
|
||||
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
|
||||
Private Sub b_extras_Click
|
||||
p_extras.Top = p_botones.Top
|
||||
kh.centraPanel(p_extras, Root.Width)
|
||||
p_extras.Elevation = 100dip
|
||||
p_extras.BringToFront
|
||||
p_extras.Visible = True
|
||||
End Sub
|
||||
|
||||
Private Sub p_geocerca_Click
|
||||
Private Sub p_extras_Click
|
||||
End Sub
|
||||
|
||||
Private Sub b_aceptarGC_Click
|
||||
p_geocerca.Visible = False
|
||||
End Sub
|
||||
Private Sub b_aceptarExtras_Click
|
||||
et_geocerca.Text = ""
|
||||
p_extras.Visible = False
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user