public void AddChild(Widget entity, bool isText) { if (entity == null || childrens.Contains(entity)) { return; } if (isText) { ((Text)entity).Font = Font; } childrens.Add(entity); countchildren++; }
public void RemoveChild(Widget entity) { countchildren--; if (entity == null) { return; } if (childrens.Contains(entity)) { childrens.Remove(entity); entity.HasParent = false; } }
public void AddChild(Widget entity) { AddChild(entity, false); }