Esempio n. 1
0
        public override Point PortPoint(NodePortDirection direction, string port)
        {
            float W = 0, H = 0;
            int   row_height = 0, ins = 0, outs = 0;

            GetBodySize(ref W, ref H, ref row_height, ref ins, ref outs);

            if (direction == NodePortDirection.Input)
            {
                if (port == "")
                {
                    return(new Point((int)(X - W / 2), (int)(Y - H / 2 + 10 + row_height / 2)));
                }
                else
                {
                    return(new Point((int)m_ports["in:" + port].X, (int)(m_ports["in:" + port].Y + m_ports["in:" + port].Height / 2)));
                }
            }
            else
            {
                if (port == "")
                {
                    return(new Point((int)(X + W / 2), (int)(Y - H / 2 + 10 + row_height / 2)));
                }
                else
                {
                    return(new Point((int)m_ports["out:" + port].Right, (int)(m_ports["out:" + port].Y + m_ports["out:" + port].Height / 2)));
                }
            }
        }
Esempio n. 2
0
 public override Point PortPoint(NodePortDirection direction, string port)
 {
     if (direction == NodePortDirection.Input)
     {
         return(new Point(X - 15, Y));
     }
     else
     {
         return(new Point(X + 15, Y));
     }
 }
Esempio n. 3
0
File: GNode.cs Progetto: Gefix/Ilnet
 public abstract Point PortPoint(NodePortDirection direction, string port);
Esempio n. 4
0
 public override Point PortPoint(NodePortDirection direction, string port)
 {
     return(new Point(X, Y));
 }