'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim CountDownTimer As Timer
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim Counter As Int
Dim ShowTime As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
Counter = 30
ShowTime.Initialize("ShowTime")
ShowTime.Gravity = Gravity.CENTER_HORIZONTAL
Activity.AddView(ShowTime, 0dip, 0dip, 100%x, 50%y)
CountDownTimer.Initialize("CountDownTimer", 1000)
CountDownTimer.Enabled = True
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub CountDownTimer_Tick
ShowTime.Text = Counter
If Counter <= 10 Then
Dim b As Beeper
b.Initialize(500, 500)
b.Beep
End If
Counter = Counter - 1
If Counter < 0 Then
CountDownTimer.Enabled = False
Msgbox("Done", "")
End If
End Sub