Public Sub LoadUserInfo(ByVal mPath As String, ByVal LVW As ListView)
If System.IO.File.Exists(mPath) Then
Dim strLine As String, tabLine() As String, lItem As ListViewItem, tabReplace() As String = {"", "", "email", "address", "phone"}
Using sr As New System.IO.StreamReader(mPath)
While Not sr.EndOfStream
strLine = sr.ReadLine
If strLine <> "" Then
tabLine = strLine.Split(":")
lItem = LVW.Items.Add(tabLine(0))
For j As Integer = 1 To tabLine.GetUpperBound(0)
lItem.SubItems.Add(tabLine(j))
Next j
For j As Integer = tabLine.Count To 4
lItem.SubItems.Add(tabReplace(j))
Next j
End If
End While
End Using
End If
End Sub
|