Sub Process_Globals
Dim oCRC32 As CRC32Class
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 otxtStrToCheckSum As EditText
Dim olblChecksum As Label
Dim obtnGenChecksum As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Dim cDateTime As String
otxtStrToCheckSum .Initialize("")
obtnGenChecksum.Initialize("obtnGenChecksum")
olblChecksum.Initialize("")
obtnGenChecksum.Text = "Calc CRC32"
olblChecksum.TextSize = 14
Activity.AddView(otxtStrToCheckSum,5,5,250,100)
Activity.AddView(obtnGenChecksum,5,120,100,40)
Activity.AddView(olblChecksum,5,180,250,40)
'Create CRC32 Object
oCRC32.Initialize
End Sub
Sub obtnGenChecksum_Click
'Clear the CRC32 Buffer
oCRC32.Reset
'Fill buffer with contents of text box
oCRC32.Update(otxtStrToCheckSum.Text)
'Calculate Checksum and populate label with result
olblChecksum.Text = oCRC32.GetHexString
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub