//seeks complex rectangle and extracts all simple rectangles
 private void ExtractRectangles(Taio.Rectangle rectangle)
 {
     if (rectangle.ContainedRectangles.Count == 0)
     {
         Taio.Rectangle rec = new Taio.Rectangle(rectangle.SideA, rectangle.SideB, rectangle.LeftTop);
         rec.Number = rectangle.Number;
         extractedRectangles.Add(rec);
     }
     else
         for (int i = 0; i < rectangle.ContainedRectangles.Count; ++i)
             ExtractRectangles(rectangle.ContainedRectangles[i]);
 }
 //ustawia ustawienia kontrolki na domyslne
 public void Clear()
 {
     this.rectangle = null;
     this.realValue = new DoublePoint();
     this.canDraw = true;
     this.xTextBox.Enabled = true;
     this.yTextBox.Enabled = true;
     this.Refresh();
 }