void WorkerStatistics(object sender, DoWorkEventArgs e) { int progress = 0; (sender as BackgroundWorker).ReportProgress(progress, 0); FileStatistics = new FileForStatistics(CreateFileGroup(PathFolderSourceFail)); FileStatistics.ReadFiles(option); StatisticsView = new ObservableCollection <Letters>(); progress = 1; (sender as BackgroundWorker).ReportProgress(progress); e.Result = false; }
public UnitTest1() { fileTxt = new FileForStatistics(pathFile); LetterForLanguage letterForLanguageConsonants = new LetterForLanguage(); letterForLanguageConsonants.Consonants = new List <char>() { 'б', 'в', 'г', 'д', 'ж', 'з', 'й', 'к', 'л', 'м', 'н', 'п', 'р', 'с', 'т', 'ф', 'х', 'ц', 'ч', 'ш', 'щ' }; letterForLanguageConsonants.Language = "RU"; Consonants = new List <LetterForLanguage>(); Consonants.Add(letterForLanguageConsonants); LetterForLanguage letterForLanguageVowel = new LetterForLanguage(); letterForLanguageVowel.Vowel = new List <char>() { 'а', 'о', 'и', 'е', 'ё', 'э', 'ы', 'у', 'ю', 'я' }; letterForLanguageVowel.Language = "RU"; Vowel = new List <LetterForLanguage>(); Vowel.Add(letterForLanguageVowel); }