Exemple #1
0
        public override void Work(object param)
        {
            SynchronizationContext context = (SynchronizationContext)param;

            //// Temp folders
            List <string> tempFolders = TempFolders.GetTempFolders();

            foreach (var folder in tempFolders)
            {
                GetFiles(folder, "*.*", context);
            }

            // File extensions
            List <string> fileFilters = FileExtensions.GetFileExtenshions();

            foreach (var filter in fileFilters)
            {
                GetFiles("C:\\", filter, context);
            }

            //// Cache folders
            //GetFiles("C:\\", "*cache*", context);

            context.Send(OnWorkCompleted, running);
        }
        public override void Work(object param)
        {
            var context = (SynchronizationContext)param;

            //// Temp folders
            var tempFolders = TempFolders.GetTempFolders();

            foreach (var folder in tempFolders)
            {
                GetFiles(folder, "*.*", context);
            }

            //// File extensions
            var fileFilters = FileExtensions.GetFileExtenshions();

            foreach (var filter in fileFilters)
            {
                GetFiles("c:\\", filter, context);
            }

            context.Send(OnWorkCompleted, running);
        }