Dim ErrMsg As String
Dim Conn As String
try
If FileSys.FileExists(ProjectPath & "Attachments\config.json") Then
Dim configJson As String = FileSys.ReadAllText(ProjectPath & "Attachments\config.json",Encoding.Default)
Dim cjo As JObject = JObject.Parse(configJson)
If cjo("config")(0) IsNot Nothing Then
If cjo("config")(0)("type") = "database" Then
C & cjo("config")(0)("host").ToString & "," & cjo("config")(0)("port").ToString & "\" & cjo("config")(0)("name").ToString
End If
End If
End If
If Connections.TryConnect(Conn,ErrMsg) = False Then
connbtn.SmallImage = GetImage("soffline.png")
Else
connbtn.SmallImage = GetImage("sonline.png")
End If
catch ex as exception
if vars("show") = false then
msgbox(ex.message)
vars("show") = true
endif
end try