Beispiel #1
0
        /// <summary>
        /// Adds the funclet link.
        /// </summary>
        /// <param name="subParent">The sub parent.</param>
        /// <param name="parentPort">The parent port.</param>
        /// <param name="subChild">The sub child.</param>
        /// <param name="childPort">The child port.</param>
        /// <param name="linetype">The linetype.</param>
        private void AddFuncletLink(Funclet subParent, long parentPort, Funclet subChild, long childPort,
            ConnectionType linetype)
        {
            if ((subParent == null) || (subChild == null))
            {
                return;
            }

            int nPoints = (linetype == ConnectionType.StraightLine) ? 2 : 3;

            Port pPort = subParent.GetPort(parentPort);
            Port cPort = subChild.GetPort(childPort);
            // lstFuncsLink.Add(new LinkDot(GetPointArray(nPoints, pPort, cPort), penLinks, false));

            if (subParent is Function)
            {
                Function graphConcatTmp = (Function)subParent;

                if (graphConcatTmp != null)
                {
                    for (int i = 0; i < graphConcatTmp.InputFunclets.Count; i++)
                    {
                        AddFuncletLink(graphConcatTmp.InputFunclets[i], 0, subParent, i + 1, ConnectionType.Polyline);
                    }
                }
            }

            if (subParent.InputFunclets.Count == 1)
            {
                AddFuncletLink(subParent.InputFunclets[0], 0, subParent, 0, ConnectionType.Polyline);
            }
        }