clsmatchlists.cls
来自「vb写的网络蜘蛛程序」· CLS 代码 · 共 39 行
CLS
39 行
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "clsMatchLists"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
Public Matches As New Collection
Public Sub AddMatch(AMatch As clsMatch)
Matches.Add AMatch
End Sub
Private Function Min(A As Integer, B As Integer) As Integer
If A < B Then Min = A Else Min = B
End Function
Private Function Max(A As Integer, B As Integer) As Integer
If A > B Then Max = A Else Max = B
End Function
Public Sub AddNewMatch(StartPos As Long, EndPos As Long)
Dim Match As New clsMatch
Match.StartingPosition = StartPos
Match.EndingPosition = EndPos
AddMatch Match
End Sub
Public Sub AddSpread(A As clsMatch, B As clsMatch)
AddNewMatch _
Min(A.StartingPosition, B.StartingPosition), _
Max(A.EndingPosition, B.EndingPosition)
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?