Esempio n. 1
0
 // ------------------------------------------------------------------
 /// <summary>
 /// Adds a shape to the diagram
 /// </summary>
 /// <param name="shape">IShape: The shape to add.</param>
 /// <returns>IShape: The added shape.</returns>
 // ------------------------------------------------------------------
 public IShape AddShape(IShape shape)
 {
     SetModel(shape);
     // By default the new shape is added to the default layer in the
     // current page.
     CurrentPage.DefaultLayer.Entities.Add(shape);
     shape.Attached(CurrentPage.DefaultLayer);
     shape.ShowConnectors = this.mShowConnectors;
     return(shape);
 }
Esempio n. 2
0
    // ------------------------------------------------------------------
    /// <summary>
    /// Adds a shape to the diagram
    /// </summary>
    /// <param name="shape">IShape: The shape to add.</param>
    /// <returns>IShape: The added shape.</returns>
    // ------------------------------------------------------------------
    public IShape AddShape(IShape shape) {

      SetModel(shape);
      // By default the new shape is added to the default layer in the 
      // current page.
      CurrentPage.DefaultLayer.Entities.Add(shape);
      shape.Attached(CurrentPage.DefaultLayer);
      shape.ShowConnectors = this.mShowConnectors;
      return shape;

    }