Esempio n. 1
0
        public IPlugin CreateUsing(PluginParameter args)
        {
            var file = new DaxEclFile(args.Filename);

            Viewer = new EclFileViewer(file);
            return(this);
        }
Esempio n. 2
0
        // scan the ecl files in the current directory for references to this map, return the filename and block id of the first reference
        private void scanECLFilesForMap(string file, int geoID)
        {
            var filename = Path.GetFileNameWithoutExtension(file);
            var path = Path.GetDirectoryName(file);
            var diskNumber = filename.Substring(3, 1);
            var eclFileName = "ECL" + diskNumber + ".DAX";
            _daxEclFile = new DaxEcl.DaxEclFile(path + "\\" + eclFileName);
           // _daxWallDefFiles.Add(new DaxWallDefFile(path + "\\WALLDEF" + diskNumber + ".DAX"));
            foreach (var block in _daxEclFile.Blocks)
            {
                // scan for the load file geo command, which consists of the pattern 0x21 a 0x00 where a is the geo id to load
                // todo: since we can decode the ecl's pretty well now, maybe use that instead?
                byte load_file = 0x21;
                for (int i = 0; i < block.Data.Length-4; i++)
                {
                    if (block.Data[i] == load_file && block.Data[i + 1] == 0 && block.Data[i + 3] == 0)
                    {
                        int a = block.Data[i + 2];
                        if (geoID == a) 
                        {
                            referencedByEcl.Add(block.Id);
                            scanECLFileForWallset(block, geoID, block.Id);
                        }
                    }
                }
            }
            

        }
Esempio n. 3
0
        static public DaxEclFile GetEclFile(string filename)
        {
            DaxEclFile fc;

            if (filesCache.TryGetValue(filename, out fc))
            {
                return(fc);
            }
            fc = new DaxEclFile(filename);
            filesCache.Add(filename, fc);
            return(fc);
        }
 public EclStringViewer(DaxEclFile file)
 {
     _file = file;
 }
Esempio n. 5
0
 public EclFileViewer(DaxEclFile file)
 {
     _file = file;
 }
Esempio n. 6
0
 public EclFileViewer(DaxEclFile file)
 {
     _file = file;
 }
Esempio n. 7
0
 public IPlugin CreateUsing(PluginParameter args)
 {
     var file = new DaxEclFile(args.Filename);
     Viewer = new EclFileViewer(file);
     return this;
 }
Esempio n. 8
0
 public EclStringViewer(DaxEclFile file)
 {
     _file = file;
 }