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

📄 frmlog.frm

📁 中控嵌入式指纹识别开发描述
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmLog 
   Caption         =   "Manage Log Data"
   ClientHeight    =   6465
   ClientLeft      =   4830
   ClientTop       =   3150
   ClientWidth     =   9075
   Icon            =   "frmLog.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   ScaleHeight     =   6465
   ScaleWidth      =   9075
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton cmdClearAllLog 
      Caption         =   "Clear All Log"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   645
      Left            =   4080
      TabIndex        =   4
      Top             =   5520
      Width           =   1605
   End
   Begin VB.CommandButton cmdAllGLogData 
      Caption         =   "Read All Log"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   645
      Left            =   1380
      TabIndex        =   2
      Top             =   5520
      Width           =   1605
   End
   Begin MSFlexGridLib.MSFlexGrid gridSLogData 
      Height          =   3630
      Left            =   360
      TabIndex        =   3
      Top             =   1725
      Width           =   8445
      _ExtentX        =   14896
      _ExtentY        =   6403
      _Version        =   393216
      Cols            =   9
      Redraw          =   -1  'True
      GridLines       =   2
      AllowUserResizing=   1
   End
   Begin VB.CommandButton cmdExit 
      Caption         =   "Exit"
      Default         =   -1  'True
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   645
      Left            =   6510
      TabIndex        =   1
      Top             =   5535
      Width           =   1605
   End
   Begin VB.Label lblEnrollData 
      AutoSize        =   -1  'True
      Caption         =   "Log Data :"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   420
      TabIndex        =   6
      Top             =   1275
      Width           =   960
   End
   Begin VB.Label LabelTotal 
      AutoSize        =   -1  'True
      Caption         =   "Total :"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   1935
      TabIndex        =   5
      Top             =   1275
      Width           =   570
   End
   Begin VB.Label lblMessage 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Message"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   14.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   420
      Left            =   405
      TabIndex        =   0
      Top             =   600
      Width           =   8355
   End
End
Attribute VB_Name = "frmLog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim gMachineNumber As Long
Public gstrLogItem As Variant


Private Sub cmdAllGLogData_Click()
    Dim vTMachineNumber As Long
    Dim vSMachineNumber As Long
    Dim vSEnrollNumber As Long
    Dim vVerifyMode As Long
    Dim vInOutMode As Long
    Dim vYear As Long
    Dim vMonth As Long
    Dim vDay As Long
    Dim vHour As Long
    Dim vMinute As Long
    Dim vErrorCode As Long
    Dim vRet As Boolean
    Dim i, n As Long
    
    lblMessage.Caption = "Waiting..."
    LabelTotal.Caption = "Total : "
    DoEvents
    gridSLogData.Redraw = False
    gridSLogData.Clear
    gstrLogItem = Array("", "TMachineNo", "EnrollNo", "EMachineNo", "VeriMode", "InOutMode", "DateTime")
    With gridSLogData
        .Row = 0
        .ColWidth(0) = 600
        For i = 1 To 6
            .Col = i
            .Text = gstrLogItem(i)
            .ColAlignment(i) = 3
            .ColWidth(i) = 1000
        Next i
        .ColAlignment(5) = 2
        .ColWidth(6) = 1400
        
        n = .Rows
        If n > 2 Then
            Do
                If n = 2 Then Exit Do
                .RemoveItem (n)
                n = n - 1
            Loop
        End If
        .Redraw = True
    End With
    
    MousePointer = vbHourglass
    

    lblMessage.Caption = "Getting..."
    MousePointer = vbHourglass
    DoEvents
    With gridSLogData
        .Redraw = False
        i = 1
        Do

            vRet = frmMain.CZKEM1.GetAllGLogData(frmMain.vMachineNumber, _
                                             vTMachineNumber, _
                                             vSEnrollNumber, _
                                             vSMachineNumber, _
                                             vVerifyMode, _
                                             vInOutMode, _
                                             vYear, _
                                             vMonth, _
                                             vDay, _
                                             vHour, _
                                             vMinute)
            If (vRet = False) Then Exit Do
            If vRet And (i <> 1) Then
                .AddItem (1)
            End If
            .Row = i
            .Col = 0
            .Text = i
            DoEvents
            .Col = 1
            .Text = vTMachineNumber
            .Col = 2
            .Text = vSEnrollNumber
            .Col = 3
            .Text = vSMachineNumber
            .Col = 4
            If vVerifyMode = 1 Then
                .Text = "Fp"
            ElseIf vVerifyMode = 2 Then
                .Text = "Password"
            Else
                .Text = "--"
            End If
            .Col = 5
            Select Case vInOutMode
            Case 0
                .Text = vInOutMode & "--" & "AT"
            Case 1
                .Text = vInOutMode & "--" & "LV"
            Case 2
                .Text = vInOutMode & "--" & "Ext-AT"
            Case 3
                .Text = vInOutMode & "--" & "Ext-LV"
            Case 4
                .Text = vInOutMode & "--" & "Out-AT"
            Case 5
                .Text = vInOutMode & "--" & "Out-LV"
            End Select
            .Col = 6
            .Text = CStr(vYear) & "/" & Format(vMonth, "0#") & "/" & Format(vDay, "0#") & _
                    " " & Format(vHour, "0#") & ":" & Format(vMinute, "0#")
            
            LabelTotal.Caption = "Total : " & i
            DoEvents
            i = i + 1
        Loop
        .Redraw = True
    End With
    lblMessage.Caption = "ReadAllGLogData OK"
    
    MousePointer = vbDefault
End Sub


Private Sub cmdClearAllLog_Click()
    Dim vRet As Boolean
    Dim vErrorCode As Long
    vRet = frmMain.CZKEM1.ClearGLog(frmMain.vMachineNumber)
    If vRet Then
        lblMessage.Caption = "ClearGLog OK"
    Else
        frmMain.CZKEM1.GetLastError vErrorCode
        lblMessage.Caption = ErrorPrint(vErrorCode)
    End If
End Sub

Private Sub cmdExit_Click()
    Unload Me
    frmMain.Visible = True
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Me.Visible = False
    frmMain.Visible = True
End Sub

⌨️ 快捷键说明

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