Ejemplo n.º 1
0
        ///<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();
        }
Ejemplo n.º 2
0
        /// <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);
        }