Пример #1
0
 public void Add(PropertyIDs propertyID, UInt32 propertyValue)
 {
     ShapeProperty prop = new ShapeProperty();
     prop.PropertyID = propertyID;
     prop.PropertyValue = propertyValue;
     prop.IsBlipID = propertyID == PropertyIDs.BlipId;
     Properties.Add(prop);
 }
Пример #2
0
        public void Add(PropertyIDs propertyID, UInt32 propertyValue)
        {
            ShapeProperty prop = new ShapeProperty();

            prop.PropertyID    = propertyID;
            prop.PropertyValue = propertyValue;
            prop.IsBlipID      = propertyID == PropertyIDs.BlipId;
            Properties.Add(prop);
        }
Пример #3
0
 public static ShapeProperty Decode(BinaryReader reader)
 {
     ShapeProperty property = new ShapeProperty();
     UInt16 num = reader.ReadUInt16();
     property.PropertyID = (PropertyIDs)(num & 0x3FFF);
     property.IsBlipID = (num & 0x4000) == 0x4000;
     property.IsComplex = (num & 0x8000) == 0x8000;
     property.PropertyValue = reader.ReadUInt32();
     return property;
 }
Пример #4
0
        public static ShapeProperty Decode(BinaryReader reader)
        {
            ShapeProperty property = new ShapeProperty();
            UInt16        num      = reader.ReadUInt16();

            property.PropertyID    = (PropertyIDs)(num & 0x3FFF);
            property.IsBlipID      = (num & 0x4000) == 0x4000;
            property.IsComplex     = (num & 0x8000) == 0x8000;
            property.PropertyValue = reader.ReadUInt32();
            return(property);
        }
Пример #5
0
        public override void Decode()
        {
            MemoryStream stream = new MemoryStream(Data);
            BinaryReader reader = new BinaryReader(stream);

            Properties.Clear();
            for (int index = 0; index < this.Instance; index++)
            {
                Properties.Add(ShapeProperty.Decode(reader));
            }

            foreach (ShapeProperty property in Properties)
            {
                if (property.IsComplex)
                {
                    int size = (int)property.PropertyValue;
                    property.ComplexData = reader.ReadBytes(size);
                }
            }
        }