Пример #1
0
        public void CreateFolderTree(DirectoryInfo root)
        {
            var FolderList = root.GetDirectories("*");

            foreach (var subfolder in FolderList)
            {
                FolderVM subFolderVM = new FolderVM(subfolder.FullName);
                subFolderVM.CreateFolderTree(subfolder);
                SubFolderList.Add(subFolderVM);
                subFolderVM.PropertyChanged += MarkedChangeEventHandler;
            }
        }
Пример #2
0
 public void Add(IFtpItem item)
 {
     lock (this)
     {
         if (item is IFtpFolder)
         {
             item.Parent = this;
             SubFolderList.Add(item.Name.ToLower(), item);
         }
         else if (item is IFtpFile)
         {
             item.Parent = this;
             FileList.Add(item.Name.ToLower(), item);
         }
     }
 }