public void Refresh(ITreeAlgorithms <TNode> algorithm = null) { graphForm.SafeInvoke(d => { var g = d.ViewModel.Graph; g.StartChanges(); g.Clear(); g.IsDirected = true; ConstructTreeGraph(algorithm); g.EndChanges(); }); }
public void Refresh(IDictionary <TVertex, VertexColor> colors = null) { graphForm.SafeInvoke(d => { var g = d.ViewModel.Graph; var attributesTemp = g.Attributes.ToArray(); g.StartChanges(); g.Clear(); foreach (var attr in attributesTemp) { g.Attributes.Add(attr); } g.IsDirected = graph.IsDirected; foreach (TEdge edge in graph.Edges) { AddNewGraphEdge(edge, colors); } g.EndChanges(); }); }