base-64字符串无效字符!![dvubb](skins/default/filetype/jpg.gif)
此主题相关图片如下:360软件小助手截图20131224192714.jpg
![dvubb 按此在新窗口浏览图片](UploadFile/2013-12/2013122419281737351.jpg)
BeforeOpenProject
Dim ipFile As String = FileSys.GetParentPath(e.File) & "\dbpath.ini"
If FileSys.FileExists(ipFile) = False Then
Dim FileName As String = FileSys.GetParentPath(e.File) & "\dbpath.ini"
Dim Info As String
If InputValue(Info, "设置","请在此处粘贴安装信息:") Then
'这时要对info解密分析信息是否正确
Dim Val As String = DecryptText(Info,"zhang","博讯科技#") '解密,两个密钥必须和加密的时候相同
If Val IsNot Nothing AndAlso Val.split("※").Length = 2 Then
FileSys.WriteAllText(FileName, Info, False,Encoding.UTF8)
Else
e.Cancel = True
e.HideSplashForm = True
MessageBox.show("密钥不对,设置初始信息失败,无法打开此项目.")
End If
Else
e.Cancel = True
e.HideSplashForm = True
MessageBox.show("您取消了安装信息设置,请在下次启动时设置.")
End If
Else
If Filesys.FileExists(ipFile) Then
Dim ip As String = FileSys.ReadAllText(ipFile,Encoding.UTF8)
'这时要对info解密分析信息是否正确
Dim Val As String = DecryptText(ip,"zhang","博讯科技#") '解密,两个密钥必须和加密的时候相同
Dim Values() As String = Val.split("※")
If Val IsNot Nothing AndAlso Values.Length = 2 Then
'网络不通,就不打开项目:
If Network.Ping(Values(0)) = False Then
e.Cancel = True
e.HideSplashForm = True
MessageBox.Show("无法连接服务器,软件启动失败!请稍候重试!")
End If
Else
e.Cancel = True
e.HideSplashForm = True
MessageBox.show("密钥发生了变化,设置初始信息失败,无法打开此项目.")
End If
'e.ConnectionString = e.ConnectionString.Replace("119.119.120.120",ip)将来在这里先pingIP是否通
End If
End If