void fileOutter_FileRequestReceived(string projectID, string senderID, string projectName, ulong totalSize, ResumedProjectItem resumedFileItem, string comment) { NDiskParameters para = Comment4NDisk.Parse(comment); if (para != null) //表明为网盘或远程磁盘 { return; } GlobalResourceManager.UiSafeInvoker.ActionOnUI <string, string, string, ulong, ResumedProjectItem, string>(this.do_fileOutter_FileRequestReceived, projectID, senderID, projectName, totalSize, resumedFileItem, comment); }
private bool FilterTransferingProject(TransferingProject pro) { NDiskParameters para = Comment4NDisk.Parse(pro.Comment); if (para == null) { return(false); } return(this.ownerID == pro.DestUserID && para.NetDiskID == this.netDiskID); }
void fileController_FileRequestReceived(string fileID, string senderID, string fileName, ulong fileLength, ResumedProjectItem resumedFileItem, string comment) { NDiskParameters paras = Comment4NDisk.Parse(comment); if (paras == null) { return; } if (resumedFileItem != null) { this.fileController.BeginReceiveFile(fileID, resumedFileItem.LocalSavePath); //续传 return; } string rootPath = this.networkDiskPathManager.GetNetworkDiskRootPath(senderID, paras.NetDiskID); this.fileController.BeginReceiveFile(fileID, rootPath + paras.DirectoryPath); }
void fileOutter_FileRequestReceived(string projectID, string senderID, string fileName, ulong totalSize, ResumedProjectItem resumedFileItem, string comment) { NDiskParameters paras = Comment4NDisk.Parse(comment); if (paras == null) { return; } //string savePath = resumedFileItem != null ? resumedFileItem.LocalSavePath : comment; //上述bug,2014.11.04修复 string savePath = resumedFileItem != null ? resumedFileItem.LocalSavePath : paras.DirectoryPath; string fullPath = this.ConstructFullPath(savePath); if (savePath != null && savePath.Length >= 2 && savePath[1] == ':') //表示为含驱动器的绝对路径。 { fullPath = savePath; } this.fileOutter.BeginReceiveFile(projectID, fullPath); }