'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 Timer1 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 lblRecht, lblLink As Int
Dim lblShowTime As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("counter")
lblShowTime.Text = "02:59"
lblLink = lblShowTime.Text.SubString2(0,2) ' 02
lblRecht = lblShowTime.Text.SubString2(3,5) ' 59
Timer1.Initialize("Timer1", 1000)
Timer1.Enabled = True
End Sub
Sub Activity_Resume
'Hier muss ich was definieren, aber was und wie?
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Timer1_Tick
lblRecht = lblRecht - 1
If lblRecht = 0 Then
lblRecht = 59
lblLink = lblLink -1
If lblLink = 0 AND lblRecht = 0 Then
Timer1.Enabled = False
ToastMessageShow ("3 min. ist vorbei",False)
End If
End If
lblShowTime.Text = lblLink & ":" & lblRecht
End Sub