public Component.GComponent AddComponent(Component.GComponent comp) { if (!Components.Contains(comp)) { comp.Host = Host; comp.HostContainer = this; Components.Add(comp); comp.OnAdded(); return(null); } return(comp); }
public bool InsertComponent(int index, Component.GComponent comp) { if (!Components.Contains(comp)) { comp.Host = Host; comp.HostContainer = this; Components.Insert(index, comp); comp.OnAdded(); return(true); } else { return(false); } }