Dim str As String = FileSys.ReadAllText(ProjectPath & "config.txt")
Dim n As Integer = GetConfigValue("Count",1)
Dim Code As String = str
Dim sss As String
Try
sss = DecryptText(Code,"abc","abc")
Catch ex As Exception
End Try
Dim Ok As Boolean
If Code > "" AndAlso sss = ComputerId Then '如果注册码正确
OK = True
Else
If n > 0 Then
Forms("注册").Open() '
'FileSys.WriteAllText(ProjectPath & "config.txt", "123456789注册码", False)
Code = FileSys.ReadAllText(ProjectPath & "config.txt")
Try
sss = DecryptText(Code,"abc","abc")
Catch ex As Exception
End Try
If Code > "" AndAlso sss = ComputerId Then '如果注册码正确
OK = True
End If
End If
If n > 0 AndAlso Ok = False Then
Messagebox.Show("您正在使用的产品已经超出试用次数!")
Syscmd.Project.Exit()
End If
End If
n = n + 1
SaveConfigValue("Count",n)