/// <summary> /// Копировать объект. /// </summary> public SchemeDocument Copy() { SchemeDocument schemeDoc = new SchemeDocument(); CopyTo(schemeDoc); return(schemeDoc); }
/// <summary> /// Конструктор /// </summary> public BaseComponent() { schemeDoc = null; serBinder = null; ID = 0; Name = ""; Location = Point.Default; Size = Size.Default; ZIndex = 0; }
/// <summary> /// Конструктор /// </summary> public BaseComponent() { schemeDoc = null; serBinder = null; BackColor = ""; BorderColor = ""; BorderWidth = 0; ToolTip = ""; ID = 0; Name = ""; Location = Point.Default; Size = Size.Default; ZIndex = 0; }
/// <summary> /// Копировать свойства объекта в заданный объект /// </summary> public void CopyTo(SchemeDocument schemeDoc) { if (schemeDoc == null) { throw new ArgumentNullException("schemeDoc"); } schemeDoc.Size = Size; schemeDoc.BackColor = BackColor; schemeDoc.BackImageName = BackImageName; schemeDoc.Font = Font.Clone(); schemeDoc.ForeColor = ForeColor; schemeDoc.Title = Title; schemeDoc.CnlFilter.Clear(); schemeDoc.CnlFilter.AddRange(CnlFilter); }