Sub Process_Globals
Public BANano As BANano
Public AppName As String = "giaokvb"
Public AppTitle As String = "Quản lý TNMT Vùng bờ"
Private Publish As String = "C:\laragon\www"
Public Version As String = "1.00"
Public ServerIP As String
Public Database As String = "dtbgkvb"
Public DbPort As String = "27017/dtbgkvb"
Public DbHost As String = "bong:*****@xxx.xxx.xx.xxx"
End Sub
Sub AppStart (Form1 As Form, Args() As String)
Dim config As Map = File.ReadMap(File.DirAssets, "config.properties")
ServerIP = config.Get("ServerIP")
BANano.Initialize("BANano", AppName, DateTime.now)
BANano.HTML_NAME = "index.html"
BANano.Header.Title = AppTitle
BANano.Header.AddFavicon("./assets/bonho.jpg", "16x16")
BANano.Header.AddAppleTouchIcon("apple-touch-icon.png", "180x180")
BANano.Header.Author ="Anele Mbanga (Mashy)"
BANano.Header.Description = "BVAD3 Design System"
BANano.Header.Keywords = "banano,vuetify,material design"
BANano.Header.Language = "en"
BANano.Header.AddMeta($"<meta name="copyright" content="© 2020 BVAD3">"$)
BANano.Header.AddMeta($"<meta name="robots" content="ALL">"$)
BANano.TranspilerOptions.UseServiceWorker = False
BANano.TranspilerOptions.MinifyOnline = False
BANano.TranspilerOptions.RemoveDeadCode = False
BANano.TranspilerOptions.IgnoreWarningsOldBrowsers = True
BANano.TranspilerOptions.SetFireReadyWhenReadyStateComplete(False)
BANano.TranspilerOptions.ShowWarningDeadCode = False
BANano.TranspilerOptions.MergeAllCSSFiles = True
BANano.TranspilerOptions.MergeAllJavascriptFiles = True
BANano.TranspilerOptions.EnableLiveCodeSwapping = False
BANano.TranspilerOptions.IgnoreB4JLibrary("BVAD3Classes")
BANano.Header.OnDOMContentLoaded = BANanoShared.DOMContentLoaded
BANano.PHP_NAME = $"${AppName}.php"$
#if release
'change to external host domain e.g http://www.google.com
'exclude the port address
#end if
BANano.PHPHost = $"${ServerIP}/${AppName}/"$
BANano.PHPAddHeader("Access-Control-Allow-Origin: *")
BANano.Build(Publish)
Dim sPath As String = $"${Publish}\${AppName}\assets"$
Dim tPath As String = $"${Publish}\${AppName}\styles"$
File.MakeDir(tPath, "images")
tPath = $"${tPath}\images"$
File.Copy(sPath, "layers.png", tPath, "layers.png")
File.Copy(sPath, "layers-2x.png", tPath, "layers-2x.png")
File.Copy(sPath, "marker-icon.png", tPath, "marker-icon.png")
File.Copy(sPath, "marker-icon-2x.png", tPath, "marker-icon-2x.png")
File.Copy(sPath, "marker-shadow.png", tPath, "marker-shadow.png")
Dim fx As JFX
Dim appPath As String = $"${ServerIP}/${AppName}/index.html"$
fx.ShowExternalDocument(appPath)
#if release
ExitApplication
#end if
End Sub