mirror of
https://github.com/KeymonSoft/Monitor-Keymon.git
synced 2026-04-17 21:06:19 +00:00
11/9/23 - Correcciones varias
- El bototn de desactivar el monitor no funcionaba - Se cambio el timeout por default - ...
This commit is contained in:
@@ -104,8 +104,10 @@ Private Sub B4XPage_CloseRequest As ResumableSub
|
|||||||
Sleep(0)
|
Sleep(0)
|
||||||
If p_engrane.Visible Then
|
If p_engrane.Visible Then
|
||||||
p_engrane.Visible = False
|
p_engrane.Visible = False
|
||||||
|
Return False
|
||||||
|
Else
|
||||||
|
Return True
|
||||||
End If
|
End If
|
||||||
Return False
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Revisa si la aplicación tiene permiso para acceder a las notificaciones.
|
'Revisa si la aplicación tiene permiso para acceder a las notificaciones.
|
||||||
@@ -137,7 +139,6 @@ Private Sub b_monitorActivo_Click
|
|||||||
b_monitorActivo.Text = "Monitor Activo"
|
b_monitorActivo.Text = "Monitor Activo"
|
||||||
l_status.Text = "Monitor Activo"
|
l_status.Text = "Monitor Activo"
|
||||||
CallSubDelayed(Monitor, "Timer1_Tick")
|
CallSubDelayed(Monitor, "Timer1_Tick")
|
||||||
Starter.monitorActivo = False
|
|
||||||
Starter.monitorActivo = True
|
Starter.monitorActivo = True
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -399,9 +399,9 @@ Sub traeIntervaloDeBD As String 'ignore
|
|||||||
Return intrvl
|
Return intrvl
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Regresa el timeout desde la base de datos o "1250" si no existe.
|
'Regresa el timeout desde la base de datos o "9000" si no existe.
|
||||||
Sub traeTimeoutDeBD As String 'ignore
|
Sub traeTimeoutDeBD As String 'ignore
|
||||||
Dim tmout As String = "1250"
|
Dim tmout As String = "9000"
|
||||||
Dim rs As ResultSet = Starter.skmt.ExecQuery("select valor from cat_variables where nombre = 'timeout'")
|
Dim rs As ResultSet = Starter.skmt.ExecQuery("select valor from cat_variables where nombre = 'timeout'")
|
||||||
If rs.RowCount > 0 Then
|
If rs.RowCount > 0 Then
|
||||||
rs.NextRow
|
rs.NextRow
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ Version=12.2
|
|||||||
#Region Project Attributes
|
#Region Project Attributes
|
||||||
#ApplicationLabel: Monitor Keymon
|
#ApplicationLabel: Monitor Keymon
|
||||||
#VersionCode: 1
|
#VersionCode: 1
|
||||||
#VersionName: 3.09.09
|
#VersionName: 3.09.10
|
||||||
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
||||||
#SupportedOrientations: portrait
|
#SupportedOrientations: portrait
|
||||||
#CanInstallToExternalStorage: False
|
#CanInstallToExternalStorage: False
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ Sub Process_Globals
|
|||||||
Dim Interval As Int
|
Dim Interval As Int
|
||||||
Dim s As C_Subs
|
Dim s As C_Subs
|
||||||
Dim nid As Int = 51043
|
Dim nid As Int = 51043
|
||||||
Dim monitorActivo As Boolean = True
|
' Dim monitorActivo As Boolean = True
|
||||||
Dim InternetOk As Boolean = True
|
Dim InternetOk As Boolean = True
|
||||||
Dim DBReqServerOk As Boolean = True
|
Dim DBReqServerOk As Boolean = True
|
||||||
Dim DBOk As Boolean = True
|
Dim DBOk As Boolean = True
|
||||||
@@ -55,9 +55,11 @@ End Sub
|
|||||||
|
|
||||||
Sub Timer1_Tick
|
Sub Timer1_Tick
|
||||||
' Log("Next run " & DateTime.Time(DateTime.Now + Interval * 1000))
|
' Log("Next run " & DateTime.Time(DateTime.Now + Interval * 1000))
|
||||||
DateTime.DateFormat = "dd/MM HH:mm:ss"
|
If Starter.monitorActivo Then
|
||||||
If B4XPages.IsInitialized Then B4XPages.MainPage.l_ultimoPing.Text = $"Último ping: ${DateTime.Date(DateTime.now)}"$
|
DateTime.DateFormat = "dd/MM HH:mm:ss"
|
||||||
If monitorActivo Then probamosConexion
|
If B4XPages.IsInitialized Then B4XPages.MainPage.l_ultimoPing.Text = $"Último ping: ${DateTime.Date(DateTime.now)}"$
|
||||||
|
probamosConexion
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub probamosConexion
|
Sub probamosConexion
|
||||||
@@ -108,11 +110,11 @@ Sub JobDone(Job As HttpJob)
|
|||||||
|
|
||||||
Dim cd1 As ColorDrawable
|
Dim cd1 As ColorDrawable
|
||||||
cd1.Initialize(Colors.Red, 10dip)
|
cd1.Initialize(Colors.Red, 10dip)
|
||||||
B4XPages.MainPage.b_ping.Background = cd1
|
If B4XPages.IsInitialized Then B4XPages.MainPage.b_ping.Background = cd1
|
||||||
B4XPages.MainPage.b_ping.Text = "DBReqServer KO"
|
If B4XPages.IsInitialized Then B4XPages.MainPage.b_ping.Text = "DBReqServer KO"
|
||||||
s.notiHigh("Con internet", $"El servidor ${Starter.DBReqServer} NO responde!!"$, nid, Main)
|
s.notiHigh("Con internet", $"El servidor ${Starter.DBReqServer} NO responde!!"$, nid, Main)
|
||||||
If Job.ErrorMessage.Contains("failed to connect") Or Job.ErrorMessage.Contains("Failed to connect") Then
|
If Job.ErrorMessage.Contains("failed to connect") Or Job.ErrorMessage.Contains("Failed to connect") Then
|
||||||
ToastMessageShow("¡Hubo un error contactando al servidor, por favor revise su conexión!", True)
|
' ToastMessageShow("¡Hubo un error contactando al servidor, por favor revise su conexión!", True)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If Job.JobName = "DBRequest" Then DBReqServerOk = True
|
If Job.JobName = "DBRequest" Then DBReqServerOk = True
|
||||||
|
|||||||
Reference in New Issue
Block a user