private void UdpateRootCategoryVisibility(TreeNode node, DefaultableSettings settings, int nodeIndex) { if (settings.GetRuntimeValue("Visible")) { if (!TreeView1.Nodes.Contains(node)) TreeView1.Nodes.Insert(nodeIndex, node); } else { if (TreeView1.Nodes.Contains(node)) TreeView1.Nodes.Remove(node); } }
private void UdpateRootCategoryExpandedState(TreeNode node, DefaultableSettings settings) { if (settings.Expanded && node.IsExpanded == false) node.Expand(); if (!settings.Expanded && node.IsExpanded == true) node.Collapse(); }