示例#1
0
        public void Write(string name, ZtrFileEntry[] entries)
        {
            using (StreamWriter sw = new StreamWriter(_output, Encoding.UTF8, 4096, true))
            {
                if (_formatter is StringsZtrFormatter) // TEMP
                {
                    sw.WriteLine("/*" + name + "*/");
                    sw.WriteLine("/*" + entries.Length.ToString("D4", CultureInfo.InvariantCulture) + "*/");
                }
                else
                {
                    sw.WriteLine(name);
                    sw.WriteLine(entries.Length.ToString("D4", CultureInfo.InvariantCulture));
                }

                for (int i = 0; i < entries.Length; i++)
                {
                    _formatter.Write(sw, entries[i], i);
                }
            }
        }