Exemplo n.º 1
0
        public void AddDirectory(IEnumerable <string> parentPath, DirectoryView newDir)
        {
            var result = FindNode(parentPath);

            if (!result.IsFound)
            {
                return;
            }

            result.Children.Add(newDir.FileName, newDir.UserName);
        }
Exemplo n.º 2
0
        public void SetDirectory(IEnumerable <string> path, DirectoryView newDir)
        {
            var result = FindNode(path);

            if (result.Node == null)
            {
                // add the directory
                if (!result.IsFound)
                {
                    return;
                }
                result.Children.Add(newDir.FileName, newDir.UserName);
                return;
            }

            result.Node.Text = newDir.UserName;
            result.Node.Name = newDir.FileName;
        }