// 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); }
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); }