// Update the ContentList list of files with all files and directories in the currently selected directory public void UpdateContentList() { if (SelectedDirectory != null) { FileFilter = string.Empty; ContentList.Clear(); SelectedDirectory.UpdateFileList(ref _userMessage); SelectedDirectory.UpdateSubFolderList(); foreach (UserDirectory folder in SelectedDirectory.Subfolders) { ContentList.Add(folder); } foreach (UserFile file in SelectedDirectory.Files) { //file.UpdateFileStatus(); ContentList.Add(file); file.CheckFile(ref _userMessage); } SelectedDirectory.UpdatePerforceStatus(); RaisePropertyChanged("UserMessage"); } if (ContentList != null) { UserMessage = ContentList.Any(x => x.P4Success == false) ? P4ErrorMessage : UserMessage; } }
// Searches all files and directories in the directory tree starting at the selected directory for any that match // the FileFilter string public void GetFilteredFilesFromSelected() { ContentList.Clear(); List <UserFile> FilteredFileList = SelectedDirectory.GetFilteredFiles(FileFilter); UpdatePerforceStatus(FilteredFileList); foreach (UserFile file in SelectedDirectory.GetFilteredFiles(FileFilter)) { file.UpdateFileStatus(); ContentList.Add(file); file.CheckFile(ref _userMessage); RaisePropertyChanged("UserMessage"); } if (ContentList != null) { UserMessage = ContentList.Any(x => x.P4Success == false) ? P4ErrorMessage : UserMessage; } }