日期:2009-06-24  浏览次数:20395 次

在项目中添加新项---类(ParseAPI.vb)
代码如下
Imports System.IO
Namespace API

    Public Class ParseAPI
        Dim sOldAPI As String
        Dim sNewAPI As String
        Dim pFile As String
        Dim pReader As StreamReader

        Public Sub New(ByVal sFile As String)
            If File.Exists(sFile) Then
                pFile = sFile
            Else
                pFile = ""
            End If
        End Sub

        Public Sub GetTypeInfo()
            Dim sReturn As String
            Dim sCSharp As String
            Dim sCSharpInput As String
            Dim sKey As String
            Dim bStart As Boolean = False
            Dim bTypeStatement As Boolean = False

            If pFile <> "" Then
                If Not File.Exists(pFile) Then
                    Types = Nothing
                    Return
                End If
                Dim sr As StreamReader = File.OpenText(pFile)
                Dim input As String
                input = sr.ReadLine()
                While Not input Is Nothing
                    If bStart = False And InStr(1, input, APISTARTTYPE) <> 0 Then
                        If Not input.StartsWith("'") Then
                            If Split(input, " ").Length() <= 2 Then
                                sKey = Split(input, " ")(1).ToString()