Пример #1
0
        public override ArcFile TryOpen(ArcView file)
        {
            int version = file.View.ReadByte(4) * 10 + file.View.ReadByte(5) - '0' * 11;

            if (file.View.ReadByte(6) != 0 || version < 10 || version > 12)
            {
                return(null);
            }
            using (var reader = new AbmpReader(file, version))
            {
                var dir = reader.ReadIndex();
                if (null == dir || 0 == dir.Count)
                {
                    return(null);
                }
                return(new ArcFile(file, this, dir));
            }
        }