Example #1
0
        public StructureDescriptor(PsdReader reader, bool hasVersion)
        {
            if (hasVersion == true)
            {
                this.version = reader.ReadInt32();
            }

            ClassName = reader.ReadString();
            ClassId   = reader.ReadKey();

            Items = new Properties();
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                string key    = reader.ReadKey();
                string osType = reader.ReadType();

                if (key == "EngineData")
                {
                    Items.Add(key.Trim(), new StructureEngineData(reader));
                }
                else
                {
                    StructureItem value = StructureReader.Read(osType, reader);
                    Items.Add(key.Trim(), value);
                }
            }
        }
Example #2
0
        public StructureList(PsdReader reader)
        {
            Items = new List <StructureItem>();
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                string        type  = reader.ReadType();
                StructureItem value = StructureReader.Read(type, reader);
                Items.Add(value);
            }
        }