Sub Process_Globals
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Private MyMap As Map
Private JSONTrue = "~~~true~~~", JSONFalse = "~~~false~~~", JSONNull = "~~~null~~~" As String
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.Title = "Page 1"
Page1.RootPanel.Color = Colors.White
NavControl.ShowPage(Page1)
MakeJson
End Sub
Sub MakeJson
Dim JSON As JSONGenerator
If MyMap.IsInitialized = False Then
InizializeWebApiAuthBase
End If
JSON.Initialize(MyMap)
Log(JSONToString(JSON))
End Sub
Sub JSONToString(jg As JSONGenerator) As String
Return jg.ToPrettyString(4).Replace($""${JSONTrue}""$, "True").Replace($""${JSONFalse}""$, "False").Replace($""${JSONNull}""$, "Null")
End Sub
'Inizialize WebapiAuth base
Sub InizializeWebApiAuthBase
MyMap.Initialize
MyMap.Put("Culture","en-GB")
MyMap.Put("IsLogged",JSONTrue)
MyMap.Put("UserLogin",JSONNull)
MyMap.Put("UserPK",JSONNull)
MyMap.Put("IsAdmin",JSONFalse)
MyMap.Put("Roles",JSONNull)
MyMap.Put("License",JSONNull)
MyMap.Put("Modules",JSONNull)
MyMap.Put("Auths",JSONNull)
MyMap.Put("Factory",JSONNull)
MyMap.Put("Module",JSONNull)
MyMap.Put("Area",JSONNull)
MyMap.Put("Geo",JSONNull)
MyMap.Put("Version","1.8.6")
MyMap.Put("CallerType",1)
End Sub