//Make a copy of this object, usefull for making the history, since it is a reference type and can't be used otherwise public Composite Copy() { Composite tmp = new Composite(this.id, this.type); tmp.height = this.height; tmp.width = this.width; tmp.x = this.x; tmp.y = this.y; foreach (Composite c in groupitems) { tmp.Add(c.Copy()); } foreach (Ornament c in ornaments) { tmp.ornaments.Add(c.Copy()); } return(tmp); }
public void Execute() { composite.Add(addition); }