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

📄 clsproject.cls

📁 利用Visual Basic6.0制作的字符串搜索处理系统!推荐中
💻 CLS
📖 第 1 页 / 共 4 页
字号:
For i = 0 To UBound(astrForm)
    If Trim$(astrForm(i)) <> "" Then
        Set cFile = New clsFile
        cFile.FileType = "窗体: "
        cFile.FilePath = mstrVBPPath
        cFile.Filename = astrForm(i)
        cFile.ProjectTitle = mstrTitle
        cFile.ProjectVersionMajor = mstrMajor
        cFile.ProjectVersionMinor = mstrMinor
        cFile.ProjectVersionRevision = mstrRevision
        cFile.StyleSheetFile = mstrStyleSheetFile
        cFile.IncludeAPI = mblnIncludeAPI
        cFile.IncludeCounts = mblnIncludeCounts
        cFile.IncludeDeclarations = mblnIncludeDeclarations
        cFile.IncludeEvents = mblnIncludeEvents
        cFile.IncludeReferences = mblnIncludeReferences
        cFile.IncludeSubs = mblnIncludeSubs
        cFile.IncludeTypes = mblnIncludeTypes
        cFile.IncludeAttributes = mblnIncludeAttributes
        mcForms.Add cFile
        Set cFile = Nothing
    End If
Next i

For i = 0 To UBound(astrModule)
    If Trim$(astrModule(i)) <> "" Then
        Set cFile = New clsFile
        cFile.FileType = "模块: "
        cFile.FilePath = mstrVBPPath
        cFile.Filename = astrModule(i)
        cFile.ProjectTitle = mstrTitle
        cFile.ProjectVersionMajor = mstrMajor
        cFile.ProjectVersionMinor = mstrMinor
        cFile.ProjectVersionRevision = mstrRevision
        cFile.StyleSheetFile = mstrStyleSheetFile
        cFile.IncludeAPI = mblnIncludeAPI
        cFile.IncludeCounts = mblnIncludeCounts
        cFile.IncludeDeclarations = mblnIncludeDeclarations
        cFile.IncludeEvents = mblnIncludeEvents
        cFile.IncludeReferences = mblnIncludeReferences
        cFile.IncludeSubs = mblnIncludeSubs
        cFile.IncludeTypes = mblnIncludeTypes
        cFile.IncludeAttributes = mblnIncludeAttributes
        mcModules.Add cFile
        Set cFile = Nothing
    End If
Next i

For i = 0 To UBound(astrClass)
    If Trim$(astrClass(i)) <> "" Then
        Set cFile = New clsFile
        cFile.FileType = "类模块: "
        cFile.FilePath = mstrVBPPath
        cFile.Filename = astrClass(i)
        cFile.ProjectTitle = mstrTitle
        cFile.ProjectVersionMajor = mstrMajor
        cFile.ProjectVersionMinor = mstrMinor
        cFile.ProjectVersionRevision = mstrRevision
        cFile.StyleSheetFile = mstrStyleSheetFile
        cFile.IncludeAPI = mblnIncludeAPI
        cFile.IncludeCounts = mblnIncludeCounts
        cFile.IncludeDeclarations = mblnIncludeDeclarations
        cFile.IncludeEvents = mblnIncludeEvents
        cFile.IncludeReferences = mblnIncludeReferences
        cFile.IncludeSubs = mblnIncludeSubs
        cFile.IncludeTypes = mblnIncludeTypes
        cFile.IncludeAttributes = mblnIncludeAttributes
        mcClasses.Add cFile
        Set cFile = Nothing
    End If
Next i

For i = 0 To UBound(astrUserControl)
    If Trim$(astrUserControl(i)) <> "" Then
        Set cFile = New clsFile
        cFile.FileType = "用户控件: "
        cFile.FilePath = mstrVBPPath
        cFile.Filename = astrUserControl(i)
        cFile.ProjectTitle = mstrTitle
        cFile.ProjectVersionMajor = mstrMajor
        cFile.ProjectVersionMinor = mstrMinor
        cFile.ProjectVersionRevision = mstrRevision
        cFile.StyleSheetFile = mstrStyleSheetFile
        cFile.IncludeAPI = mblnIncludeAPI
        cFile.IncludeCounts = mblnIncludeCounts
        cFile.IncludeDeclarations = mblnIncludeDeclarations
        cFile.IncludeEvents = mblnIncludeEvents
        cFile.IncludeReferences = mblnIncludeReferences
        cFile.IncludeSubs = mblnIncludeSubs
        cFile.IncludeTypes = mblnIncludeTypes
        cFile.IncludeAttributes = mblnIncludeAttributes
        mcUserControls.Add cFile
        Set cFile = Nothing
    End If
Next i

