Пример #1
0
        // Modified by K.G for phase2 tasks returned only one link of SkinPackage zip.
        public string CompressNewSkins(string newFolderName)
        {
            var offlineLinks = new OfflineLinks
                                    {
                                        portalLink = SkinManagerHelper.CompressFolder(portalUploadDir.FullName, skinRootDir.FullName, newFolderName, Res.NewPortalSkinPath),
                                        surveyLink = SkinManagerHelper.CompressFolder(surveyUploadDir.FullName, skinRootDir.FullName, newFolderName, Res.NewSurveySkinPath)
                                    };
            string communityzipPath = SkinManagerHelper.CompressFolder(communityUploadDir.FullName, skinRootDir.FullName, newFolderName, Res.NewCommunitySkinPath); //Added by K.G(24-11-2011) TO Support a third zip package called CommunitySkin.zip
            FileInfo[] portalSurveyZipFiles = { new FileInfo(offlineLinks.portalLink), new FileInfo(offlineLinks.surveyLink), new FileInfo(communityzipPath) };

            //Copied upadted Zipfiles to Skin Package.
            foreach (var zipFile in portalSurveyZipFiles)
            {
                if (zipFile.Length > 0)
                {
                    if (File.Exists(Path.Combine(skinPackageUploadDir.ToString(), zipFile.Name)))
                    {
                        File.Delete(Path.Combine(skinPackageUploadDir.ToString(), zipFile.Name));
                    }
                    zipFile.CopyTo(Path.Combine(skinPackageUploadDir.ToString(), zipFile.Name));
                }
            }
            string SkinPackageLink = SkinManagerHelper.CompressFolder(skinPackageUploadDir.FullName, skinRootDir.FullName, Res.SkinPackageToUploadPath, Res.NewSkinPackagePath);
            return SkinPackageLink;
        }
Пример #2
0
 public static OfflineLinks CompressSkinFolder(string skinFolderPath, string newFolderName)
 {
     var offlinLinks = new OfflineLinks
                                    {
                                        portalLink = CompressPortalSkinFolder(skinFolderPath, newFolderName),
                                        surveyLink = CompressSurveySkinFolder(skinFolderPath, newFolderName)
                                    };
     return offlinLinks;
 }
Пример #3
0
 public OfflineLinks CompressNewSkins(string newFolderName)
 {
     var offlineLinks = new OfflineLinks
                             {
                                 portalLink = SkinManagerHelper.CompressFolder(portalUploadDir.FullName, skinRootDir.FullName, newFolderName, Res.NewPortalSkinPath),
                                 surveyLink = SkinManagerHelper.CompressFolder(surveyUploadDir.FullName, skinRootDir.FullName, newFolderName, Res.NewSurveySkinPath)
                             };
     return offlineLinks;
 }