public object Clone() { PmsPageSplitter layout = new PmsPageSplitter(); layout.Name = Name; layout.AutoSize = AutoSize; layout.BackColor = BackColor; if (null != BackgroundImage) { layout.BackgroundImage = BackgroundImage.Clone() as Image; } layout.BackgroundImageLayout = BackgroundImageLayout; if (null != Border) { layout.Border = Border.Clone() as ElementBorder; layout.Border.OwnerElement = layout; } layout.BorderName = BorderName; if (null != ExternDatas) { layout.ExternDatas = new List <ExternData>(); foreach (ExternData ed in ExternDatas) { object value = ed.Value; if (null != value && value is ICloneable) { value = ((ICloneable)value).Clone(); } layout.ExternDatas.Add(new ExternData(ed.Key, value)); } } if (null != Font) { layout.Font = Font.Clone() as Font; } layout.HasBorder = HasBorder; layout.HasBottomBorder = HasBottomBorder; layout.HasLeftBorder = HasLeftBorder; layout.HasRightBorder = HasRightBorder; layout.HasTopBorder = HasTopBorder; layout.Height = Height; layout.HorizontalScale = HorizontalScale; layout.Location = Location; layout.MESType = MESType; layout.MoveX = MoveX; layout.MoveY = MoveY; layout.Text = Text; layout.VerticalScale = VerticalScale; layout.Width = Width; layout.Visible = Visible; layout.MESType = MESType; layout.EnableSplitter = EnableSplitter; layout.VisibleExpression = VisibleExpression; if (null != ((IElement)this).ExtendObject) { ((IElement)layout).ExtendObject = ((IElement)this).ExtendObject.Clone() as ExtendObject; } return(layout); }
public override object Clone() { PmsPageSplitter layout = new PmsPageSplitter(); layout.BackColor = this.BackColor; layout.Anchor = this.Anchor; layout.Bounds = this.Bounds; layout.BorderName = this.BorderName; if (null != ExternDatas && ExternDatas.Count > 0) { if (null == layout.ExternDatas) { layout.ExternDatas = new List <ExternData>(); } foreach (ExternData ed in this.ExternDatas) { layout.ExternDatas.Add(ed); } } if (null != Border) { layout.Border = Border.Clone() as ElementBorder; layout.Border.OwnerElement = layout; } layout.Font = Font.Clone() as Font; layout.Height = this.Height; layout.Width = this.Width; layout.VerticalScale = this.VerticalScale; layout.HorizontalScale = this.HorizontalScale; layout.Location = this.Location; layout.Left = this.Left; layout.Top = this.Top; layout.Text = this.Text; layout.Region = this.Region; layout.RightToLeft = this.RightToLeft; layout.Size = this.Size; layout.MoveX = this.MoveX; layout.MoveY = this.MoveY; layout.Name = this.Name; layout.Visible = Visible; layout.MESType = MESType; layout.EnableSplitter = EnableSplitter; layout.VisibleExpression = VisibleExpression; if (null != Tag) { if (Tag is ICloneable) { layout.Tag = ((ICloneable)Tag).Clone(); } else { layout.Tag = Tag; } } if (null != ((IElement)this).ExtendObject) { ((IElement)layout).ExtendObject = ((IElement)this).ExtendObject.Clone() as ExtendObject; } return(layout); }