示例#1
0
 public override void Decode()
 {
     Properties = new List <ShapeProperty>();
     for (int index = 0; index + 6 <= Data.Length; index += 6)
     {
         Properties.Add(ShapeProperty.Decode(Data, index));
     }
 }
示例#2
0
        public static ShapeProperty Decode(byte[] data, int index)
        {
            ShapeProperty property = new ShapeProperty();
            UInt16        num      = BitConverter.ToUInt16(data, index);

            property.PropertyID    = (UInt16)(num & 0x3FFF);
            property.IsBlipID      = (num - 0x4000) == num;
            property.IsComplex     = (num - 0x8000) == num;
            property.PropertyValue = BitConverter.ToUInt32(data, index + 2);
            return(property);
        }