⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 formmain.frm

📁 脱机通讯开发包.可以支持VC,VB及多种编程语言.
💻 FRM
📖 第 1 页 / 共 3 页
字号:
   End
   Begin zkemkeeperCtl.CZKEM CZKEM1 
      Height          =   615
      Left            =   0
      OleObjectBlob   =   "FormMain.frx":0096
      TabIndex        =   12
      Top             =   0
      Visible         =   0   'False
      Width           =   615
   End
   Begin VB.TextBox txt1NThreshold 
      Height          =   285
      Left            =   240
      TabIndex        =   10
      Text            =   "34"
      Top             =   4440
      Width           =   735
   End
   Begin VB.TextBox txt11Threshold 
      Height          =   285
      Left            =   1320
      TabIndex        =   9
      Text            =   "18"
      Top             =   4440
      Width           =   735
   End
   Begin VB.TextBox txtUserID 
      Height          =   285
      Left            =   960
      TabIndex        =   8
      Text            =   "1"
      Top             =   2100
      Width           =   735
   End
   Begin VB.TextBox txtSecond 
      Height          =   285
      Left            =   1800
      TabIndex        =   6
      Text            =   "0"
      Top             =   1560
      Width           =   615
   End
   Begin VB.TextBox txtMinute 
      Height          =   285
      Left            =   1080
      TabIndex        =   5
      Text            =   "20"
      Top             =   1560
      Width           =   615
   End
   Begin VB.TextBox txtHour 
      Height          =   285
      Left            =   240
      TabIndex        =   4
      Text            =   "12"
      Top             =   1560
      Width           =   495
   End
   Begin VB.CommandButton cmdSetDeviceTime 
      Caption         =   "SetDeviceTime2"
      Enabled         =   0   'False
      Height          =   375
      Left            =   2640
      TabIndex        =   3
      Top             =   960
      Width           =   1815
   End
   Begin VB.TextBox txtDay 
      Height          =   285
      Left            =   1800
      TabIndex        =   2
      Text            =   "12"
      Top             =   960
      Width           =   615
   End
   Begin VB.TextBox txtMonth 
      Height          =   285
      Left            =   1080
      TabIndex        =   1
      Text            =   "2"
      Top             =   960
      Width           =   615
   End
   Begin VB.TextBox txtYear 
      Height          =   285
      Left            =   240
      TabIndex        =   0
      Text            =   "2005"
      Top             =   960
      Width           =   735
   End
   Begin VB.Label Label13 
      Caption         =   "User Name:"
      Height          =   255
      Left            =   60
      TabIndex        =   54
      Top             =   2550
      Width           =   915
   End
   Begin VB.Label Label12 
      Caption         =   "EnrollNumber"
      Height          =   225
      Left            =   7830
      TabIndex        =   50
      Top             =   5340
      Width           =   1185
   End
   Begin VB.Label Label11 
      Caption         =   "StartTime"
      Height          =   195
      Left            =   5670
      TabIndex        =   49
      Top             =   5340
      Width           =   1575
   End
   Begin VB.Label Label10 
      Caption         =   "ValidMinutes"
      Height          =   255
      Left            =   4650
      TabIndex        =   48
      Top             =   5370
      Width           =   825
   End
   Begin VB.Label Label9 
      Caption         =   "SMSTag"
      Height          =   225
      Left            =   3390
      TabIndex        =   47
      Top             =   5340
      Width           =   1155
   End
   Begin VB.Label Label8 
      Caption         =   "SMS content"
      Height          =   225
      Left            =   1290
      TabIndex        =   46
      Top             =   5310
      Width           =   1785
   End
   Begin VB.Label Label7 
      Caption         =   "SMSID"
      Height          =   255
      Left            =   540
      TabIndex        =   45
      Top             =   5340
      Width           =   615
   End
   Begin VB.Label Label6 
      Caption         =   "Label6"
      Height          =   255
      Left            =   4710
      TabIndex        =   32
      Top             =   780
      Width           =   1335
   End
   Begin VB.Label Label5 
      Caption         =   "1:N threshold   1:1 threshold"
      Height          =   255
      Left            =   240
      TabIndex        =   25
      Top             =   4200
      Width           =   2295
   End
   Begin VB.Label Label4 
      Caption         =   "Date Format and Delimiter"
      Height          =   255
      Left            =   180
      TabIndex        =   21
      Top             =   3540
      Width           =   2295
   End
   Begin VB.Label Label3 
      Caption         =   "User ID:"
      Height          =   255
      Left            =   240
      TabIndex        =   15
      Top             =   2100
      Width           =   735
   End
   Begin VB.Label lblInfo 
      Caption         =   "Information"
      Height          =   255
      Left            =   0
      TabIndex        =   13
      Top             =   6600
      Width           =   4815
   End
   Begin VB.Label Label2 
      Caption         =   "Hour           Minute     Second"
      Height          =   255
      Left            =   240
      TabIndex        =   11
      Top             =   1320
      Width           =   2295
   End
   Begin VB.Label Label1 
      Caption         =   "Year            Month      Day"
      Height          =   255
      Left            =   240
      TabIndex        =   7
      Top             =   720
      Width           =   2295
   End
