private void CollectFiles_Click(object sender, RoutedEventArgs e) { if (!(PC.GetPaths().Count > 1)) { string root = PC.GetPath(0); List <string> paths = PC.CollectChildPaths(root); PC.SetPaths(paths); PC.AddPath(root); PC.CollectFilesPaths(); } }
public MainWindow() { InitializeComponent(); searchingFile = false; baseDirectionInfo = "Contracts direction"; PC = new PathCollector(); TF = new TextFinder(); string dir = Directory.GetCurrentDirectory() + "/ContractsDirection.txt"; StreamReader SR = new StreamReader(dir); string str = SR.ReadLine(); SR.Close(); if (str.Contains(baseDirectionInfo)) { string s = str.Substring(21); PC.AddPath(s); } numberFields = new TextBox[10]; numberFields[0] = TextNumber1; numberFields[1] = TextNumber2; numberFields[2] = TextNumber3; numberFields[3] = TextNumber4; numberFields[4] = TextNumber5; numberFields[5] = TextNumber6; numberFields[6] = TextNumber7; numberFields[7] = TextNumber8; numberFields[8] = TextNumber9; numberFields[9] = TextNumber10; contractFields = new TextBox[10]; contractFields[0] = TextContract1; contractFields[1] = TextContract2; contractFields[2] = TextContract3; contractFields[3] = TextContract4; contractFields[4] = TextContract5; contractFields[5] = TextContract6; contractFields[6] = TextContract7; contractFields[7] = TextContract8; contractFields[8] = TextContract9; contractFields[9] = TextContract10; }