public Rectangle TranslatePortGrip(FlowGraphPort port) { Rectangle portGripTranslate = new Rectangle((int)port.PortGripBounds.X, (int)port.PortGripBounds.Y, (int)port.PortGripBounds.Size.Width, (int)port.PortGripBounds.Size.Height); portGripTranslate.Offset(m_nodeLocation.X, m_nodeLocation.Y); return(portGripTranslate); }
public void RegisterLink(FlowGraphPort port, FlowGraphLink link) { FlowGraphPort.AssignLink(port, link); switch (port.Type) { case FlowGraphPort.PortType.InPort: { Rectangle portBounds = this.TranslatePortGrip(port); link.LinkEnd = new Point((portBounds.Left + (portBounds.Width / 2)), (portBounds.Top + (portBounds.Height / 2))); } break; case FlowGraphPort.PortType.OutPort: { Rectangle portBounds = this.TranslatePortGrip(port); link.LinkStart = new Point((portBounds.Left + (portBounds.Width / 2)), (portBounds.Top + (portBounds.Height / 2))); } break; } }
public static void AssignLink(FlowGraphPort item, FlowGraphLink link) { item.AddLink(link); }
//Static Methods public static void SetPortIndex(FlowGraphPort item, int portIndex) { item.PortIndex = portIndex; }