예제 #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);
        }
예제 #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);
        }
예제 #3
0
 public void RemoveShape(BasicShape removingShape)
 {
     this.DiagramView.Children.Remove(removingShape);
 }
예제 #4
0
        public BasicShape AddShape(BasicShape shape)
        {
            this.DiagramView.Children.Add(shape);

            return(shape);
        }