我使用Winscp进行文件传输,并获得了详细的文件传输进度,如下面的链接,
File transfer details binding continuously until file transfered in window using WPF
和下面的传输代码链接
https://winscp.net/eng/docs/library
但我得取消文件传输。请给出你的建议。
发布于 2017-04-27 04:18:03
据我理解,实现这一目标的唯一途径是中止本届会议。
链接:abort
发布于 2017-06-01 12:15:36
您可以使用FileTransferProgressEventArgs.Cancel
bool cancel = false; // set to true to cancel the transfer
session.FileTransferProgress +=
(sender, e) =>
{
if (cancel)
{
e.Cancel = true;
}
};
session.PutFiles(localPath, remotePath).Check();
https://stackoverflow.com/questions/43648544
复制相似问题