33 lines
541 B
C#
33 lines
541 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace org.budnhead
|
|
{
|
|
public class Container : Control
|
|
{
|
|
private List<Control> children;
|
|
|
|
public Container()
|
|
{
|
|
this.children = new List<Control>();
|
|
}
|
|
|
|
public void addChild(Control control){
|
|
if (control.parent != null){
|
|
control.parent.removeChild(control);
|
|
}
|
|
this.children.Add(control);
|
|
}
|
|
public void removeChild(Control control){
|
|
this.children.Remove(control);
|
|
}
|
|
public Control[] Children {
|
|
get { return this.children.ToArray(); }
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|