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

📄 tmreadtype.cls

📁 这是一个银行IC卡门禁系统软件
💻 CLS
字号:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "tmreadtype"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
Private mvarcardno As Long '局部复制
Private mvarcardtype As JalTMCardType
Private mvarromid As String '局部复制

 Public Enum JalTMCardType

    TMasterCard = 1
    tSecurityCard = 2
    TFloorcard = 3
    TGuestCard = 4
    tTerminateCard = 5
    TModifyCard = 6
    tRegionCard = 7
    TInitializeCard = 8
    TTimeCard = 9
    TDataCard = 10
    TGroupCard = 99

End Enum

Public Enum DallasCardTypes

    Dallas1990 = 1
    Dallas1991 = 2
    dallas1994 = 5
    dallas1995 = 10

End Enum
Private m_DallasCardType As Byte

Public Property Get DallasCardType() As DallasCardTypes

    DallasCardType = m_DallasCardType

End Property

Public Property Let DallasCardType(ByVal Value As DallasCardTypes)

    m_DallasCardType = Value

End Property

Public Function treadtype() As Boolean
    
    Dim temp As String
    Dim i As Byte
    Dim rec As Boolean
    
    temp = ""
    temp = readtype()
    
    If temp <> "" Then

        i = CLng("&H" + Mid(temp, 15, 2))

        Select Case i
            Case 1
                romid = Trim(Mid(temp, 1, 16))
                rec = True
            Case 2
                cardtype = CLng("&H" + Mid(temp, 17, 2))
                cardno = CLng("&H" + Mid(temp, 19, 4))
                romid = Trim(Mid(temp, 1, 16))
                DallasCardType = Dallas1991
                rec = True

            Case 4
                romid = Trim(Mid(temp, 1, 16))
                cardtype = JTimeCard
                DallasCardType = dallas1994
                rec = True

            Case 10
                romid = Trim(Mid(temp, 1, 16))
                cardtype = JDataCard
                DallasCardType = dallas1995
                rec = True

            Case Else
                rec = False

        End Select

    Else

        rec = False

    End If
    
    If romid = "" Then

        Err.Raise 60000 - 1, , "未找到TM卡"

    End If

    treadtype = rec

End Function

Public Property Let romid(ByVal vData As String)

    mvarromid = vData

End Property

Public Property Get romid() As String

    romid = mvarromid

End Property

Public Property Let cardtype(ByVal vData As JalTMCardType)

    mvarcardtype = vData

End Property

Public Property Get cardtype() As JalTMCardType

    cardtype = mvarcardtype

End Property

Public Property Let cardno(ByVal vData As Long)

    If vData > 65535 Or vData < 0 Then

        Err.Raise 60012, "tmreadtype.CardNo", GetError(12)
        Exit Property

    End If

    mvarcardno = vData

End Property

Public Property Get cardno() As Long

    cardno = mvarcardno

End Property

Private Sub Class_Initialize()
ReDim state_buffer(15360)
End Sub

⌨️ 快捷键说明

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