mirror of
https://github.com/KeymonSoft/Monitor-Keymon.git
synced 2026-04-17 21:06:19 +00:00
21/11/23 - Cambios al diseño en engrane.
This commit is contained in:
@@ -37,8 +37,8 @@ Sub Class_Globals
|
||||
Dim cb_internet As CheckBox
|
||||
Dim cb_dbreqserver As CheckBox
|
||||
Dim cb_db As CheckBox
|
||||
Private b_intervalo As Button
|
||||
Private b_server As Button
|
||||
' Private b_intervalo As Button
|
||||
' Private b_server As Button
|
||||
Private et_server As EditText
|
||||
Private lv_server As ListView
|
||||
Private i_engrane As ImageView
|
||||
@@ -51,7 +51,7 @@ Sub Class_Globals
|
||||
Private p_timeout As Panel
|
||||
Private et_timeout As EditText
|
||||
Private l_timeout As Label
|
||||
Private b_timeout As Button
|
||||
' Private b_timeout As Button
|
||||
Private Label1 As Label
|
||||
Private b_notifAccess As Button
|
||||
Dim logger As Boolean = False
|
||||
@@ -59,6 +59,7 @@ Sub Class_Globals
|
||||
Private p_listItemServer As Panel
|
||||
Private l_server As Label
|
||||
Private l_info As Label
|
||||
Private b_guardaCambios As Button
|
||||
End Sub
|
||||
|
||||
Public Sub Initialize
|
||||
@@ -98,7 +99,7 @@ Sub B4XPage_Appear
|
||||
s.centraPanel(p_estatus, Root.Width)
|
||||
s.centraEtiqueta(l_status, Root.Width)
|
||||
s.centraEtiqueta(l_ultimoPing, Root.Width)
|
||||
s.centraPanel(p_intervalo, Root.Width)
|
||||
' s.centraPanel(p_intervalo, Root.Width)
|
||||
s.centraEtiqueta(Label1, Root.Width)
|
||||
If Not(CheckNotificationAccess) Then
|
||||
Msgbox2Async($"Se necesita acceso a las notificaciones, haga clic en "Aceptar" y en la siguiente pantalla permita el acceso a la aplicación "${Application.LabelName}"."$, "Permisos necesarios", "Aceptar", "Cancelar", "", Null, True)
|
||||
@@ -185,22 +186,22 @@ Private Sub clv_server_ItemClick (Index As Int, Value As Object)
|
||||
End Sub
|
||||
|
||||
Private Sub b_server_Click
|
||||
Starter.DBReqServer = et_server.text
|
||||
Starter.skmt.ExecNonQuery($"delete from cat_variables where nombre = 'servidor'"$)
|
||||
Starter.skmt.ExecNonQuery($"insert into cat_variables (nombre, valor) values ("servidor", '${et_server.text}')"$)
|
||||
CallSubDelayed(Monitor, "reinicializaReqManager")
|
||||
ToastMessageShow($"Servidor modificado"$, False)
|
||||
p_engrane.Visible = False
|
||||
CallSubDelayed(Monitor, "Timer1_Tick")
|
||||
' Starter.DBReqServer = et_server.text
|
||||
' Starter.skmt.ExecNonQuery($"delete from cat_variables where nombre = 'servidor'"$)
|
||||
' Starter.skmt.ExecNonQuery($"insert into cat_variables (nombre, valor) values ("servidor", '${et_server.text}')"$)
|
||||
' CallSubDelayed(Monitor, "reinicializaReqManager")
|
||||
' ToastMessageShow($"Servidor modificado"$, False)
|
||||
' p_engrane.Visible = False
|
||||
' CallSubDelayed(Monitor, "Timer1_Tick")
|
||||
End Sub
|
||||
|
||||
Private Sub b_intervalo_Click
|
||||
Monitor.Interval = et_intervalo.text
|
||||
Starter.skmt.ExecNonQuery($"delete from cat_variables where nombre = 'intervalo'"$)
|
||||
Starter.skmt.ExecNonQuery($"insert into cat_variables (nombre, valor) values ("intervalo", '${et_intervalo.text}')"$)
|
||||
ToastMessageShow($"Intervalo modificado"$, False)
|
||||
CallSubDelayed(Monitor, "Timer1_Tick")
|
||||
p_engrane.Visible = False
|
||||
' Monitor.Interval = et_intervalo.text
|
||||
' Starter.skmt.ExecNonQuery($"delete from cat_variables where nombre = 'intervalo'"$)
|
||||
' Starter.skmt.ExecNonQuery($"insert into cat_variables (nombre, valor) values ("intervalo", '${et_intervalo.text}')"$)
|
||||
' ToastMessageShow($"Intervalo modificado"$, False)
|
||||
' CallSubDelayed(Monitor, "Timer1_Tick")
|
||||
' p_engrane.Visible = False
|
||||
End Sub
|
||||
|
||||
Private Sub i_engrane_Click
|
||||
@@ -232,12 +233,12 @@ Private Sub b_ping_Click
|
||||
End Sub
|
||||
|
||||
Private Sub b_timeout_Click
|
||||
Monitor.timeout = et_timeout.text
|
||||
Starter.skmt.ExecNonQuery($"delete from cat_variables where nombre = 'timeout'"$)
|
||||
Starter.skmt.ExecNonQuery($"insert into cat_variables (nombre, valor) values ("timeout", '${et_timeout.text}')"$)
|
||||
ToastMessageShow($"Intervalo modificado"$, False)
|
||||
CallSubDelayed(Monitor, "Timer1_Tick")
|
||||
p_engrane.Visible = False
|
||||
' Monitor.timeout = et_timeout.text
|
||||
' Starter.skmt.ExecNonQuery($"delete from cat_variables where nombre = 'timeout'"$)
|
||||
' Starter.skmt.ExecNonQuery($"insert into cat_variables (nombre, valor) values ("timeout", '${et_timeout.text}')"$)
|
||||
' ToastMessageShow($"Intervalo modificado"$, False)
|
||||
' CallSubDelayed(Monitor, "Timer1_Tick")
|
||||
' p_engrane.Visible = False
|
||||
End Sub
|
||||
|
||||
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
||||
@@ -279,4 +280,27 @@ End Sub
|
||||
|
||||
Private Sub p_Main_Click
|
||||
l_info.Visible = False
|
||||
End Sub
|
||||
|
||||
Private Sub b_guardaCambios_Click
|
||||
'Guardamos Intervalo
|
||||
Monitor.Interval = et_intervalo.text
|
||||
Starter.skmt.ExecNonQuery($"delete from cat_variables where nombre = 'intervalo'"$)
|
||||
Starter.skmt.ExecNonQuery($"insert into cat_variables (nombre, valor) values ("intervalo", '${et_intervalo.text}')"$)
|
||||
CallSubDelayed(Monitor, "Timer1_Tick")
|
||||
p_engrane.Visible = False
|
||||
'Guardamos DBReqServer
|
||||
Starter.DBReqServer = et_server.text
|
||||
Starter.skmt.ExecNonQuery($"delete from cat_variables where nombre = 'servidor'"$)
|
||||
Starter.skmt.ExecNonQuery($"insert into cat_variables (nombre, valor) values ("servidor", '${et_server.text}')"$)
|
||||
CallSubDelayed(Monitor, "reinicializaReqManager")
|
||||
p_engrane.Visible = False
|
||||
CallSubDelayed(Monitor, "Timer1_Tick")
|
||||
'Guardamos Timeout
|
||||
Monitor.timeout = et_timeout.text
|
||||
Starter.skmt.ExecNonQuery($"delete from cat_variables where nombre = 'timeout'"$)
|
||||
Starter.skmt.ExecNonQuery($"insert into cat_variables (nombre, valor) values ("timeout", '${et_timeout.text}')"$)
|
||||
CallSubDelayed(Monitor, "Timer1_Tick")
|
||||
p_engrane.Visible = False
|
||||
ToastMessageShow($"Cambios guardados"$, False)
|
||||
End Sub
|
||||
Reference in New Issue
Block a user