Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public App As Application
Public NavControl As NavigationController
Private smc As SideMenuController
Dim pg As Page
Private btnMain As Button
Private btnPage3 As Button
End Sub
Public Sub Show
If Not(pg.IsInitialized) Then
pg.Initialize("pg")
pg.RootPanel.LoadLayout("page2")
End If
Main.NavControl.ShowPage(pg)
'create a new navigation controller
Dim nc As NavigationController
nc.Initialize("nc")
NavControl = nc
Dim lp As Page
lp.Initialize("lp")
lp.RootPanel.LoadLayout("slideMenu")
smc.Initialize(lp, nc, Null)
App.KeyController = smc
nc.ShowPage(pg)
pg.TopLeftButtons = Array(smc.CreateBarButton("left"))
Dim no As NativeObject = NavControl
no.GetField("navigationBar").RunMethod("setBarTintColor:", Array(no.ColorToUIColor(Colors.RGB(69,179,175))))
End Sub
Sub pg_BarButtonClick (Tag As String)
Select Tag
Case "left"
smc.OpenLeftMenu
End Select
End Sub
Sub pg_Click
smc.OpenLeftMenu
End Sub