public Connection AttachConnection(NetronGraphvizLayouter layout, IEdge e) { if (e == null) { throw new ArgumentNullException("e"); } if (!this.VisitedGraph.ContainsEdge(e)) { throw new ArgumentException("edge already in graph"); } if (this.EdgeConnections.Contains(e)) { throw new ArgumentException("connection already associtated with this edge"); } // create edge Connection conn = this.ConnectionProvider.ProvideConnection(e); // set points layout.PositionConnection(e, conn); Connect(e, conn); // connect to target Modify m = new Modify(); m.AddInsertConnection(conn, conn.From, conn.To, this.Panel.AbstractShape); this.Panel.AbstractShape.History.Do(m); return(conn); }
public Connection AttachConnection(NetronGraphvizLayouter layout,IEdge e) { if (e==null) throw new ArgumentNullException("e"); if (!this.VisitedGraph.ContainsEdge(e)) throw new ArgumentException("edge already in graph"); if (this.EdgeConnections.Contains(e)) throw new ArgumentException("connection already associtated with this edge"); // create edge Connection conn = this.ConnectionProvider.ProvideConnection(e); // set points layout.PositionConnection(e,conn); Connect(e,conn); // connect to target Modify m = new Modify(); m.AddInsertConnection(conn, conn.From, conn.To,this.Panel.AbstractShape); this.Panel.AbstractShape.History.Do(m); return conn; }