Sub Process_Globals
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Private panel1 As Panel
Private x1,y1,x2,y2 As Int
Dim c As Canvas
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.Title = "Tap the Screen"
Page1.RootPanel.Color = Colors.White
NavControl.ShowPage(Page1)
End Sub
Private Sub Page1_Resize(Width As Int, Height As Int)
panel1.Initialize("panel1")
Page1.RootPanel.AddView(panel1,0,0,100%x,100%y)
panel1.Color=Colors.White
c.Initialize(panel1)
End Sub
Sub Panel1_Touch(Action As Int, X As Float, Y As Float)
Log(X&" "&Y)
x1=X
y1=Y
c.DrawLine(x2,0,x2,100%y,Colors.White,2)
c.DrawLine(0,y2,100%x,y2,Colors.White,2)
c.DrawLine(x1,0,x1,100%y,Colors.Red,2)
c.DrawLine(0,y1,100%x,y1,Colors.Red,2)
x2=X
y2=Y
c.Refresh
End Sub