#Region Activity Attributes
#FullScreen: True
#IncludeTitle: False
#End Region
'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 mResult As String
Dim job2 As HttpJob
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 Button1 As Button
Dim myABBarcode As ABZxing
Dim MyWaybill As ABZxing
Dim MyPhone As PhoneId
Dim CustName As String
Dim WayBill As String
Private Button2 As Button
Private Button3 As Button
Private Button4 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("peterbarcodetest")
End Sub
Sub Read_Barcode_update(Value As String)
CustName = Value
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click(Value As String)
CustName = Value
myABBarcode.ABGetBarcode("myabbarcode", "")
End Sub
Sub MyWaybill_BarcodeFound (WbarCode As String, formatName As String)
WayBill = WbarCode
End Sub
Sub myABBarcode_BarcodeFound (barCode As String, formatName As String)
mResult = barCode
End Sub
Sub myABBarcode_Canceled()
mResult = "Canceled"
End Sub
Sub MyWaybill_Canceled()
WayBill = "Canceled"
End Sub
Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
CallSubDelayed(Main, "Activity_Resume")
Else
Log("Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub
Sub Button4_Click
CallSubDelayed(signcap, "Activity_Create")
End Sub
Sub Button2_Click
MyWaybill.ABGetBarcode("mywaybill", "")
job2.Initialize("Job2", Me)
job2.PostString("http://www.himel.co.za/sen_post.php","Barc="&mResult&"&Location="&CustName&"&Waybill="&WayBill&"&User="&MyPhone.GetSimSerialNumber&"")
End Sub
Sub Button3_Click
WayBill = ""
job2.Initialize("Job2", Me)
job2.PostString("http://www.himel.co.za/sen_post.php","Barc="&mResult&"&Location="&CustName&"&Waybill="&WayBill&"&User="&MyPhone.GetSimSerialNumber&"")
End Sub