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); }
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); }
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); } } }