Exemplo n.º 1
0
        public void Load(string rootPath, string moduleName)
        {
            if (!Directory.Exists(rootPath))
            {
                return;
            }
            _rm        = new ResourceManager();
            moduleName = Path.GetExtension(moduleName) != ErfFile.ModExt
                ? moduleName + ErfFile.ModExt
                : moduleName;

            _diRoot     = new DirectoryInfo(rootPath);
            _diModules  = new DirectoryInfo(_diRoot.FullName + ModuleDir);
            _diOverride = new DirectoryInfo(_diRoot.FullName + OverrideDir);
            _diHak      = new DirectoryInfo(_diRoot.FullName + HakDir);

            _rm.Add(Directory.GetFiles(_diRoot.FullName, "*" + KeyFile.Ext));
            _rm.Add(_diOverride.FullName);

            _mod     = new ErfFile(_diModules.FullName + "/" + moduleName);
            _modInfo = new GffDocument(_mod[FileInfoName].DataStream);
            _rm.Add(HakList);

            _rm.Add(_diModules.FullName + "/" + moduleName);
        }
Exemplo n.º 2
0
        private void DemodFile(FileInfo fi)
        {
            var sname = fi.Name.Remove(fi.Name.Length - 4);
            var xdoc  = new GffXmlDocument(fi.FullName);
            var gdoc  = new GffDocument();

            gdoc.Save(xdoc.RootStruct, Path.Combine(_tempDirName, sname));
        }
Exemplo n.º 3
0
        private void ModelFile(FileInfo fi)
        {
            var path = _xmlDirName + "/" + fi.Name + XmlExt;
            var gdoc = new GffDocument(fi.FullName);
            var xdoc = new GffXmlDocument();

            xdoc.Save(gdoc.RootStruct, path);
        }
Exemplo n.º 4
0
 private NtAreaTransition(GffDocument gffDoc) : base(gffDoc.RootStruct)
 {
     GffDoc = gffDoc;
 }
Exemplo n.º 5
0
 /// <summary>
 ///     Permet de créer une aire.
 /// </summary>
 /// <param name="list">L'ordre des paramètres est {.git, .gic, .are}.</param>
 public NArea(params GffDocument[] list)
 {
     GdGit  = list[0];
     GdGic  = list[1];
     _gdAre = list[2];
 }