예제 #1
0
        public static void ToXml(FFXIIICodePage codepage, XmlElement node)
        {
            XmlElement charsNode = node.EnsureChildElement("Chars");
            XmlElement bytesNode = node.EnsureChildElement("Bytes");

            foreach (char ch in codepage.Chars)
            {
                XmlElement charNode = charsNode.CreateChildElement("Entry");
                charNode.SetChar("Char", ch);
            }

            foreach (KeyValuePair <char, short> pair in codepage.Codes)
            {
                XmlElement byteNode = bytesNode.CreateChildElement("Entry");
                byteNode.SetChar("Char", pair.Key);
                byteNode.SetInt16("Byte", pair.Value);
            }
        }
예제 #2
0
        public static void ToXml(FFXIIICodePage codepage, XmlElement node)
        {
            XmlElement charsNode = node.EnsureChildElement("Chars");
            XmlElement bytesNode = node.EnsureChildElement("Bytes");

            foreach (char ch in codepage.Chars)
            {
                XmlElement charNode = charsNode.CreateChildElement("Entry");
                charNode.SetChar("Char", ch);
            }

            foreach (KeyValuePair<char, short> pair in codepage.Codes)
            {
                XmlElement byteNode = bytesNode.CreateChildElement("Entry");
                byteNode.SetChar("Char", pair.Key);
                byteNode.SetInt16("Byte", pair.Value);
            }
        }
예제 #3
0
        public static FFXIIITextEncoding CreateEuro()
        {
            FFXIIICodePage codepage = FFXIIICodePageHelper.CreateEuro();

            return(new FFXIIITextEncoding(codepage));
        }
예제 #4
0
 public FFXIIITextEncoding(FFXIIICodePage codepage)
 {
     Codepage = codepage;
     _encoder = new FFXIIITextEncoder(codepage);
     _decoder = new FFXIIITextDecoder(codepage);
 }
예제 #5
0
 public FFXIIITextEncoding(FFXIIICodePage codepage)
 {
     Codepage = codepage;
     _encoder = new FFXIIITextEncoder(codepage);
     _decoder = new FFXIIITextDecoder(codepage);
 }