Sha256: 5b4b562bdc4e97e7c9ffc43fbccfa8dbabb083f77226a9be7d8fc5ff9f5094b9
Contents?: true
Size: 1.96 KB
Versions: 23
Compression:
Stored size: 1.96 KB
Contents
using System; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Ink; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; namespace rho.common { public sealed class CRhoResourceMap { private static CRhodesApp RHODESAPP() { return CRhodesApp.Instance; } private static void clearMap(String strMap) { string[] files = strMap.Split('\n'); for (int i = 0; i < files.Length - 1; i++) { String[] values = files[i].Split('|'); String strFile = RHODESAPP().canonicalizeRhoPath(values[0]); if (CRhoFile.isFileExist(strFile)) { CRhoFile.deleteFile(strFile); } } } private static void copyMap(String strMap) { string[] files = strMap.Split('\n'); for (int i = 0; i < files.Length - 1; i++) { String[] values = files[i].Split('|'); String strFile = RHODESAPP().canonicalizeRhoPath(values[0]); CRhoFile.recursiveCreateDir(strFile); CRhoFile.writeDataToFile(strFile, CRhoFile.readResourceFile(strFile)); } CRhoFile.writeStringToFile(RHODESAPP().canonicalizeRhoPath("RhoBundleMap.txt"), strMap); } public static void deployContent() { String newMap = CRhoFile.readStringFromResourceFile(RHODESAPP().canonicalizeRhoPath("RhoBundleMap.txt")); String curMap = CRhoFile.readStringFromFile(RHODESAPP().canonicalizeRhoPath("RhoBundleMap.txt")); if (curMap == "") { copyMap(newMap); } else if (curMap != newMap) { clearMap(curMap); copyMap(newMap); } } } }
Version data entries
23 entries across 23 versions & 1 rubygems