mirror of
https://github.com/KeymonSoft/Monitor-Keymon.git
synced 2026-04-17 21:06:19 +00:00
- VERSION 5.04.22
- Se agregó que guarde en base de datos el estatus de "Activo", asi si se desactiva el servicio, cuando se reinicia, o el sistema lo mata y luego reinicia, mantiene el estatus seleccionado.
This commit is contained in:
@@ -179,6 +179,19 @@ Sub B4XPage_Appear
|
||||
b_notifAccess.Text = "Permisos Activos"
|
||||
End If
|
||||
CallSubDelayed(Monitor, "Timer1_Tick")
|
||||
If Not(s.traeActivo) Then
|
||||
cd1.Initialize(Colors.red, 10dip)
|
||||
b_monitorActivo.Background = cd1
|
||||
b_monitorActivo.Text = "Monitor Apagado"
|
||||
l_status.Text = "Monitor Apagado"
|
||||
b_ping.Text = "En pausa"
|
||||
Monitor.Timer1.Enabled = False
|
||||
Else
|
||||
cd1.Initialize(Colors.RGB(16, 141, 0), 10dip)
|
||||
b_monitorActivo.Background = cd1
|
||||
b_monitorActivo.Text = "Monitor Activo"
|
||||
l_status.Text = "Monitor Activo"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub B4XPage_CloseRequest As ResumableSub
|
||||
@@ -207,20 +220,27 @@ End Sub
|
||||
|
||||
Private Sub b_monitorActivo_Click
|
||||
If logger Then Log(Starter.DBReqServer)
|
||||
If Starter.monitorActivo Then
|
||||
Log("YYY: " & Starter.monitorActivo)
|
||||
If s.traeActivo Then
|
||||
cd1.Initialize(Colors.red, 10dip)
|
||||
b_monitorActivo.Background = cd1
|
||||
b_monitorActivo.Text = "Monitor Apagado"
|
||||
l_status.Text = "Monitor Apagado"
|
||||
Starter.monitorActivo = False
|
||||
' Starter.monitorActivo = False
|
||||
s.notiHigh("Con internet ✅", $"Monitor APAGADO ❌"$, Monitor.nid, Main)
|
||||
Starter.skmt.ExecNonQuery2("delete from CAT_VARIABLES where nombre = ?", Array As Object ("monitorActivo"))
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(nombre, valor) VALUES (?,?)", Array As Object ("monitorActivo","0"))
|
||||
Monitor.Timer1.Enabled = False
|
||||
b_ping.Text = "En pausa"
|
||||
Else
|
||||
cd1.Initialize(Colors.RGB(16, 141, 0), 10dip)
|
||||
b_monitorActivo.Background = cd1
|
||||
b_monitorActivo.Text = "Monitor Activo"
|
||||
l_status.Text = "Monitor Activo"
|
||||
CallSubDelayed(Monitor, "Timer1_Tick")
|
||||
Starter.monitorActivo = True
|
||||
' Starter.monitorActivo = True
|
||||
Starter.skmt.ExecNonQuery2("delete from CAT_VARIABLES where nombre = ?", Array As Object ("monitorActivo"))
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(nombre, valor) VALUES (?,?)", Array As Object ("monitorActivo","1"))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user