Exemple #1
0
        internal static StrokeUnit Deserialize(BinaryReader binaryReader)
        {
            StrokeUnit unit = new StrokeUnit();

            unit.StrokeNumber = binaryReader.ReadByte();
            unit.CharCount    = binaryReader.ReadInt16();
            unit.CharList     = new char[unit.CharCount];
            for (int i = 0; i < unit.CharCount; i++)
            {
                unit.CharList[i] = binaryReader.ReadChar();
            }
            return(unit);
        }
Exemple #2
0
        internal static StrokeDictionary Deserialize(BinaryReader binaryReader)
        {
            StrokeDictionary dictionary = new StrokeDictionary();

            binaryReader.ReadInt32();
            dictionary.Length = binaryReader.ReadInt32();
            dictionary.Count  = binaryReader.ReadInt32();
            dictionary.Offset = binaryReader.ReadInt16();
            binaryReader.ReadBytes(0x18);
            dictionary.StrokeUnitTable = new List <StrokeUnit>();
            for (int i = 0; i < dictionary.Count; i++)
            {
                dictionary.StrokeUnitTable.Add(StrokeUnit.Deserialize(binaryReader));
            }
            binaryReader.ReadInt16();
            return(dictionary);
        }
Exemple #3
0
 internal bool Match(StrokeUnit strokeUnit)
 {
     return(strokeUnit.StrokeNumber == this.ExpectedStrokeNum);
 }