cFiltratePages.cls
资源名称:IE_VB.rar [点击查看]
上传用户:davilee3
上传日期:2015-04-22
资源大小:986k
文件大小:2k
源码类别:
浏览器
开发平台:
Visual Basic
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- Persistable = 0 'NotPersistable
- DataBindingBehavior = 0 'vbNone
- DataSourceBehavior = 0 'vbNone
- MTSTransactionMode = 0 'NotAnMTSObject
- END
- Attribute VB_Name = "cFiltratePages"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = False
- Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
- Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
- '被过滤页面
- Option Explicit
- Private Type mTypPage
- ParentUrl As String
- Url As String
- End Type
- Private mPage() As mTypPage '1 base
- Private mPageCnt&
- Public Event eAdd(nParentUrl As String, nUrl As String)
- Private Sub Class_Initialize()
- mPageCnt = 0
- ReDim mPage(0 To mPageCnt)
- End Sub
- Public Sub Add(nParentUrl$, nUrl$, Optional canEvent As Boolean = True)
- mPageCnt = mPageCnt + 1
- ReDim Preserve mPage(0 To mPageCnt)
- mPage(mPageCnt).ParentUrl = nParentUrl
- mPage(mPageCnt).Url = nUrl
- If canEvent Then
- RaiseEvent eAdd(nParentUrl, nUrl)
- End If
- End Sub
- Public Property Get Count() As Long
- Count = mPageCnt
- End Property
- Public Sub Remove(index&)
- Dim i&
- If index <= mPageCnt Then
- For i = index To mPageCnt - 1
- mPage(i) = mPage(i + 1)
- Next i
- mPageCnt = mPageCnt - 1
- End If
- End Sub
- Public Sub Clear()
- mPageCnt = 0
- ReDim mPage(0 To mPageCnt)
- End Sub
- Public Sub SetAllPage(nParentUrl() As String, nUrl() As String, nCount&)
- Dim i&
- mPageCnt = nCount
- ReDim mPage(0 To mPageCnt)
- For i = 1 To mPageCnt
- mPage(i).ParentUrl = nParentUrl(i)
- mPage(i).Url = nUrl(i)
- Next i
- End Sub
- Public Sub Item(index&, nParentUrl$, nUrl$)
- nParentUrl = mPage(index).ParentUrl
- nUrl = mPage(index).Url
- End Sub
- Public Function GetUrl(iIndex&) As String
- If iIndex > 0 And iIndex <= mPageCnt Then
- GetUrl = mPage(iIndex).Url
- End If
- End Function