예제 #1
0
        // False path is always the left or right point of the diamond.
        public GraphicElement GetFalsePathFirstShape(IIfBox el)
        {
            GripType[]     path       = GetFalseConnections(el);
            GraphicElement falseStart = null;
            Connection     connection = ((GraphicElement)el).Connections.FirstOrDefault(c => path.Contains(c.ElementConnectionPoint.Type));

            if (connection != null)
            {
                falseStart = ((Connector)connection.ToElement).EndConnectedShape;
            }

            return(falseStart);
        }
예제 #2
0
        protected GripType[] GetTrueConnections(IIfBox el)
        {
            GripType[] path;

            if (el.TruePath == TruePath.Down)
            {
                path = new GripType[] { GripType.BottomMiddle };
            }
            else
            {
                path = new GripType[] { GripType.LeftMiddle, GripType.RightMiddle };
            }

            return(path);
        }