mirror of
https://github.com/KeymonSoft/Monitor-Keymon.git
synced 2026-04-17 12:56:12 +00:00
19/9/23 - Listview de servidores por customListView y servidor de Azure
- Se cambio el oistview de los servidores predeterminados por un customListView. - Se agrego el servidor de Azure a la lista de servidores predeterminados..
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,2 @@
|
||||
**/Objects
|
||||
**/AutoBackups
|
||||
*.meta
|
||||
**/AutoBackups
|
||||
@@ -49,6 +49,9 @@ Sub Class_Globals
|
||||
Private Label1 As Label
|
||||
Private b_notifAccess As Button
|
||||
Dim logger As Boolean = False
|
||||
Private clv_server As CustomListView
|
||||
Private p_listItemServer As Panel
|
||||
Private l_server As Label
|
||||
End Sub
|
||||
|
||||
Public Sub Initialize
|
||||
@@ -65,6 +68,11 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
l_version.Text = Application.VersionName
|
||||
lv_server.AddSingleLine("http://keymon.lat:1782")
|
||||
lv_server.AddSingleLine("http://10.0.0.205:1782")
|
||||
lv_server.AddSingleLine("http://40.123.36.38:1782")
|
||||
|
||||
clv_server.Add(CreateListItem("http://keymon.lat:1782", clv_server.AsView.Width, 35dip), "http://keymon.lat:1782")
|
||||
clv_server.Add(CreateListItem("http://10.0.0.205:1782", clv_server.AsView.Width, 35dip), "http://10.0.0.205:1782")
|
||||
clv_server.Add(CreateListItem("http://40.123.36.38:1782", clv_server.AsView.Width, 35dip), "http://40.123.36.38:1782")
|
||||
et_server.Text = Starter.DBReqServer
|
||||
#if not(DEBUG)
|
||||
logger = False
|
||||
@@ -159,6 +167,17 @@ Private Sub lv_server_ItemClick (Position As Int, Value As Object)
|
||||
ToastMessageShow($"Servidor modificado"$, False)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub clv_server_ItemClick (Index As Int, Value As Object)
|
||||
If logger Then Log(Value)
|
||||
et_server.Text = Value
|
||||
Starter.DBReqServer = Value
|
||||
Starter.skmt.ExecNonQuery($"delete from cat_variables where nombre = 'servidor'"$)
|
||||
Starter.skmt.ExecNonQuery($"insert into cat_variables (nombre, valor) values ("servidor", '${Value}')"$)
|
||||
CallSubDelayed(Monitor, "reinicializaReqManager")
|
||||
ToastMessageShow($"Servidor modificado"$, False)
|
||||
End Sub
|
||||
|
||||
Private Sub b_server_Click
|
||||
Starter.DBReqServer = et_server.text
|
||||
Starter.skmt.ExecNonQuery($"delete from cat_variables where nombre = 'servidor'"$)
|
||||
@@ -212,3 +231,13 @@ Sub b_notifAccess_Click
|
||||
In.Initialize("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS", "")
|
||||
StartActivity(In)
|
||||
End Sub
|
||||
|
||||
Sub CreateListItem(Text As String, Width As Int, Height As Int) As Panel 'ignore
|
||||
Dim p As B4XView = xui.CreatePanel("")
|
||||
p.SetLayoutAnimated(0, 0, 0, Width, Height)
|
||||
p.LoadLayout("listItem")
|
||||
l_server.Height = Height
|
||||
l_server.Text = Text
|
||||
' i_prod.Bitmap = img
|
||||
Return p
|
||||
End Sub
|
||||
|
||||
@@ -20,7 +20,6 @@ Sub Class_Globals
|
||||
Private subsLogs As Boolean = False
|
||||
End Sub
|
||||
|
||||
|
||||
'You can add more parameters here.
|
||||
Public Sub Initialize As Object
|
||||
Return Me
|
||||
@@ -414,7 +413,7 @@ Sub CreateNotification (Body As String) As Notification
|
||||
Dim notification As Notification
|
||||
notification.Initialize2(notification.IMPORTANCE_LOW)
|
||||
notification.Icon = "icon"
|
||||
notification.SetInfo("Tester", Body, Main)
|
||||
notification.SetInfo("Activo", Body, Main)
|
||||
Return notification
|
||||
End Sub
|
||||
|
||||
@@ -445,4 +444,5 @@ Sub notiLowReturn(title As String, Body As String, id As Int) As Notification 'i
|
||||
notification.Notify(id)
|
||||
' Log("notiLowReturn SetInfo")
|
||||
Return notification
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
|
||||
BIN
B4A/Files/listitem.bal
Normal file
BIN
B4A/Files/listitem.bal
Normal file
Binary file not shown.
Binary file not shown.
@@ -1,17 +1,23 @@
|
||||
Build1=Default,kmtMonitor.keymon.com.mx,HU2_PUBLIC
|
||||
File1=engrane.png
|
||||
File2=login.bal
|
||||
File3=logo_keymon.png
|
||||
File4=MainPage.bal
|
||||
File2=kmt.db
|
||||
File3=listItem.bal
|
||||
File4=login.bal
|
||||
File5=logo_keymon.png
|
||||
File6=MainPage.bal
|
||||
FileGroup1=Default Group
|
||||
FileGroup2=Default Group
|
||||
FileGroup3=Default Group
|
||||
FileGroup4=Default Group
|
||||
FileGroup5=Default Group
|
||||
FileGroup6=Default Group
|
||||
Group=Default Group
|
||||
Library1=b4xpages
|
||||
Library10=runtimepermissions
|
||||
Library11=sql
|
||||
Library12=replyauto
|
||||
Library10=replyauto
|
||||
Library11=runtimepermissions
|
||||
Library12=sql
|
||||
Library13=xcustomlistview
|
||||
Library14=xui
|
||||
Library2=byteconverter
|
||||
Library3=core
|
||||
Library4=fusedlocationprovider
|
||||
@@ -28,15 +34,15 @@ Module4=DBRequestManager
|
||||
Module5=Monitor
|
||||
Module6=NotificationService
|
||||
Module7=Starter
|
||||
NumberOfFiles=4
|
||||
NumberOfLibraries=12
|
||||
NumberOfFiles=6
|
||||
NumberOfLibraries=14
|
||||
NumberOfModules=7
|
||||
Version=12.5
|
||||
@EndOfDesignText@
|
||||
#Region Project Attributes
|
||||
#ApplicationLabel: Monitor Keymon
|
||||
#VersionCode: 1
|
||||
#VersionName: 3.09.17
|
||||
#VersionName: 3.09.19
|
||||
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
||||
#SupportedOrientations: portrait
|
||||
#CanInstallToExternalStorage: False
|
||||
|
||||
27
B4A/Monitor-Keymon.b4a.meta
Normal file
27
B4A/Monitor-Keymon.b4a.meta
Normal file
@@ -0,0 +1,27 @@
|
||||
ModuleBookmarks0=
|
||||
ModuleBookmarks1=
|
||||
ModuleBookmarks2=
|
||||
ModuleBookmarks3=
|
||||
ModuleBookmarks4=
|
||||
ModuleBookmarks5=
|
||||
ModuleBookmarks6=
|
||||
ModuleBookmarks7=
|
||||
ModuleBreakpoints0=
|
||||
ModuleBreakpoints1=
|
||||
ModuleBreakpoints2=
|
||||
ModuleBreakpoints3=
|
||||
ModuleBreakpoints4=
|
||||
ModuleBreakpoints5=
|
||||
ModuleBreakpoints6=
|
||||
ModuleBreakpoints7=
|
||||
ModuleClosedNodes0=
|
||||
ModuleClosedNodes1=2
|
||||
ModuleClosedNodes2=
|
||||
ModuleClosedNodes3=
|
||||
ModuleClosedNodes4=
|
||||
ModuleClosedNodes5=8,10
|
||||
ModuleClosedNodes6=
|
||||
ModuleClosedNodes7=
|
||||
NavigationStack=B4XMainPage,b_timeout_Click,207,0,B4XMainPage,Initialize,53,0,B4XMainPage,b_notifAccess_Click,216,0,B4XMainPage,CreateListItem,226,3,Visual Designer,login.bal,-100,3,B4XMainPage,clv_server_ItemClick,164,0,B4XMainPage,b_monitorActivo_Click,149,0,B4XMainPage,lv_server_ItemClick,160,0,Visual Designer,listItem.bal,-100,6,B4XMainPage,B4XPage_Created,60,6
|
||||
SelectedBuild=0
|
||||
VisibleModules=1,7,3,5,6,4
|
||||
Reference in New Issue
Block a user