Foxtable(狐表)用户栏目专家坐堂 → 请教vb.net代码如何转换在狐表中使用?


  共有2509人关注过本帖平板打印复制链接

主题:请教vb.net代码如何转换在狐表中使用?

帅哥哟,离线,有人找我吗?
z769036165
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:758 积分:5408 威望:0 精华:0 注册:2012/10/5 21:53:00
请教vb.net代码如何转换在狐表中使用?  发帖心情 Post By:2019/10/11 8:50:00 [只看该作者]

Private Const DeviceCodePage As Int32 = 936
Public Sub New()
InitializeComponent()
End Sub
Private Sub buttonClear_Click(ByVal sender As Object, ByVal e As EventArgs)
textBoxRecords.Clear()
End Sub
Private Sub buttonExport_Click(ByVal sender As Object, ByVal e As EventArgs)
Try
    Using Client As FaceId = New FaceId(textBoxDeviceIP.Text, Convert.ToInt32(textBoxDevicePort.Text))
    Dim Answer As String
    Dim ErrorCode As FaceId_ErrorCode = Client.Execute("GetRecord(end_time=""" & DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") & """)", Answer, DeviceCodePage)
    If ErrorCode = FaceId_ErrorCode.Success Then
        Dim Pattern As String = "\b(time=.+" & vbCrLf & "(?:photo=""[^""]+"")*)"
        Dim matches As MatchCollection = Regex.Matches(Answer, Pattern)
        If matches IsNot Nothing Then
            For Each match As Match In matches
                textBoxRecords.AppendText(match.Groups(1).Value & vbCrLf)
            Next
        End If
    Else
        MessageBox.Show("错误代码:" & ErrorCode.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.[Error])
    End If
End Using
Catch ex As Exception
    MessageBox.Show(ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.[Error])
End Try

[此贴子已经被作者于2019/10/11 9:03:36编辑过]

 回到顶部
总数 11 1 2 下一页