Exemplo n.º 1
0
        private void CreateSubFolders(ITreeItem parent)
        {
            ActionResult <IEnumerable <DirectoryInfo> > actionResult =
                DirectoryCrawler.GetSubFolders(parent.Path, false);

            if (actionResult.Successful)
            {
                foreach (DirectoryInfo di in actionResult.Result)
                {
                    FolderTreeItemViewModel sub = new FolderTreeItemViewModel(di);
                    AddToTree(sub);
                    nodeDict.Add(sub.Path.ToLower(), sub);
                    sub.Expanded  += OnVmExpanded;
                    sub.Collapsed += OnVmCollapsed;
                    parent.AddChild(sub);
                }
            }
            //else
            //{
            //    logger.Log(LogMessageStatus.Warning, actionResult.GetComments());
            //}
        }