mirror of
https://github.com/KeymonSoft/Monitor-Keymon.git
synced 2026-04-17 21:06:19 +00:00
18/10/23 - Se agregó que el monitor haga un ping a la IP 8.8.8.8 e indique el resultado
This commit is contained in:
@@ -5,7 +5,7 @@ Type=Class
|
||||
Version=9.85
|
||||
@EndOfDesignText@
|
||||
#Region Shared Files
|
||||
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
|
||||
'#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
|
||||
'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
|
||||
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
|
||||
'###########################################################################################################
|
||||
@@ -25,13 +25,15 @@ Version=9.85
|
||||
Sub Class_Globals
|
||||
Private Root As B4XView
|
||||
Private xui As XUI
|
||||
Dim ph As Phone
|
||||
Public login As B4XMainPage
|
||||
Dim s As C_Subs
|
||||
Private b_monitorActivo As Button
|
||||
Private p_bMonitor As Panel
|
||||
' Private p_bMonitor As Panel
|
||||
Private l_version As Label
|
||||
Dim l_status As Label
|
||||
Private p_estatus As Panel
|
||||
Dim cb_conexion As CheckBox
|
||||
Dim cb_internet As CheckBox
|
||||
Dim cb_dbreqserver As CheckBox
|
||||
Dim cb_db As CheckBox
|
||||
@@ -56,6 +58,7 @@ Sub Class_Globals
|
||||
Private clv_server As CustomListView
|
||||
Private p_listItemServer As Panel
|
||||
Private l_server As Label
|
||||
Private l_info As Label
|
||||
End Sub
|
||||
|
||||
Public Sub Initialize
|
||||
@@ -81,6 +84,7 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
#if not(DEBUG)
|
||||
logger = False
|
||||
#end if
|
||||
s.centraEtiqueta(l_info, Root.Width)
|
||||
End Sub
|
||||
|
||||
Sub B4XPage_Appear
|
||||
@@ -130,7 +134,6 @@ End Sub
|
||||
|
||||
'Revisa si la aplicación tiene permiso para acceder a las notificaciones.
|
||||
Sub CheckNotificationAccess As Boolean
|
||||
Dim ph As Phone
|
||||
Dim nstr, pstr As String
|
||||
Dim r As Reflector
|
||||
pstr = r.GetStaticField("anywheresoftware.b4a.BA", "packageName")
|
||||
@@ -218,6 +221,18 @@ Private Sub b_ping_Click
|
||||
b_ping.Background = cd1
|
||||
b_ping.Text = "Buscando ..."
|
||||
CallSubDelayed(Monitor, "Timer1_Tick")
|
||||
|
||||
CallSubDelayed(Monitor, "probamosConexion")
|
||||
|
||||
|
||||
' Wait For (ph.ShellAsync("ping", Array As String("-c 1","-W 2", "8.8.8.8"))) Complete (Success As Boolean, ExitValue As Int, StdOut As String, StdErr As String)
|
||||
' If Success Then
|
||||
' Log("ExitValue:" & ExitValue)
|
||||
' Log("StdError:" & StdErr)
|
||||
' LogColor("StdOut: " & StdOut, Colors.Magenta)
|
||||
' Else
|
||||
' Log("Error: " & LastException)
|
||||
' End If
|
||||
End Sub
|
||||
|
||||
Private Sub b_timeout_Click
|
||||
@@ -245,3 +260,28 @@ Sub CreateListItem(Text As String, Width As Int, Height As Int) As Panel 'ignore
|
||||
' i_prod.Bitmap = img
|
||||
Return p
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub l_info_Click
|
||||
l_info.Visible = False
|
||||
End Sub
|
||||
|
||||
Private Sub l_db_Click
|
||||
l_info.Visible = True
|
||||
End Sub
|
||||
|
||||
Private Sub l_dbreqserver_Click
|
||||
l_info.Visible = True
|
||||
End Sub
|
||||
|
||||
Private Sub l_internet_Click
|
||||
l_info.Visible = True
|
||||
End Sub
|
||||
|
||||
Private Sub l_conexion_Click
|
||||
l_info.Visible = True
|
||||
End Sub
|
||||
|
||||
Private Sub p_Main_Click
|
||||
l_info.Visible = False
|
||||
End Sub
|
||||
Reference in New Issue
Block a user