Esempio n. 1
0
        public BasicShape AddShape(Point position, int id, int routeId, TemplateDot templateDot)
        {
            BasicShape shape = new BasicShape(templateDot, position, id, routeId);

            this.DiagramView.Children.Add(shape);

            return(shape);
        }
Esempio n. 2
0
        public ShapeConnectorBase AddConnection(BasicShape source, BasicShape target, int id, int routeId)
        {
            ShapeConnectorBase conn = new ShapeConnectorBase();

            conn.SetBinding(ShapeConnectorBase.StartPointProperty, CreateConnectorBinding((IConnectable)target));
            conn.SetBinding(ShapeConnectorBase.EndPointProperty, CreateConnectorBinding((IConnectable)source));
            conn.StartDot = target;
            conn.EndDot   = source;
            conn.SetToolTip();
            conn.ConnectorId = id;
            conn.RouteId     = routeId;

            this.DiagramView.Children.Insert(0, conn);

            return(conn);
        }
Esempio n. 3
0
 public void RemoveShape(BasicShape removingShape)
 {
     this.DiagramView.Children.Remove(removingShape);
 }
Esempio n. 4
0
        public BasicShape AddShape(BasicShape shape)
        {
            this.DiagramView.Children.Add(shape);

            return(shape);
        }