private List <DirectedEdge> FindPath(List <ReachablePoint> prePointList, ReachablePoint endPoint) { List <DirectedEdge> edgeList = new List <DirectedEdge>(); var curPoint = endPoint; while (prePointList[curPoint.Index] != null) { var prePoint = prePointList[curPoint.Index]; var directedEdge = m_edgeList.SingleOrDefault(o => o.StartPoint == prePoint && o.EndPoint == curPoint); edgeList.Add(directedEdge); curPoint = prePoint; } edgeList.Reverse(); return(edgeList); }
public static void SetCurPosition(DependencyObject obj, ReachablePoint value) { obj.SetValue(CurPositionProperty, value); }