pz.ini
内容格式是这样的:
系统名字 = xxx
开发者 =xxx
开发者信息 =xxx
授权用户 =xxx
授权联系人 = xxx
被授权人联系电话 =xxx
被授权人ID信息 = xxx
Dim str3() As String
If FileSys.FileExists(ProjectPath & "data\pz.ini") Then
Dim Val2 As String = FileSys.ReadAllText(ProjectPath & "data\pz.ini",system.text.encoding.default)
Dim Val3 As String = DecryptText(Val2,"zhujian","zhujian")
Dim str() As String = Val3.Split(vbcrlf)
For i As Integer = 0 To str.length -1
str3 = str(i).split("=")
If str3.length = 2 Then
For Each c As WinForm.Control In e.Form.Controls
If Typeof c Is WinForm.TextBox Then '判断控件是否是文本框
Dim t As WinForm.TextBox = c '使用特定类型的变量引用控件
'MessageBox.Show(t.name & str3(0))
If t.Name.Contains(str3(0)) Then
t.Value = str3(1)
End If
End If
Next
End If
Next
End If
读取都没有问题,只是文本框的名字和 " =" 前 的 不能匹配. 怎么改?
[此贴子已经被作者于2013-6-27 15:50:00编辑过]