AfterOpenProject事件代码中 比较版本升级时 提示编译错误:“SkipError”不是“HttpClient”的成员 怎么解决呢?
当前狐表版本20200529
Dim File As String = ProjectPath & "\Attachments\Connect.Ini"
BaseMainForm.ControlBox = False
Dim ErrMsg As String
Dim Conn As String = FileSys.ReadAllText(File)
If Connections.TryConnect(Conn,ErrMsg) = False Then
MessageBox.Show("数据源无法连通" & vbcrlf & "原因:" & ErrMsg & vbcrlf & "点击确定,退出当前系统,请重新启动程序!" ,"温馨提示")
Syscmd.Project.Exit()
Else
Dim update As String = ProjectPath & "\Attachments\update.txt"
Dim Connupdate As String = FileSys.ReadAllText(update)
'获取系统版本号
Dim req = System.Net.WebRequest.Create(UpdatePath & "/update.txt")
Dim pos = req.GetResponse
Dim stm As System.IO.Stream = pos.GetResponseStream()
Dim reader As New System.IO.StreamReader(stm)
Dim str As String ="V" & reader.ReadToEnd
Dim banben As String
Dim Multi As String = str
Dim Values11() As String
Values11 = Multi.split("|")
For Index As Integer = 0 To Values11.Length - 1
banben= Values11(0).Replace(" ","").Replace(":","").Replace("-","")
Next
Dim up As Boolean
Dim hc As New HttpClient(UpdatePath & "/update.txt")
hc.SkipError = True
If hc.GetFile(ProjectPath &"update.txt") Then
up = Syscmd.Project.Update(False,False)
End If
If up = False Then '如果没有升级
MainTable=Tables("表a")
TableCaptionVisible = False
Forms("登录窗口").Show()
Else '如果升级成功
Application.ReStart '小版本升级完成后自动重启项目'
End If
End If
---------------------------
错误
---------------------------
编译错误:“SkipError”不是“HttpClient”的成员。
错误代码:hc.SkipError = True
---------------------------
确定
---------------------------
[此贴子已经被作者于2022/7/4 12:08:50编辑过]