Example #1
0
        internal void HandleCollapsing(SharpTreeNode Node)
        {
            var selectedChilds = Node.Descendants().Where(n => SharpTreeNode.SelectedNodes.Contains(n));

            if (selectedChilds.Any())
            {
                var list = SelectedItems.Cast <SharpTreeNode>().Except(selectedChilds).ToList();
                list.AddOnce(Node);
                SetSelectedItems(list);
            }
        }
Example #2
0
 internal void HandleCollapsing(SharpTreeNode Node)
 {
     var selectedChilds = Node.Descendants().Where(n => SharpTreeNode.SelectedNodes.Contains(n));
     if (selectedChilds.Any()) {
         var list = SelectedItems.Cast<SharpTreeNode>().Except(selectedChilds).ToList();
         list.AddOnce(Node);
         SetSelectedItems(list);
     }
 }