/// <summary> /// Unmark edge /// </summary> /// <param name="startNode"></param> /// <param name="endNode"></param> /// <param name="graphLayout"></param> public void UnmarkEdge(City startNode, City endNode, GraphLayoutCity graphLayout) { EdgeCity edge = new EdgeCity( new VertexCity(startNode), new VertexCity(endNode)); graphLayout.Dispatcher.Invoke( new Action(delegate() { graphLayout.RemoveHighlightFromEdge(edge); }), DispatcherPriority.Normal, null); }
/// <summary> /// Highlight an edge /// </summary> /// <param name="startNode"> /// Edge start node /// </param> /// <param name="endNode"> /// Edge end node /// </param> /// <param name="graphLayout"></param> public void MarkEdge(City startNode, City endNode, GraphLayoutCity graphLayout) { // Create an EdgeCity object EdgeCity edge = new EdgeCity( new VertexCity(startNode), new VertexCity(endNode)); // Highligh the edge graphLayout.Dispatcher.Invoke( new Action(delegate() { graphLayout.HighlightEdge(edge, null); }), DispatcherPriority.Normal, null); }
public bool Equals(EdgeCity toCompare) { return((toCompare != null) && (Source.Equals(toCompare.Source)) && (Target.Equals(toCompare.Target))); }