Exemplo n.º 1
0
        internal static StrokeUnit Deserialize(BinaryReader binaryReader)
        {
            var strokeUnit = new StrokeUnit
            {
                StrokeNumber = binaryReader.ReadByte(),
                CharCount    = binaryReader.ReadInt16()
            };

            strokeUnit.CharList = new char[strokeUnit.CharCount];
            for (var i = 0; i < strokeUnit.CharCount; i++)
            {
                strokeUnit.CharList[i] = binaryReader.ReadChar();
            }
            return(strokeUnit);
        }
Exemplo n.º 2
0
        internal static StrokeDictionary Deserialize(BinaryReader binaryReader)
        {
            var strokeDictionary = new StrokeDictionary();

            binaryReader.ReadInt32();
            strokeDictionary.Length = binaryReader.ReadInt32();
            strokeDictionary.Count  = binaryReader.ReadInt32();
            strokeDictionary.Offset = binaryReader.ReadInt16();
            binaryReader.ReadBytes(24);
            strokeDictionary.StrokeUnitTable = new List <StrokeUnit>();
            for (var i = 0; i < strokeDictionary.Count; i++)
            {
                strokeDictionary.StrokeUnitTable.Add(StrokeUnit.Deserialize(binaryReader));
            }
            binaryReader.ReadInt16();
            return(strokeDictionary);
        }