public Pagel(Pagel parent, XRect percetileRectangle) { parent.AddChild(this); this.minPoint = new XPoint(parent.Rectangle.X * percetileRectangle.X, parent.Rectangle.Y * percetileRectangle.Y); this.maxPoint = minPoint + new XPoint(parent.Rectangle.Width * percetileRectangle.Width, parent.Rectangle.Height * percetileRectangle.Height); this.Rectangle = new XRect(minPoint, maxPoint); }
public virtual void AddChild(Pagel pagel) { pagel.Parent = this; children.Add(pagel); }