///<summary> /// Apply the current settings to the graph. ///</summary> private async Task ApplyConfigurations() { IGraph graph = graphControl.Graph; // Get the root node of the tree. var graphAdapter = new YGraphAdapter(graph); INode root = graphAdapter.GetOriginalNode(Trees.GetRoot(graphAdapter.YGraph)); // apply the current setting to all nodes of the same layer. ApplySettingsRecursively(graph, root, 0); await ApplyLayout(); }
/// <summary> /// Update the node placer configurations in the <see cref="NodePlacerPanel"/> /// </summary> /// <returns></returns> public void UpdatePlacerList() { IGraph graph = graphControl.Graph; // Determine the root node of the tree: var graphAdapter = new YGraphAdapter(graph); INode root = graphAdapter.GetOriginalNode(Trees.GetRoot(graphAdapter.YGraph)); nodePlacerPanel.NodePlacers.Clear(); // Fill the Array recursively UpdatePlacerListRecursively(graph, placers, nodePlacerPanel.NodePlacers, root, 0); }