For i = 0 To UBound(astrPropertyPage)
    If Trim$(astrPropertyPage(i)) <> "" Then
        Set cFile = New clsFile
        cFile.FileType = "属性页: "
        cFile.FilePath = mstrVBPPath
        cFile.Filename = astrPropertyPage(i)
        cFile.ProjectTitle = mstrTitle
        cFile.ProjectVersionMajor = mstrMajor
        cFile.ProjectVersionMinor = mstrMinor
        cFile.ProjectVersionRevision = mstrRevision
        cFile.StyleSheetFile = mstrStyleSheetFile
        cFile.IncludeAPI = mblnIncludeAPI
        cFile.IncludeCounts = mblnIncludeCounts
        cFile.IncludeDeclarations = mblnIncludeDeclarations
        cFile.IncludeEvents = mblnIncludeEvents
        cFile.IncludeReferences = mblnIncludeReferences
        cFile.IncludeSubs = mblnIncludeSubs
        cFile.IncludeTypes = mblnIncludeTypes
        cFile.IncludeAttributes = mblnIncludeAttributes
        mcPropertyPages.Add cFile
        Set cFile = Nothing
    End If
Next i

For i = 0 To UBound(astrUserDocument)
    If Trim$(astrUserDocument(i)) <> "" Then
        Set cFile = New clsFile
        cFile.FileType = "用户文档: "
        cFile.FilePath = mstrVBPPath
        cFile.Filename = astrUserDocument(i)
        cFile.ProjectTitle = mstrTitle
        cFile.ProjectVersionMajor = mstrMajor
        cFile.ProjectVersionMinor = mstrMinor
        cFile.ProjectVersionRevision = mstrRevision
        cFile.StyleSheetFile = mstrStyleSheetFile
        cFile.IncludeAPI = mblnIncludeAPI
        cFile.IncludeCounts = mblnIncludeCounts
        cFile.IncludeDeclarations = mblnIncludeDeclarations
        cFile.IncludeEvents = mblnIncludeEvents
        cFile.IncludeReferences = mblnIncludeReferences
        cFile.IncludeSubs = mblnIncludeSubs
        cFile.IncludeTypes = mblnIncludeTypes
        cFile.IncludeAttributes = mblnIncludeAttributes
        mcUserDocuments.Add cFile
        Set cFile = Nothing
    End If
Next i

For i = 0 To UBound(astrDesigner)
    If Trim$(astrDesigner(i)) <> "" Then
        Set cFile = New clsFile
        cFile.FileType = "报表文件: "
        cFile.FilePath = mstrVBPPath
        cFile.Filename = astrDesigner(i)
        cFile.ProjectTitle = mstrTitle
        cFile.ProjectVersionMajor = mstrMajor
        cFile.ProjectVersionMinor = mstrMinor
        cFile.ProjectVersionRevision = mstrRevision
        cFile.StyleSheetFile = mstrStyleSheetFile
        cFile.IncludeAPI = mblnIncludeAPI
        cFile.IncludeCounts = mblnIncludeCounts
        cFile.IncludeDeclarations = mblnIncludeDeclarations
        cFile.IncludeEvents = mblnIncludeEvents
        cFile.IncludeReferences = mblnIncludeReferences
        cFile.IncludeSubs = mblnIncludeSubs
        cFile.IncludeTypes = mblnIncludeTypes
        cFile.IncludeAttributes = mblnIncludeAttributes
        mcDesigners.Add cFile
        Set cFile = Nothing
    End If
Next i

For i = 0 To UBound(astrReference)
    If Trim$(astrReference(i)) <> "" Then
        Set cItem = New clsItem
        cItem.ItemReference = astrReference(i)
        mcReferences.Add cItem
        Set cItem = Nothing
    End If
Next i

For i = 0 To UBound(astrObject)
    If Trim$(astrObject(i)) <> "" Then
        Set cItem = New clsItem
        cItem.ItemReference = astrObject(i)
        mcObjects.Add cItem
        Set cItem = Nothing
    End If
Next i

For i = 0 To UBound(astrRelatedDocs)
    If Trim$(astrRelatedDocs(i)) <> "" Then
        Set cItem = New clsItem
        cItem.ItemReference = astrRelatedDocs(i)
        mcRelatedDocs.Add cItem
        Set cItem = Nothing
    End If
Next i

