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

            Viewer = new EclFileViewer(file);
            return(this);
        }
Ejemplo 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);
                        }
                    }
                }
            }
            

        }
Ejemplo 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);
        }
Ejemplo n.º 4
0
 public EclStringViewer(DaxEclFile file)
 {
     _file = file;
 }
Ejemplo n.º 5
0
 public EclFileViewer(DaxEclFile file)
 {
     _file = file;
 }
Ejemplo n.º 6
0
 public EclFileViewer(DaxEclFile file)
 {
     _file = file;
 }
Ejemplo n.º 7
0
 public IPlugin CreateUsing(PluginParameter args)
 {
     var file = new DaxEclFile(args.Filename);
     Viewer = new EclFileViewer(file);
     return this;
 }
Ejemplo n.º 8
0
 public EclStringViewer(DaxEclFile file)
 {
     _file = file;
 }