public virtual void DoLinking(PointF dc) { if (this.EndPort != null) { Shapes.DiagramShape obj1 = this.EndPort.DiagramShape; if (obj1 != null) { RectangleF ef1; Shapes.IDiagramPort port1 = this.PickNearestPort(dc); GoTemporaryPort port2 = obj1 as GoTemporaryPort; if (port2 != null) { port2.Target = port1 as Shapes.DiagramPort; } if ((port1 != null) && (port1.DiagramShape != null)) { ef1 = port1.DiagramShape.Bounds; } else { ef1 = new RectangleF(dc.X, dc.Y, 0f, 0f); } obj1.Bounds = ef1; } } }
protected virtual Shapes.IDiagramPort CreateTemporaryPort(Shapes.IDiagramPort port, PointF pnt, bool forToPort, bool atEnd) { GoTemporaryPort port1 = new GoTemporaryPort(); port1.Target = port as Shapes.DiagramPort; if ((port != null) && (port.DiagramShape != null)) { port1.Size = port.DiagramShape.Size; } port1.Center = pnt; port1.Style = Shapes.DiagramPortStyle.None; base.View.Layers.Default.Add(port1); return port1; }
protected virtual Shapes.IDiagramPort CreateTemporaryPort(Shapes.IDiagramPort port, PointF pnt, bool forToPort, bool atEnd) { GoTemporaryPort port1 = new GoTemporaryPort(); port1.Target = port as Shapes.DiagramPort; if ((port != null) && (port.DiagramShape != null)) { port1.Size = port.DiagramShape.Size; } port1.Center = pnt; port1.Style = Shapes.DiagramPortStyle.None; base.View.Layers.Default.Add(port1); return(port1); }