'Class module
Sub Class_Globals
Private ws As WebSocket 'ignore
' will hold our page information
Public page As ABMPage
' page theme
Private theme As ABMTheme
' to access the constants
Private ABM As ABMaterial 'ignore
' name of the page, must be the same as the class name (case sensitive!)
Public Name As String = "Dashboard1Page"
' will hold the unique browsers window id
Private ABMPageId As String = ""
Dim timer1 As Timer
Dim archer1 As ArcherContainer
End Sub
public Sub BuildPage()
' initialize the theme
BuildTheme
' initialize this page using our theme
page.InitializeWithTheme(Name, "/ws/" & ABMShared.AppName & "/" & Name, False, ABMShared.SessionMaxInactiveIntervalSeconds, theme)
page.ShowLoader=True
page.ShowLoaderType=ABM.LOADER_TYPE_MANUAL ' NEW
page.PageTitle = "Dashboard"
page.PageDescription = "history table for data collection system"
page.PageHTMLName = "index.html"
page.PageKeywords = "jinyistudio,iot,plc"
page.PageSiteMapPriority = "0.50"
page.PageSiteMapFrequency = ABM.SITEMAP_FREQ_MONTHLY
'page.UseGoogleAnalytics(ABMShared.TrackingID, Null) ' IMPORTANT Change this to your own TrackingID !!!!!!!
ABMShared.BuildNavigationBar(page, "DASHBOARD", ABMShared.LogoIcon, "", "dashboard", "board1")
page.AddExtraJavaScriptFile("custom/archer.min.js")
' create the page grid
page.AddRows(1,True, "").AddCells12(1,"")
page.AddRows(1,True, "").AddCells12(1,"")
page.AddRows(1,True, "").AddCells12(1,"")
page.AddRows(1,True, "").AddCells12(1,"")
page.BuildGrid 'IMPORTANT once you loaded the complete grid AND before you start adding components
'
page.Cell(1,1).AddComponent(ABMShared.BuildParagraph(page, "par1",$"本日${DateTime.Date(DateTime.Now)}生產履歷明細"$))
'
archer1.Initialize(page,"archer1",4,4,128,64,20)
archer1.AddDataDisplayCard(1,1,"bd1",0)
archer1.AddDataDisplayCard(1,4,"bd2",0)
archer1.AddDataDisplayCard(2,3,"bd3",0)
page.Cell(2,1).AddComponent(archer1.ABMComp)
page.Cell(2,1).SetFixedHeight(200,False)
'
ABMShared.BuildFooter(page)
End Sub
Sub Timer1_Tick
Dim obj As ABMDigitMeter1=archer1.component("bd1")
obj.MeterValue(Rnd(1,100))
Dim obj As ABMDigitMeter1=archer1.component("bd2")
obj.MeterValue(Rnd(101,200))
Dim obj As ABMDigitMeter1=archer1.component("bd3")
obj.MeterValue(Rnd(201,300))
archer1.Refresh
End Sub