'WebSocket class
Sub Class_Globals
Private ws As WebSocket
Private message1 As JQueryElement
Private nav_side_container As JQueryElement
Private timer1 As Timer
End Sub
Public Sub Initialize
Log("index init")
timer1.Initialize("timer1",1000)
End Sub
Sub MessageBox(Titles,msgs As String)
' $('#myModal').modal({show:true});
'title1.SetText(Titles)
'message1.SetText(msgs)
'ws.RunFunction("messagebox",Null)
'ws.Flush
End Sub
private Sub timer1_tick
End Sub
Private Sub navi_click(Params As Map)
If Params.Size<1 Then Return
Log("navi click")
For n1=0 To Params.Size-1
Log("key:"&Params.GetKeyAt(n1)&",value:"&Params.GetValueAt(n1))
Next
Dim url As String
Dim page As String=Params.Get("name")
If page="param1" Then
url="../param-db/index.html"
else if page="param2" Then
url="../param-msg/index.html"
else if page="param3" Then
url="../param-plc/index.html"
else if page="param4" Then
url="../param-oth/index.html"
else if page="param5" Then
url="../param-day/index.html"
else if page="param6" Then
url="../param-mon/index.html"
else if page="dashboard" Then
url="../monitor/index.html"
else if page="report1" Then
url="../report/index.html"
else if page="report2" Then
url="../chart/index.html"
else if page="report3" Then
url="../history/index.html"
End If
nav_side_container.SetHtml(WebUtils.Html2div(url))
ws.Flush
End Sub
Sub WebSocket_Connected (WebSocket1 As WebSocket)
ws = WebSocket1
Log("Index connected")
timer1.Enabled=True
End Sub
Sub WebSocket_Disconnected
timer1.Enabled=False
Log("Index disconnected")
End Sub
' <a href="javascript:ShowOld(2367,146986,2)"><img title="next page" alt="next page" src="/themes/me/img/arrn.png"></a>
' <a href="javascript:void(0);" onclick="ShowOld(2367,146986,2);">
' <a href="javascript:ShowOld(2367,146986,2);">