Esempio n. 1
0
    static private void RefreshIsSubSelected(FileSystemNode node)
    {
        FolderNode folder = node as FolderNode;

        if (node == null)
        {
            return;
        }

        node.IsSubSelected = folder.Children.Where(n => n.Value.IsSubSelected || n.Value.IsSelected).Count() > 0; //gotsta admit, the linq extensions sure do come in amazingly handy

        node.SetIsExcluded();                                                                                     //must do this after setting IsSubSelected since it depends on that property

        RefreshIsSubSelected(folder.Parent);
    }