示例#1
0
        private static void RuToExcel()
        {
            Console.WriteLine("Введите путь папки:");
            string folderPath = Console.ReadLine();

            DateTime startTime = DateTime.Now;

            RuStrings ruStrings = new RuStrings();

            List <string> listPaths = ruStrings.GetAllFilesInFolder(folderPath);

            foreach (var path in listPaths)
            {
                ruStrings.GetRegexedStrings(path);
            }

            var collection = ruStrings.collection;

            foreach (var item in collection)
            {
                Console.WriteLine(item.Value);
            }

            SaveToExcel(ruStrings.collection);
            Console.WriteLine("Файл сохранен");

            DateTime stopTime = DateTime.Now;

            Console.WriteLine("\nВремя работы программы: " + (stopTime.Second - startTime.Second) + " секунд");
            Console.WriteLine("\nКоличество элементов: " + collection.Count);
        }
示例#2
0
        private static void AddResourceFile()
        {
            var list = GetExcelStrings();

            RuStrings ruStrings = new RuStrings();

            foreach (var el in list)
            {
                string st = ruStrings.ReadFile(el.Path).Replace(el.Value, "LocalizedStrings.String");
            }
        }