Exemplo n.º 1
0
        private void Select()
        {
            var selected = _selectedFolders.FirstOrDefault(d => AreDirectoryEqual(d, this));

            if (selected != null)
            {
                selected.Recursive = IsRecursive;
            }
            else
            {
                selected = new SelectedFolder(Directory, IsRecursive);
                selected.PropertyChanged += SelectedFolder_PropertyChanged;
                _selectedFolders.Add(selected);
            }
        }
Exemplo n.º 2
0
 public static bool AreDirectoryEqual(SelectedFolder d, Folder f)
 {
     return(string.Compare(d.Directory.FullName, f.Directory.FullName, true, CultureInfo.InvariantCulture) == 0);
 }