protected ExpandoSurrogate(SerializationInfo info, StreamingContext context) : base() { int version = info.GetInt32("Version"); this.Name = info.GetString("Name"); this.Text = info.GetString("Text"); this.Size = (Size) info.GetValue("Size", typeof(Size)); this.Location = (Point) info.GetValue("Location", typeof(Point)); this.BackColor = info.GetString("BackColor"); this.ExpandedHeight = info.GetInt32("ExpandedHeight"); this.CustomSettings = (ExpandoInfo.ExpandoInfoSurrogate) info.GetValue("CustomSettings", typeof(ExpandoInfo.ExpandoInfoSurrogate)); this.CustomHeaderSettings = (HeaderInfo.HeaderInfoSurrogate) info.GetValue("CustomHeaderSettings", typeof(HeaderInfo.HeaderInfoSurrogate)); this.Animate = info.GetBoolean("Animate"); this.ShowFocusCues = info.GetBoolean("ShowFocusCues"); this.Collapsed = info.GetBoolean("Collapsed"); this.CanCollapse = info.GetBoolean("CanCollapse"); this.SpecialGroup = info.GetBoolean("SpecialGroup"); this.TitleImage = (byte[]) info.GetValue("TitleImage", typeof(byte[])); this.Watermark = (byte[]) info.GetValue("Watermark", typeof(byte[])); this.Enabled = info.GetBoolean("Enabled"); this.Visible = info.GetBoolean("Visible"); this.AutoLayout = info.GetBoolean("AutoLayout"); this.Anchor = (AnchorStyles) info.GetValue("Anchor", typeof(AnchorStyles)); this.Dock = (DockStyle) info.GetValue("Dock", typeof(DockStyle)); this.FontName = info.GetString("FontName"); this.FontSize = info.GetSingle("FontSize"); this.FontDecoration = (FontStyle) info.GetValue("FontDecoration", typeof(FontStyle)); this.Tag = (byte[]) info.GetValue("Tag", typeof(byte[])); }
public void Load(Expando expando) { this.Name = expando.Name; this.Text = expando.Text; this.Size = expando.Size; this.Location = expando.Location; this.BackColor = ThemeManager.ConvertColorToString(expando.BackColor); this.ExpandedHeight = expando.ExpandedHeight; this.CustomSettings = new ExpandoInfo.ExpandoInfoSurrogate(); this.CustomSettings.Load(expando.CustomSettings); this.CustomHeaderSettings = new HeaderInfo.HeaderInfoSurrogate(); this.CustomHeaderSettings.Load(expando.CustomHeaderSettings); this.Animate = expando.Animate; this.ShowFocusCues = expando.ShowFocusCues; this.Collapsed = expando.Collapsed; this.CanCollapse = expando.CanCollapse; this.SpecialGroup = expando.SpecialGroup; this.TitleImage = ThemeManager.ConvertImageToByteArray(expando.TitleImage); this.Watermark = ThemeManager.ConvertImageToByteArray(expando.Watermark); this.Enabled = expando.Enabled; this.Visible = expando.Visible; this.AutoLayout = expando.AutoLayout; this.Anchor = expando.Anchor; this.Dock = expando.Dock; this.FontName = expando.Font.FontFamily.Name; this.FontSize = expando.Font.SizeInPoints; this.FontDecoration = expando.Font.Style; this.Tag = ThemeManager.ConvertObjectToByteArray(expando.Tag); }
public ExpandoSurrogate() { this.Name = null; this.Text = null; this.Size = Size.Empty; this.Location = Point.Empty; this.BackColor = ThemeManager.ConvertColorToString(SystemColors.Control); this.ExpandedHeight = -1; this.CustomSettings = null; this.CustomHeaderSettings = null; this.Animate = false; this.ShowFocusCues = false; this.Collapsed = false; this.CanCollapse = true; this.SpecialGroup = false; this.TitleImage = new byte[0]; this.Watermark = new byte[0]; this.Enabled = true; this.Visible = true; this.AutoLayout = false; this.Anchor = AnchorStyles.None; this.Dock = DockStyle.None; this.FontName = "Tahoma"; this.FontSize = 8.25f; this.FontDecoration = FontStyle.Regular; this.Tag = new byte[0]; }