public override void Restore(Stream str) { base.Restore(str); if (str.ReadByte() == 0) { // background if (str.ReadBool()) { PaintStyle bg = new PaintStyle(); bg.Restore(str); Background = bg; } else { Background = null; } // other settings IsZoomEnabled = str.ReadBool(); IsScrollEnabled = str.ReadBool(); IsAnimationEnabled = str.ReadBool(); ShowUserLocation = str.ReadBool(); Mode = (WaveMapMode)str.ReadShort(); } }
public void Restore(Stream str) { if (str.ReadByte() == 0) { if (str.ReadByte() == 1) { Font = str.ReadShort(); } else { Font = null; } if (str.ReadByte() == 1) { PaintStyle fg = new PaintStyle(); fg.Restore(str); Foreground = fg; } else { Foreground = null; } if (str.ReadByte() == 1) { PaintStyle fg = new PaintStyle(); fg.Restore(str); Background = fg; } else { Background = null; } if (str.ReadByte() == 1) { SlotIndex = str.ReadShort(); } else { SlotIndex = null; } } }
public void Restore(Stream str) { if (str.ReadByte() == 0) { IsUnpacked = str.ReadBool(); Font = str.ReadShort(); if (str.ReadByte() == 1) { PaintStyle fg = new PaintStyle(); fg.Restore(str); Foreground = fg; } else { Foreground = null; } if (str.ReadByte() == 1) { PaintStyle bg = new PaintStyle(); bg.Restore(str); Background = bg; } else { Background = null; } Crop = (CropStrategy)str.ReadShort(); MarginLeft = str.ReadInteger(); MarginTop = str.ReadInteger(); MarginRight = str.ReadInteger(); MarginBottom = str.ReadInteger(); } }
public override void Restore(Stream str) { base.Restore(str); if (str.ReadByte() == 0) { // background if (str.ReadBool()) { PaintStyle bg = new PaintStyle(); bg.Restore(str); Background = bg; } else { Background = null; } // first focus FirstFocus = str.ReadShort(); // margins MarginLeft = str.ReadInteger(); MarginTop = str.ReadInteger(); MarginRight = str.ReadInteger(); MarginBottom = str.ReadInteger(); // paddings PaddingLeft = str.ReadInteger(); PaddingTop = str.ReadInteger(); PaddingRight = str.ReadInteger(); PaddingBottom = str.ReadInteger(); // other things IsHorizontal = str.ReadBool(); EnforceRadioBehaviour = str.ReadBool(); } }
public override void Restore(Stream str) { base.Restore(str); if (str.ReadByte() == 0) { Font = str.ReadShort(); if (str.ReadByte() == 1) { PaintStyle fg = new PaintStyle(); fg.Restore(str); Foreground = fg; } else { Foreground = null; } BlockSelectionMode = (GridSelectionMode)str.ReadByte(); DefaultSlotDefaultPaletteEntryIndex = str.ReadShort(); MinimumColumnWidthPercent = str.ReadInteger(); MaximumColumnWidthPercent = str.ReadInteger(); AreColumnsHeadersFocusable = str.ReadBool(); AreRowHeadersFocusable = str.ReadBool(); KeepColumnHeadersVisible = str.ReadBool(); KeepRowHeadersVisible = str.ReadBool(); ForceContentsToGridWidth = str.ReadBool(); Spacing = str.ReadShort(); HorizontalScrollIndicationType = (ScrollIndication)str.ReadShort(); VerticalScrollIndicationType = (ScrollIndication)str.ReadShort(); } }
public void Restore(Stream str) { if (str.ReadByte() == 0) { if (str.ReadByte() == 1) { ComponentFont = str.ReadShort(); } else { ComponentFont = null; } if (str.ReadByte() == 1) { PaintStyle fg = new PaintStyle(); fg.Restore(str); ComponentForeground = fg; } else { ComponentForeground = null; } if (str.ReadByte() == 1) { PaintStyle bg = new PaintStyle(); bg.Restore(str); ComponentBackground = bg; } else { ComponentBackground = null; } MarginLeft = str.ReadInteger(); MarginTop = str.ReadInteger(); MarginRight = str.ReadInteger(); MarginBottom = str.ReadInteger(); PaddingLeft = str.ReadInteger(); PaddingTop = str.ReadInteger(); PaddingRight = str.ReadInteger(); PaddingBottom = str.ReadInteger(); int slotInfoCount = str.ReadInteger(); if (slotInfoCount > 0) { for (int i = 0; i < slotInfoCount; i++) { SlotData slot = new SlotData(); slot.Restore(str); SlotInfo.Add(slot); } } LayoutTemplate = CacheHelper.UnpackFromStream(str) as LayoutTemplateBase; } }