Ejemplo n.º 1
0
        public Task UpdateFileRecords(string path, FileSearchType type)
        {
            Task task = new Task(() => UpdateFileRecordsAsync(path, type));

            task.Start();
            return(task);
        }
Ejemplo n.º 2
0
        private void UpdateFileRecordsAsync(string path, FileSearchType type)
        {
            switch (type)
            {
            case FileSearchType.Folder:
                _allFileRecords = GetAllFolderRecords(path);
                break;

            case FileSearchType.Zip:
                _allFileRecords = GetAllZipRecords(path);
                break;

            default:
                throw new ArgumentException(nameof(type));
            }

            DispatcherInvoke(() => ApplyFilteting());
        }
Ejemplo n.º 3
0
        public static string ToLocalizedString(this FileSearchType fileSearchType)
        {
            string result = string.Empty;

            switch (fileSearchType)
            {
            case FileSearchType.Regex:
                result = Resources.Main_PatternType_Regex;
                break;

            case FileSearchType.Asterisk:
                result = Resources.Main_PatternType_Asterisk;
                break;

            case FileSearchType.Everything:
                result = Resources.Main_PatternType_Everything;
                break;
            }
            return(result.Replace("_", string.Empty));
        }