private void OnChanged(object sender, FileSystemEventArgs e) { NewPath = e.FullPath; Console.WriteLine("Новый файл: " + e.Name + "\r\nДействие произведенное с ним: " + e.ChangeType + "\r\nПуть до файла: " + e.FullPath + "\r\n"); ReadWriter.sourceFilePath = e.FullPath; ReadWriter.WriteWordsOrderByAlphabet(); Console.WriteLine($"Text from new file {e.Name} was splited on words and order by alphabet"); Console.WriteLine("and added to file TextWordOrderByAlphabet.txt"); }
public string[] GetWords() { //ReadWriter ReadWriter = new ReadWriter(); var CleanedTextOnlyWords = Regex.Replace(ReadWriter.ReadAndCleanText(), pattern6, String.Empty); string[] SplitTextWord = new Regex(pattern4).Split(CleanedTextOnlyWords); CleanedTextOnlyWords1 = CleanedTextOnlyWords; return(SplitTextWord); }
public string[] GetPunctMarks() { //ReadWriter ReadWriter = new ReadWriter(); string[] SplitPunctMarks = new Regex(pattern5).Split(ReadWriter.ReadAndCleanText()); return(SplitPunctMarks); }
public string[] GetSentence() { //ReadWriter ReadWriter = new ReadWriter(); string[] SplitTextSentence = new Regex(pattern3).Split(ReadWriter.ReadAndCleanText()); return(SplitTextSentence); }