示例#1
0
        protected override void Unserialize(System.IO.BinaryReader reader)
        {
            uint id = reader.ReadUInt32();

            if (id != 0x00000001)
            {
                throw new Exception("File is not Recognized by the Family Ties Wrapper!");
            }
            int count = reader.ReadInt32();

            sims = new ArrayList(count);

            for (int i = 0; i < count; i++)
            {
                ushort          instance = reader.ReadUInt16();
                int             blockdel = reader.ReadInt32();
                FamilyTieItem[] items    = new FamilyTieItem[reader.ReadInt32()];
                for (int k = 0; k < items.Length; k++)
                {
                    MetaData.FamilyTieTypes type = (MetaData.FamilyTieTypes)reader.ReadUInt32();
                    ushort tinstance             = reader.ReadUInt16();
                    items[k] = new FamilyTieItem(type, tinstance, this);
                }
                FamilyTieSim simtie = new FamilyTieSim(instance, items, this);
                simtie.BlockDelimiter = blockdel;
                sims.Add(simtie);
            }
        }
示例#2
0
 /// <summary>
 /// Creates a new FamilyTie
 /// </summary>
 /// <param name="type">The Type of the tie</param>
 /// <param name="siminstance">The instance of the Target sim</param>
 /// <param name="famt">The Parent Wrapper</param>
 public FamilyTieItem(MetaData.FamilyTieTypes type, ushort siminstance, Wrapper.FamilyTies famt) : base(siminstance, famt)
 {
     this.type = type;
 }
示例#3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="data">The Value of the Enum</param>
 public LocalizedFamilyTieTypes(MetaData.FamilyTieTypes data)
 {
     this.data = data;
 }