public override void Restore(Stream str) { base.Restore(str); if (str.ReadByte() == 0) { IsUnpacked = str.ReadBool(); SecondaryEntryType = (PaletteEntryType)str.ReadShort(); int numberOfItems = str.ReadInteger(); if (numberOfItems > 0) { for (int i = 0; i < numberOfItems; i++) { BlockState state = (BlockState)str.ReadShort(); SlotStyleData ssd = new SlotStyleData(); ssd.Restore(str); Data.Add(state, ssd); } } } }
public void Restore(Stream str) { if (str.ReadByte() == 0) { SlotStyle = new SlotStyleData(); SlotStyle.Restore(str); SlotIndex = str.ReadInteger(); MarginLeft = str.ReadInteger(); MarginTop = str.ReadInteger(); MarginRight = str.ReadInteger(); MarginBottom = str.ReadInteger(); PaddingLeft = str.ReadInteger(); PaddingTop = str.ReadInteger(); PaddingRight = str.ReadInteger(); PaddingBottom = str.ReadInteger(); MaximumChars = str.ReadShort(); MaximumLines = str.ReadShort(); MinimumLines = str.ReadShort(); } }