End
Attribute VB_Name = "frm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'Updates to the SDK need to address:
'
'   Function for setting date time - 'SetDeviceTime2'
'
'    Fix for 'SetEnrollmentData' returning “ERR_INVALID_PARAM”
'    Programming samples with sample function arguments to verify performance of these three functions:
'            SetEnrollDataStr
'            SetUserTmp,
'            SetUserTmpStr
'
'    Documentation on SLog records.
'
'    How to change the Date Delimiter using the SetDeviceInfo command
'
'    How to program the "Match Threshold" value in the clock
'
'    How to program the clock for 1:1 or 1:x biometrics
'
'    How to program the 1:1 threshold value
'
'    How to program the date time display format on the clock to Month, Day, Year (U.S. format)

Const sSampleTemplate1 = "A1CA1E81AF384F2118ACBA4B4026A7BD48D434AB2540800D56A645D414513760BC09463A58A30F53AB500060302C4E713F3926507C260DAE7982092DA45B40151D3974910940864DFC04038D7152080BA565D40E20B66902083E8E69F8057E3564940AAF0F62B8040811312408DD954D780A72AC5B01122CB347400A31AC3892114794370004688B4E340677053180126A0572910484375BBC0DB63AB4EA131011C35D6069A3FEBA9A99C0C26181A4EFFDA8B897C0C265A586CDEDD9A9A80BC269A466BBEEDBB80B81C267A5789CDEEBDA890EC365A589BDFECDB899C363A187BD7303A2DDCA89C3608162687102A2EFCA99C35EA1789D6F030D15A1BA8AC358825C690716A1E9B922C354A177684E26A24B8898C34CA177563F34A2197787C445A4664568667731C442A46539AC647737C440A4636EF965563BC53E3D414BA2E354653FC5434B5BA393345545C65DA3D6314655E0"
Const sSampleTemplate2 = "A1CA1482AF114AA1464C134C00234712629418392B5C0008539B5454094A2B40BC165F2256E30A4F1C37003DCF9739F114C91A5EBC07B6264482106411470031549C4D510F54A02AFC2E09A51E1223942C5D5409C3955B42093C314FB808CE0E4E544727222EB8129053040413B914670C1011C6465248C0C5575C616713C0C353A18EDD72182027C0C24DA2A9DEBB27272A28C0C249A18ACD554937333433C0C243A289DF91413E3B3DC0C142A1569F52A2931478C0C1403A352C695EA2131468C0C13D332310016A5BA1034545C0C2170F09016B5DA1133445C0C20C0A090264A122434CC0C20C090803675EA15364C0C308050170635E5958C0C403017469625DE2CC47434040CC484640E0"
Const sSampleTemplate3 = "A1CA0F819B3A3FE11431BB3CC0143EAD46D40A48B56DC00A24C151540A9E4245BC12A1403FE32D1DB8580008ADB23A310745216CFC1277AA59C2124CBE35401154C13BD14E441F4EFC095C2B35920D5125D44B1A1011C03735C03B3DC03B40C03A3FC46269C174A1AB9BC03B3DC362A38B8CFCBC0AC0C455A1E8BA636DA1FECE0EC458A278ACBF72040B1114C458A2578CDF70040F1618C352A29967AD606E04141A1BC34EA2A587AA586A07181D1DC350A3756687B41D1D2122C350A36445678129222324C352A5450438730198C3514F4940A31386324A25C355524C3E33A3166355FBC3595B543428A3478446FBC46162102082A1456EE0"
Const sSampleTemplate4 = "A1CA1A82982C456107C4AF3CC00FC93046D415CD3E51400CD84154140DDC1C58BC1D369B332305CFA96D00144A9E4E712D4F236CFC0E3F2472C20A33A554000EC0A350D114523731FC0DD833689209D54160140CE1BE18420BE5331DF80ED73B481405D9A71C3808C9154DE41DE71E18380558922F0103CF0A41C00BDD11249207CBAF64800AC853F46614AEC06B1D1011C556575F6E7709C0C453585B636F740819C0C353A1ABDF6D7508181C21C0C24FA1BBBC626A750D1C212326C0C251A1AAAC5F69021521A1E9AAC152A2899BAC66051F28A1B889C151A289A99B5C2CA26C9678C151A298999A514035A186552BC151A6A7A88820145326C152A6B7978754351105C154A4A98769765444392D287E4755A4B9A6697776504126237E455BA4B87878876A5D68131A7E4463A2977677825F656F060FC16BA4867556879B69710105C171A6774658688BEDDBC176A667366A678ADBA9C277A56277A6889BA9E0"


Const sSampleTemplate = _
        "A1CA168293AF5A613A3A2F5DC02B343C591413BCBE54C01FBA3E49143CB33F4BFC59C" + _
        "03E56E31C613158801244316B710B35BD5F3C0D51A866C2261A3C6E400B46B7375109" + _
        "44AC41FC0D4EA043521460245C940C6CAD5C827E25AE5978424CBE79140A44C144B83" + _
        "E9DA36BA40D10456138115B3A44EB16B2D40F121011E3C863646C7273C0C767A28CFB" + _
        "CAC0C664A2D9ECAC03C0C561A39BBEEBCB0CC0C560A179BE7177050D1318C456A1B8A" + _
        "C646F030F171C20C454A1988B5C6A141D232627C450814F504E3E2AA189A8C44DA365" + _
        "77520682C448A4566867576635C447A4228CB9756539C53F3436414AA2874367C52E1" + _
        "70C655B52A1253540C605036D6054A11545E0"

Dim vMachineNumber
Dim bConnected As Boolean
'Public connFP As New ADODB.Connection
'Public recFP As New ADODB.Recordset
'Set rs_gBlood = HisConn.Execute(StrSqlQueryCondition)
Function Str2Byte(s As String, Index As Integer) As Byte
    Dim b1 As Byte, b2 As Byte
    Dim s1 As String, s2 As String
    
    s1 = Mid(s, Index * 2 + 1, 1)
    s2 = Mid(s, Index * 2 + 2, 1)
    If s1 >= "A" Then
        b1 = Asc(s1) - Asc("A") + 10
    Else
        b1 = Asc(s1) - Asc("0")
    End If
    If s2 >= "A" Then
        b2 = Asc(s2) - Asc("A") + 10
    Else
        b2 = Asc(s2) - Asc("0")
    End If
    Str2Byte = b1 * 16 + b2
End Function

Function Str2ByteArray(s As String, b() As Byte) As Integer
    Dim i As Integer
    Dim l As Integer
    l = Len(s) / 2
    For i = 0 To l - 1 Step 1
        b(i) = Str2Byte(s, i)
    Next
    Str2ByteArray = l
End Function

Function Str2LongArray(s As String, ldata() As Long) As Integer
    Dim i As Integer
    Dim lbyte As Integer, llong As Integer, l As Long
    Dim b(1024 * 4) As Byte
    lbyte = Str2ByteArray(s, b)
    llong = lbyte / 4
    If llong * 4 < lbyte Then llong = llong + 1
    For i = 0 To llong - 1 Step 1
        l = b(i * 4 + 3)
        If l > 127 Then
            l = (((l - 128) * 256 + b(i * 4 + 2)) * 256 + b(i * 4 + 1)) * 256 + b(i * 4)
            l = l - 2147483647
            l = l - 1
        Else
            l = ((l * 256 + b(i * 4 + 2)) * 256 + b(i * 4 + 1)) * 256 + b(i * 4)
        End If
        ldata(i) = l
    Next
    Str2LongArray = llong
End Function

Private Sub cmd1To1Mode_Click()
    If CZKEM1.SetDeviceInfo(vMachineNumber, 35, 1) Then
        lblInfo.Caption = "Set 1:1 Mode OK"
    Else
        lblInfo.Caption = "Set 1:1 Mode Fail"
    End If
End Sub

Private Sub cmd1ToNMode_Click()
    If CZKEM1.SetDeviceInfo(vMachineNumber, 35, 0) Then
        lblInfo.Caption = "Set 1:N Mode OK"
    Else
        lblInfo.Caption = "Set 1:N Mode Fail"
    End If

End Sub

Sub ShowButtonState()
    cmdSetDeviceTime.Enabled = bConnected
    cmdThreshold.Enabled = bConnected
    cmdSetEnrollmentData.Enabled = bConnected
    cmdSetEnrollStr.Enabled = bConnected
    cmdSetUserTmp.Enabled = bConnected
    cmdSetUserTmpStr.Enabled = bConnected
    cmdDateFormat.Enabled = bConnected
    cmd1To1Mode.Enabled = bConnected
    cmd1ToNMode.Enabled = bConnected
    cmdUpdateFirmware.Enabled = bConnected
    cmdGetUserTmpStr.Enabled = bConnected
End Sub

Private Sub cmdClearSMS_Click()
    If CZKEM1.ClearSMS(vMachineNumber) Then
        lblInfo.Caption = "ClearSMS OK"
    Else
        lblInfo.Caption = "ClearSMS fail"
    End If
End Sub

Private Sub cmdClearUserSMS_Click()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -