Esempio n. 1
0
        public string CreateUniqueName(string nameFolder)
        {
            var i       = 2;
            var strName = nameFolder;

            while (ChildsCollection.Any(o => o.Name == strName))
            {
                strName = $"{nameFolder} ({i++})";
            }
            return(strName);
        }
Esempio n. 2
0
        public void AddFolder(object name)
        {
            var uniqueName = CreateUniqueName(_mainViewModel.StartNameFolder);

            ChildsCollection?.Add(new FolderTree(this, uniqueName, _mainViewModel));
        }