以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]图片浏览器管理ftp远程文件问题  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=186778)

--  作者:xubing051018
--  发布时间:2023/5/29 10:09:00
--  [求助]图片浏览器管理ftp远程文件问题
窗口里有个图片浏览器PictureViewer1,设置了远程ftp文件
通过PictureViewer1的 新增 功能,从本地上次文件到ftp目录,文件浏览器里也加了此文件记录,
接着用PictureViewer1的 删除 功能,文件浏览器里的文件记录被删除了,但是远程ftp文件没有被删除,
请问如何设置能够同步删除ftp远程文件?

--  作者:有点蓝
--  发布时间:2023/5/29 10:27:00
--  
需要另外使用代码处理:http://www.foxtable.com/webhelp/topics/1410.htmhttp://www.foxtable.com/webhelp/topics/2700.htm

Dim pv As WinForm.PictureViewer = e.Form.Controls("PictureViewer1")
Dim
 fl As String = pv.SelectedItem
If
 fl > "" Then
    pv.DeleteFile(fl)
Dim ftp1 As New FtpClient
ftp1
.Host="196.128.143.28"
ftp1
.Account = "foxuser"
ftp1
.Password = "138238110"
If 
ftp1.DeleteFile(fl") = True Then
    
Messagebox.show("删除完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
    
Messagebox.show("删除失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If

End
 If