Beispiel #1
0
        public void FindFiles(string path, string[] pattern, bool subDirs, PictureFiles picFiles)
        {
            SearchOption useSubDirs = SearchOption.TopDirectoryOnly;

            // Find files
            if (subDirs)
            {
                useSubDirs = SearchOption.AllDirectories;
            }

            var files = Directory.GetFiles(path, "*", useSubDirs)
                .Where(file => pattern.Any(file.ToUpper().EndsWith))
                .ToList();

            // Add individual pictures
            foreach(string pic in files)
            {
                picFiles.Add(pic);
            }
        }
Beispiel #2
0
        public void FindFiles(string path, string[] pattern, bool subDirs, PictureFiles picFiles)
        {
            SearchOption useSubDirs = SearchOption.TopDirectoryOnly;

            // Find files
            if (subDirs)
            {
                useSubDirs = SearchOption.AllDirectories;
            }

            var files = Directory.GetFiles(path, "*", useSubDirs)
                        .Where(file => pattern.Any(file.ToUpper().EndsWith))
                        .ToList();

            // Add individual pictures
            foreach (string pic in files)
            {
                picFiles.Add(pic);
            }
        }
Beispiel #3
0
 public Statistics(PictureFiles files)
 {
     this.picFiles = files;
 }