If mblnIncludeNAVBar = True Then
    For Each cFile In mcForms
        cFile.IncludeNAVBar = True
        cFile.NAVBar = NAVBarHTML(cFile.Filename)
    Next
    For Each cFile In mcModules
        cFile.IncludeNAVBar = True
        cFile.NAVBar = NAVBarHTML(cFile.Filename)
    Next
    For Each cFile In mcClasses
        cFile.IncludeNAVBar = True
        cFile.NAVBar = NAVBarHTML(cFile.Filename)
    Next
    For Each cFile In mcUserControls
        cFile.IncludeNAVBar = True
        cFile.NAVBar = NAVBarHTML(cFile.Filename)
    Next
    For Each cFile In mcPropertyPages
        cFile.IncludeNAVBar = True
        cFile.NAVBar = NAVBarHTML(cFile.Filename)
    Next
    For Each cFile In mcUserDocuments
        cFile.IncludeNAVBar = True
        cFile.NAVBar = NAVBarHTML(cFile.Filename)
    Next
    For Each cFile In mcDesigners
        cFile.IncludeNAVBar = True
        cFile.NAVBar = NAVBarHTML(cFile.Filename)
    Next
End If

For Each cFile In mcForms
    cFile.ParseForm
    mlngNumCodeLines = mlngNumCodeLines + cFile.CodeLineCount
    mlngNumCommentLines = mlngNumCommentLines + cFile.CommentLineCount
Next
For Each cFile In mcClasses
    cFile.ParseForm
    mlngNumCodeLines = mlngNumCodeLines + cFile.CodeLineCount
    mlngNumCommentLines = mlngNumCommentLines + cFile.CommentLineCount
Next
For Each cFile In mcModules
    cFile.ParseForm
    mlngNumCodeLines = mlngNumCodeLines + cFile.CodeLineCount
    mlngNumCommentLines = mlngNumCommentLines + cFile.CommentLineCount
Next
For Each cFile In mcUserControls
    cFile.ParseForm
    mlngNumCodeLines = mlngNumCodeLines + cFile.CodeLineCount
    mlngNumCommentLines = mlngNumCommentLines + cFile.CommentLineCount
Next
For Each cFile In mcPropertyPages
    cFile.ParseForm
    mlngNumCodeLines = mlngNumCodeLines + cFile.CodeLineCount
    mlngNumCommentLines = mlngNumCommentLines + cFile.CommentLineCount
Next
For Each cFile In mcUserDocuments
    cFile.ParseForm
    mlngNumCodeLines = mlngNumCodeLines + cFile.CodeLineCount
    mlngNumCommentLines = mlngNumCommentLines + cFile.CommentLineCount
Next
For Each cFile In mcDesigners
    cFile.ParseForm
    mlngNumCodeLines = mlngNumCodeLines + cFile.CodeLineCount
    mlngNumCommentLines = mlngNumCommentLines + cFile.CommentLineCount
Next
    
Exit Sub

Handler:
Err.Raise Err.Number, IIf(Left$(Err.Source, 3) <> "cls", "clsProject.ParseVBPFile", Err.Source), Err.Description
    
End Sub

Public Sub SaveHTML()

Dim intFileNum As Integer
Dim cFile As clsFile

intFileNum = FreeFile

Open mstrOutputPath & IIf(Right$(mstrOutputPath, 1) = "\", "", "\") & FileOnly(ExtractFile(mstrVBPName, mstrVBPPath)) & ".html" For Output As #intFileNum

Print #intFileNum, AddHTMLHeader
Print #intFileNum, AddHTMLBody
Print #intFileNum, AddHTMLFooter

Close #intFileNum

If mintNumForms > 0 And mblnIncludeForms = True Then
    For Each cFile In mcForms
        cFile.SaveHTML mstrOutputPath
    Next
End If
If mintNumModules > 0 And mblnIncludeModules = True Then
    For Each cFile In mcModules
        cFile.SaveHTML mstrOutputPath
    Next
End If
If mintNumClasses > 0 And mblnIncludeClasses = True Then
    For Each cFile In mcClasses
        cFile.SaveHTML mstrOutputPath
    Next
End If
If mintNumUserControls > 0 And mblnIncludeUserControls = True Then
    For Each cFile In mcUserControls
        cFile.SaveHTML mstrOutputPath
    Next
End If
If mintNumPropertyPages > 0 And mblnIncludePropertyPages = True Then
    For Each cFile In mcPropertyPages
        cFile.SaveHTML mstrOutputPath
    Next
End If
If mintNumDesigners > 0 And mblnIncludeDesigners = True Then
    For Each cFile In mcDesigners
        cFile.SaveHTML mstrOutputPath
    Next
End If
If mintNumUserDocuments > 0 And mblnIncludeUserDocuments = True Then
    For Each cFile In mcUserDocuments
        cFile.SaveHTML mstrOutputPath
    Next
End If

If mblnOutputStyleSheet = True Then
    Call OutputStyleSheet(mstrOutputPath, mstrStyleSheetFile)
End If

If mintOutputType = HTMLHelp Then
    Call OutputHTMLHelpHHC
    Call OutputHTMLHelpHHP
End If

End Sub

⌨️ 快捷键说明

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