1. 游客, мы просим Вас ознакомиться с Правилами Форума и Отказом от ответственности!

搜索结果

  1. SunSoftware
  2. SunSoftware
  3. SunSoftware
  4. SunSoftware
  5. SunSoftware
  6. SunSoftware
  7. SunSoftware
  8. SunSoftware
  9. SunSoftware
  10. SunSoftware
  11. SunSoftware
  12. SunSoftware
  13. SunSoftware
  14. SunSoftware
  15. SunSoftware
  16. SunSoftware
    Можно через Консольное приложение C# считать из русского файла строки и записать их в английский файл. :)А elements.data как читать? Самый лайт вариант и не самый идеальный: при помощи 010 Editor можно посмотреть координаты начала листа обоих файлов. Вычислить разницу между первым и вторым итемом. Потом подставить всё в код. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { FileStream fs = new FileStream(@"F:\Games\test\elementsENG.data", FileMode.Open, FileAccess.ReadWrite); BinaryWriter w = new BinaryWriter(fs); String[] levels = new String[377]; //кол-во итемов в листе int readseek = 51522872; // позиция строки первого итема в листе в считываемом файле int writeseek = 53381128; // позиция строки первого итема в листе в записываемом файле int raz = 224;//разница в байтах между первым и вторым итемом, точнее между строкой первого итема и второго byte[] tmp = new byte[64]; //размер в байтах под строку string filename = @"F:\Games\test\elementsRU.data"; BinaryReader binr = new BinaryReader(File.OpenRead(filename), Encoding.Default); binr.BaseStream.Seek(readseek, SeekOrigin.Begin); w.Seek(writeseek, SeekOrigin.Begin); for (int i = 0; i < levels.Length; i++) { tmp = binr.ReadBytes(64);//считать levels[i] = Encoding.Unicode.GetString(tmp);//получить текст для консоли w.Write(tmp);//записать в файл readseek += raz;//переход к следующему итему writeseek += raz;//переход к следующему итему binr.BaseStream.Seek(readseek, SeekOrigin.Begin);//переход к следующему итему w.Seek(writeseek, SeekOrigin.Begin);//переход к следующему итему Console.WriteLine(levels[i]); } binr.Close(); w.Close(); fs.Close(); Console.WriteLine("Done!"); Console.ReadKey(); } } }
    作者: SunSoftware, 2017-01-18 所属版块: FW Вопросник
  17. SunSoftware
  18. SunSoftware
  19. SunSoftware
  20. SunSoftware