コード例 #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;
                    }
                }
            }
        }
コード例 #2
0
ファイル: WindowSettings.cs プロジェクト: GTOsss/WordsTrainer
        void btnCreateStatisticFClick(object s, RoutedEventArgs e)
        {
            wndProgress = new WindowProgress(this);
            wndProgress.Show();
            Thread thr = new Thread(GenerateStatisticFile);

            thr.Start();
        }
コード例 #3
0
ファイル: WindowSettings.cs プロジェクト: GTOsss/WordsTrainer
        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));
        }