/// <summary> /// Add a new RectItem and separate with a dotted line in drawing. /// </summary> /// <param name="sender"></param> public void AddElement(RectItem sender) { //if it is a first RectItem then have to create 2 //otherwise just create additional 1 int counter = 0; //foreach (ShapeItem item in this.elementsField) for (int i = this.elementsField.Count - 1; i >= 0; i--) { if (this.elementsField[i] is RectItem) counter++; //if (this.elementsField[i] is LabelShape) // this.elementsField.RemoveAt(i); } if (counter == 0) { this.elementsField.Add(new RectItem(this.materialField)); this.elementsField.Add(new LabelShape()); counter++; } if (this.modelField == "RectItem00") this.elementsField.Add(new VerticalLine()); else this.elementsField.Add(new HorizontalLine()); this.elementsField.Add(sender); this.elementsField.Add(new LabelShape()); counter++; SetSpacing(counter); //AddLabel(counter); }
public void AddVerticalElement(RectItem sender) { throw new NotImplementedException(); }
public void AddHorizontalElement(RectItem sender) { throw new NotImplementedException(); }