现在基本可以正确识别打开,但是有一个问题,就是在某行附件还没有打开的时候,也识别成已打开,但是关闭后,可以正确识别已关闭,原因是?
Dim str_FileName As String =e.FileName
'msgbox(str_FileName)
'msgbox(str_FileName.LastIndexOf("182004.txt")) 弹出2
str_FileName=str_FileName.TrimStart("//")
'msgbox(str_FileName)
Dim ftp1 As new ftpclient
ftp1.host="172.16.5.89"
ftp1.Account = "ftpAdmin"
ftp1.password = "Admin123"
Dim str_path="D:\foxtable\Development\CaseStudy\RemoteFiles\" & str_FileName
msgbox(str_path)
'If ftp1.Download("\123.docx",str_path) = True Then
If ftp1.Download(str_FileName,str_path) = True Then
Messagebox.show("下载完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
Messagebox.show("下载失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
If e.DataCol.Name = "附件" Then
'Dim str_path As String = e.DataRow("附件")
msgbox(str_path)
Vars("ls").add(e.DataRow("附件") ,system.Diagnostics.Process.Start(str_path))
e.Cancel = True '取消系统默认的打开文件操作,因为前面已经编码打开了
End If
定时器:
try
'vars("ls")("文档1").ExitTime
vars("ls")(CurrentTable.Current("附件")).ExitTime
msgbox(CurrentTable.Current("附件") & "已经关闭")
'msgbox(CurrentTable.Current("附件")) & "已经关闭")
' 此处要加入把文件上传至ftp的代码,以免文件修改后丢失
catch ex As exception
msgbox("已经打开")
End try
[此贴子已经被作者于2018/1/30 15:10:33编辑过]