📄 form1.frm
字号:
ForeColor = &H00800000&
Height = 255
Index = 7
Left = 3120
TabIndex = 29
Top = 4680
Width = 1695
End
Begin VB.Label Label
Alignment = 2 'Center
Caption = "ADVANCED MENU"
Enabled = 0 'False
ForeColor = &H00800000&
Height = 255
Index = 6
Left = 3120
TabIndex = 28
Top = 3960
Width = 1695
End
Begin VB.Label Label
Alignment = 2 'Center
Caption = "READ VIA 2D"
Enabled = 0 'False
ForeColor = &H00800000&
Height = 255
Index = 5
Left = 3120
TabIndex = 26
Top = 4320
Width = 1695
End
Begin VB.Label lblStat
Alignment = 1 'Right Justify
Caption = "Status:"
ForeColor = &H00404000&
Height = 255
Left = 1680
TabIndex = 24
Top = 6045
Visible = 0 'False
Width = 855
End
Begin VB.Label lblSNd
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
ForeColor = &H00000080&
Height = 300
Left = 1080
TabIndex = 23
Top = 6000
Width = 525
End
Begin VB.Label Label
Alignment = 2 'Center
Caption = "UNMARRY CARD"
Enabled = 0 'False
ForeColor = &H00800000&
Height = 255
Index = 4
Left = 240
TabIndex = 22
Top = 4320
Width = 1695
End
Begin VB.Label Label
Alignment = 2 'Center
Caption = "2D HOLE"
Enabled = 0 'False
ForeColor = &H00800000&
Height = 255
Index = 3
Left = 360
TabIndex = 20
Top = 5040
Width = 1455
End
Begin VB.Label Label
Alignment = 2 'Center
Caption = "CHECK FOR OPEN"
Enabled = 0 'False
ForeColor = &H00800000&
Height = 255
Index = 2
Left = 240
TabIndex = 19
Top = 3960
Width = 1695
End
Begin VB.Label Label
Alignment = 2 'Center
Caption = "EXIT"
Enabled = 0 'False
ForeColor = &H00800000&
Height = 255
Index = 1
Left = 5280
TabIndex = 18
Top = 5400
Width = 2295
End
Begin VB.Label Label
Alignment = 2 'Center
Caption = "RESET"
Enabled = 0 'False
ForeColor = &H00800000&
Height = 255
Index = 0
Left = 360
TabIndex = 17
Top = 4680
Width = 1455
End
Begin VB.Label Label6
Alignment = 1 'Right Justify
Caption = "USW:"
ForeColor = &H00800000&
Height = 255
Left = 0
TabIndex = 15
Top = 3140
Width = 1215
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
Caption = "Guide Byte:"
ForeColor = &H00800000&
Height = 255
Left = 0
TabIndex = 13
Top = 2680
Width = 1215
End
Begin VB.Label Label4
Alignment = 1 'Right Justify
Caption = "Time Zone:"
ForeColor = &H00800000&
Height = 255
Left = 0
TabIndex = 11
Top = 2220
Width = 1215
End
Begin VB.Label Label3
Alignment = 1 'Right Justify
Caption = "Card Status:"
ForeColor = &H00800000&
Height = 255
Left = 0
TabIndex = 9
Top = 1800
Width = 1215
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
Caption = "IRD #:"
ForeColor = &H00800000&
Height = 255
Left = 600
TabIndex = 7
Top = 1320
Width = 615
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
Caption = "Card #:"
ForeColor = &H00800000&
Height = 255
Left = 480
TabIndex = 6
Top = 840
Width = 735
End
Begin VB.Label txtATR
BackColor = &H0080FFFF&
BorderStyle = 1 'Fixed Single
ForeColor = &H00C00000&
Height = 270
Left = 600
TabIndex = 1
Top = 120
Width = 5500
End
Begin VB.Label lblATR
Caption = "ATR"
ForeColor = &H00800000&
Height = 255
Left = 180
TabIndex = 5
Top = 150
Width = 495
End
Begin VB.Menu mnuBlank1
Caption = " "
End
Begin VB.Menu mnuBlank2
Caption = " "
End
Begin VB.Menu mnublank3
Caption = " "
End
Begin VB.Menu mnublank4
Caption = " "
End
Begin VB.Menu mnuBlank5
Caption = ""
End
Begin VB.Menu mnuBlank6
Caption = ""
End
Begin VB.Menu mnuBlank7
Caption = ""
End
Begin VB.Menu mnuBlank8
Caption = ""
End
Begin VB.Menu mnuBlank9
Caption = ""
End
Begin VB.Menu mnuBlank10
Caption = ""
End
Begin VB.Menu mnuBlank11
Caption = ""
End
Begin VB.Menu mnuBlank12
Caption = ""
End
Begin VB.Menu mnuBlank13
Caption = ""
End
Begin VB.Menu mnuBlank14
Caption = ""
End
Begin VB.Menu mnuBlank15
Caption = ""
End
Begin VB.Menu mnuBlank16
Caption = ""
End
Begin VB.Menu mnuBlank17
Caption = ""
End
Begin VB.Menu mnuBlank18
Caption = ""
End
Begin VB.Menu mnuBlank19
Caption = ""
End
Begin VB.Menu mnuBlank20
Caption = ""
End
Begin VB.Menu mnuHelp
Caption = "&Help"
Enabled = 0 'False
NegotiatePosition= 2 'Middle
Begin VB.Menu mnuAbout
Caption = "&About"
Shortcut = ^A
End
Begin VB.Menu mnuEEProm
Caption = "&Important EEProm Locations"
Shortcut = ^I
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim CommPort As Integer
Dim Timeout2 As Integer
Dim Command58 As String
Dim Command2A As String
Dim CardType As String
Dim CardNumber As String
Dim CardStatus As String
Dim IRDNumber As String
Dim TimZone As String
Dim Guide As String
Dim USW As String
Dim StartFlag As Boolean
Dim CardFlag As Boolean
Dim Position As Integer
Dim EEProm As String
Dim ReadAddress As String
Dim ReadOne As Boolean
Dim NumToRead As Integer
Dim EStart As Integer
Dim ESecond As Integer
Dim InTime As Long
Dim DontReceive As Boolean
Dim DontHide As Boolean
Dim Form As Form
Private Sub CardNo_GotFocus()
If CardFlag Then
Read.Value = True
CardFlag = False
End If
End Sub
Private Sub Comm_OnComm()
Static Buffer As String
Dim I As Long
Dim J As Integer
Dim Temp As String
Dim Ev As Integer
Ev = Comm.CommEvent
'wait event, don't want buffer mixed up
If Ev = 2 Then
'For J = 1 To OutByte
For I = 1 To InTime
Next I
'Next J
StateChanged = 1
' Always buffer incoming data no matter
' what generated the OnComm event.
Buffer = Buffer & Comm.Input
'Check for P3 first
If (CardType = "P3") Or (CardType = "") Then
If Len(Buffer) >= MaxP3Limit Then
InBuf = Right$(Buffer, MaxP3Limit)
Buffer = "" ' Right$(Buffer, Len(Buffer) - MaxP3Limit)
ElseIf Len(Buffer) >= MaxP2Limit Then
' Call procedure to Process the received information.
InBuf = Right$(Buffer, MaxP2Limit)
Buffer = "" 'Right$(Buffer, Len(Buffer) - MaxP2Limit)
Else
InBuf = InBuf + Left$(Buffer, BufLen)
Buffer = ""
End If
ElseIf (CardType = "P2") Or (CardType = "") Then
' Check if buffer has grown larger than limit.
If (MaxP2Limit = 519) And (Len(Buffer) >= 519) Then
InBuf = Left$(Buffer, MaxP2Limit)
Buffer = "" 'Right$(Buffer, Len(Buffer) - MaxP2Limit)
ElseIf Len(Buffer) >= MaxP2Limit Then
' Call procedure to Process the received information.
InBuf = Right$(Buffer, MaxP2Limit)
Buffer = "" 'Right$(Buffer, Len(Buffer) - MaxP2Limit)
Else
InBuf = InBuf + Left$(Buffer, BufLen) '""
Buffer = ""
End If
End If
ElseIf DontReceive = False Then
Ev = 0
StateChanged = 1
End If
End Sub
'***********************
'
' Exit Routine
'
'***********************
Private Sub Exit_Click()
If Comm.PortOpen = True Then
Comm.PortOpen = False
End If
Unload Form2
Unload Me
Set Form = Nothing
End
End Sub
Private Sub Command1_Click()
txtStat.Text = "Checking for open holes..."
ReadAddress = " 8F 20"
NumToRead = 1
StartFlag = True
ReadOne = True
ReadEEprom
If Right$(InBuf, 3) = "09 " Then
txtStat.Text = "09 Hole not open."
Label11.Enabled = False
Else
txtStat.Text = "09 Hole is open"
Label11.Enabled = True
Label11.Visible = True
End If
ResetATR
InBuf = ""
ReadAddress = " 85 90"
ReadEEprom
If Mid$(InBuf, 4, 2) = "80" Then
txtStat.Text = "E3 Hole is open."
Label8.Enabled = True
Label8.Visible = True
Else
txtStat.Text = "E3 Hole not open."
Label8.Enabled = False
End If
InBuf = ""
EnableControls
PBar.Value = 0
End Sub
Private Sub Form_Load()
Dim Hdl As Integer
Dim Temp As String
Dim Msg As String
Dim I As Integer
Start = 1
On Error GoTo Handler
Msg = "Binchk.txt file is missing."
Hdl = FreeFile
Open "c:\Magic\binchk.txt" For Input As #Hdl
Msg = "Binchk.txt file is corrupt."
For I = 1 To 256
Line Input #Hdl, Temp
Temp = Left$(Temp, 47)
Form2.BinList.AddItem Temp
Next I
Close #Hdl
Me.Caption = MagiString + "
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -