Esempio n. 1
0
 public static void SaveFileSystem(EasyPropertiesNode ps, TMFileSystem fileSystem)
 {
     foreach (TMRootFolder rootFolder in fileSystem)
     {
         EasyPropertiesNode node = ps[rootFolder.RootFolderType.ToString()];
         SaveFolder(node, rootFolder);
     }
 }
Esempio n. 2
0
 public static void LoadFileSystem(EasyPropertiesNode pnode, TMFileSystem fileSystem)
 {
     foreach (EasyPropertiesNode node in pnode.GetChildProperties())
     {
         TMRootFolder rootFolder = new TMRootFolder((LURootFolderType)Enum.Parse(typeof(LURootFolderType), node.Name));
         LoadFolders(node, rootFolder);
         LoadFiles(node, rootFolder);
         fileSystem.Add(rootFolder);
     }
 }
Esempio n. 3
0
        public TMFileSystem Clone()
        {
            TMFileSystem fs = new TMFileSystem();

            foreach (TMRootFolder rootFolder in this)
            {
                fs.Add(rootFolder.Clone(null));
            }
            return(fs);
        }
Esempio n. 4
0
        public VersionInfo(Project project, FileInfo file)
        {
            _project    = project;
            _fileSystem = new TMFileSystem();
            EasyProperties ps = new EasyProperties();

            ps.Load(file);

            _number = ps.GetValue <int>("Version", 1);
            _modify.FilesUpdated.AddRange(ps["Update"].GetValue <string[]>("Files", new string[] { }));
            _modify.FilesRemoved.AddRange(ps["Remove"].GetValue <string[]>("Files", new string[] { }));
            _modify.FilesAdded.AddRange(ps["Add"].GetValue <string[]>("Files", new string[] { }));
            _infoHtml = ps["UserInfo"].GetValue("Html", "");
            Project.LoadFileSystem(ps["FileSystem"], _fileSystem);
        }
Esempio n. 5
0
 public VersionInfo(Project project, int version, TMFileSystem fileSystem)
 {
     _project    = project;
     _number     = version;
     _fileSystem = fileSystem;
 }