public bool InsertChild(idWindow window, idWindow before)
{
if(this.Disposed == true)
{
throw new ObjectDisposedException(this.GetType().Name);
}
AddChild(window);
window.Parent = this;
DrawWindow drawWindow = new DrawWindow(window);
// if not inserting before anything then just add it at the end
if(before != null)
{
int index = GetChildIndex(before);
if(index != -1)
{
_drawWindows.Insert(index, drawWindow);
return true;
}
}
_drawWindows.Add(drawWindow);
return true;
}