Пример #1
0
        private void UploadPreviewDirectoryProduct()
        {
            TransferPacket transferPacket = new TransferPacket(production, TransferType.UploadProductPreviewDirectory);

            transferPacket.SuccessEvent += OnFilmUploadSuccess;
            transferPacket.FailureEvent += OnFilmUploadFailure;

            transferManager = new TransferManager();
            transferManager.Transfer(transferPacket);

            if (production.IsPreview)
            {
                string sourcePath      = ProductionPathHelper.GetLocalProductPreviewProductionDirectory(production);
                string destinationPath = ProductionPathHelper.GetProductDirectory(production.JobList[0].ProductID);
                foreach (string newPath in Directory.GetFiles(sourcePath))
                {
                    File.Copy(newPath, newPath.Replace(sourcePath, destinationPath), true);
                }
            }
        }