Beispiel #1
0
        private void test()
        {
            List <string> worbook  = new List <string>(File.ReadAllLines("WordBookAll.wordbok"));
            List <string> words    = new List <string>(File.ReadAllLines("Statistic/16 тысяч строк.txt"));
            List <string> worbook2 = new List <string>();

            string str = TextFileRedactor.GetValueNF(worbook, TextFileRedactor.GetNameOfLine(words[3] + " "));

            WindowProgress wndp = new WindowProgress(new WindowSettings(this));

            wndp.Show();

            for (int i = 0; i < words.Count; i++)
            {
                wndp.ProgBar.Value = Math.Round((double)i / (double)words.Count * (double)100);
                for (int j = 0; j < worbook.Count; j++)
                {
                    if (TextFileRedactor.DeleteSpace(TextFileRedactor.GetNameOfLine(words[i])) == TextFileRedactor.DeleteSpace(TextFileRedactor.GetNameOfLine(worbook[j])))
                    {
                        Console.WriteLine(TextFileRedactor.DeleteSpace(TextFileRedactor.GetNameOfLine(words[i])) + "\n" + TextFileRedactor.DeleteSpace(TextFileRedactor.GetNameOfLine(worbook[j])));
                        break;
                    }
                }
            }
        }
Beispiel #2
0
        void btnCreateStatisticFClick(object s, RoutedEventArgs e)
        {
            wndProgress = new WindowProgress(this);
            wndProgress.Show();
            Thread thr = new Thread(GenerateStatisticFile);

            thr.Start();
        }
Beispiel #3
0
        void GenerateImportFile()
        {
            List <string> fileContent  = new List <string>(File.ReadAllLines(openFileDialog.FileName));
            Thread        thrTranslate = new Thread(TranslateImportFile);

            wndProgress = new WindowProgress(this);
            wndProgress.Show();
            thrTranslate.Start((object)TextFileRedactor.GenerateFileImport(fileContent));
        }