Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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;
            }
        }
Ejemplo n.º 3
0
 public static void AssignLink(FlowGraphPort item, FlowGraphLink link)
 {
     item.AddLink(link);
 }
Ejemplo n.º 4
0
 //Static Methods
 public static void SetPortIndex(FlowGraphPort item, int portIndex)
 {
     item.PortIndex = portIndex;
 }