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)
|
||||
If p_engrane.Visible Then
|
||||
p_engrane.Visible = False
|
||||
End If
|
||||
Return False
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'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"
|
||||
l_status.Text = "Monitor Activo"
|
||||
CallSubDelayed(Monitor, "Timer1_Tick")
|
||||
Starter.monitorActivo = False
|
||||
Starter.monitorActivo = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -399,9 +399,9 @@ Sub traeIntervaloDeBD As String 'ignore
|
||||
Return intrvl
|
||||
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
|
||||
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'")
|
||||
If rs.RowCount > 0 Then
|
||||
rs.NextRow
|
||||
|
||||
@@ -36,7 +36,7 @@ Version=12.2
|
||||
#Region Project Attributes
|
||||
#ApplicationLabel: Monitor Keymon
|
||||
#VersionCode: 1
|
||||
#VersionName: 3.09.09
|
||||
#VersionName: 3.09.10
|
||||
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
||||
#SupportedOrientations: portrait
|
||||
#CanInstallToExternalStorage: False
|
||||
|
||||
@@ -19,7 +19,7 @@ Sub Process_Globals
|
||||
Dim Interval As Int
|
||||
Dim s As C_Subs
|
||||
Dim nid As Int = 51043
|
||||
Dim monitorActivo As Boolean = True
|
||||
' Dim monitorActivo As Boolean = True
|
||||
Dim InternetOk As Boolean = True
|
||||
Dim DBReqServerOk As Boolean = True
|
||||
Dim DBOk As Boolean = True
|
||||
@@ -55,9 +55,11 @@ End Sub
|
||||
|
||||
Sub Timer1_Tick
|
||||
' Log("Next run " & DateTime.Time(DateTime.Now + Interval * 1000))
|
||||
If Starter.monitorActivo Then
|
||||
DateTime.DateFormat = "dd/MM HH:mm:ss"
|
||||
If B4XPages.IsInitialized Then B4XPages.MainPage.l_ultimoPing.Text = $"Último ping: ${DateTime.Date(DateTime.now)}"$
|
||||
If monitorActivo Then probamosConexion
|
||||
probamosConexion
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Sub probamosConexion
|
||||
@@ -108,11 +110,11 @@ Sub JobDone(Job As HttpJob)
|
||||
|
||||
Dim cd1 As ColorDrawable
|
||||
cd1.Initialize(Colors.Red, 10dip)
|
||||
B4XPages.MainPage.b_ping.Background = cd1
|
||||
B4XPages.MainPage.b_ping.Text = "DBReqServer KO"
|
||||
If B4XPages.IsInitialized Then B4XPages.MainPage.b_ping.Background = cd1
|
||||
If B4XPages.IsInitialized Then B4XPages.MainPage.b_ping.Text = "DBReqServer KO"
|
||||
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
|
||||
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
|
||||
Else
|
||||
If Job.JobName = "DBRequest" Then DBReqServerOk = True
|
||||
|
||||
Reference in New Issue
Block a user