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); }
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); }
internal bool Match(StrokeUnit strokeUnit) { return(strokeUnit.StrokeNumber == this.ExpectedStrokeNum); }