public CBaseElement(CKey parent, SPosition pos) { _parent = parent; if (_parent != null) { _parent.AddChild(this); } _pos = pos; }
public void SetParent(CKey parent) { if (_parent != null) { _parent.RemoveChild(this); } _parent = parent; if (_parent != null) { _parent.AddChild(this); } }