protected virtual void FillTreeViewNode() { var expandedNodesState = TreeViewNode.GetExpandedNodesState(); Nodes.FillTreeViewNode(TreeViewNode); TreeViewNode.RestoreExpandedNodesState(expandedNodesState); }
private void FillTreeViewNode(string?originalSelectedNodeFullNamePath, bool firstTime) { ThreadHelper.ThrowIfNotOnUIThread(); var expandedNodesState = firstTime ? new HashSet <string>() : TreeViewNode.GetExpandedNodesState(); Nodes.FillTreeViewNode(TreeViewNode); var selectedNode = TreeViewNode.TreeView.SelectedNode; if (originalSelectedNodeFullNamePath != selectedNode?.GetFullNamePath()) { var node = TreeViewNode.GetNodeFromPath(originalSelectedNodeFullNamePath); if (node is not null) { TreeViewNode.TreeView.SelectedNode = !(node.Tag is BaseBranchNode branchNode) || branchNode.Visible ? node : null; } } PostFillTreeViewNode(firstTime); TreeViewNode.RestoreExpandedNodesState(expandedNodesState); }
private void FillTreeViewNode(bool firstTime) { ThreadHelper.ThrowIfNotOnUIThread(); var expandedNodesState = firstTime ? new HashSet <string>() : TreeViewNode.GetExpandedNodesState(); Nodes.FillTreeViewNode(TreeViewNode); PostFillTreeViewNode(firstTime); TreeViewNode.RestoreExpandedNodesState(expandedNodesState); }
private void FillTreeViewNode() { ThreadHelper.ThrowIfNotOnUIThread(); bool firstTime = TreeViewNode.Nodes.Count == 0; var expandedNodesState = TreeViewNode.GetExpandedNodesState(); Nodes.FillTreeViewNode(TreeViewNode); PostFillTreeViewNode(firstTime); TreeViewNode.RestoreExpandedNodesState(expandedNodesState); }