コード例 #1
0
 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);
 }
コード例 #2
0
 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);
     }
 }