Exemple #1
0
        private void AddDownloadSingle(TransferPacket packet)
        {
            FileInfoBase sourceFileInfo;

            try
            {
                sourceFileInfo = client.CreateFileInfo(packet.SourcePath);
            }
            catch (Exception ex)
            {
                packet.FireFailureEvent(ex.Message);
                return;
            }

            FileInfoBase targetFileInfo = DiskFileSystem.Default.CreateFileInfo(packet.TargetPath);

            ProgressFileItem pfi = queue.Add(sourceFileInfo, targetFileInfo, false, FileExistsAction.Overwrite, 1);

            packet.FileItem = pfi;

            transferPacketList.Add(packet);
        }