Sub Globals
Dim Panel1 As Panel
Dim Canvas1 As Canvas
Dim SD As SignatureData 'This object holds the data required for SignatureCapture
Dim PointCount As Int
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("customer_signature_capture")
Activity.Title = "job " & JobList.MasterJobNumber & " - Customer Invoice Signature"
Canvas1.Initialize(Panel1)
SD.Initialize
SD.Canvas = Canvas1
SD.Panel = Panel1
SD.SignatureColor = Colors.Black
SD.SignatureWidth = 3dip 'Stroke width
End Sub
Sub Panel1_Touch (Action As Int, X As Float, Y As Float)
SignatureCapture.Panel_Touch(SD, x, y, Action)
PointCount = PointCount + 1
End Sub
Sub btnSave_Click
If PointCount = 0 Then
Msgbox2("The customer must sign in the signature box.","Error","OK","","",Null)
Return
End If
If PointCount < 50 Then
Msgbox2("The signature is insuffient. Please re-sign.","Error","OK","","",Null)
SignatureCapture.Clear(SD)
PointCount = 0
Return
End If
End If