예제 #1
0
        public StoreInventoryManager Read(DAIIO io)
        {
            xLength          = io.ReadBit2(LengthBits);
            StoreInventories = new StoreInventories(SStructure).Read(io);
            var x = xLength - Length;

            if (x > 0)
            {
                UnknownBitLength = io.ReadBit2(0x18);
                if (UnknownBitLength > 0)
                {
                    UnknownData = io.ReadData(UnknownBitLength);
                }
            }
            return(this);
        }
예제 #2
0
 public bool Write(DAIIO io, bool skiplength = false)
 {
     try
     {
         if (!skiplength)
         {
             io.WriteBits(Length, LengthBits);
         }
         StoreInventories.Write(io);
         if (UnknownBitLength > 0)
         {
             io.WriteBits(UnknownBitLength, 0x18);
             if (UnknownData != null)
             {
                 io.WriteData(UnknownData, UnknownBitLength);
             }
         }
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }