日期:2014-05-17 浏览次数:21308 次
InkAnalyzer theInkAnalyer = new InkAnalyzer();
theInkAnalyer.AddStrokes(inkCanvs.Strokes);
theInkAnalyer.SetStrokesLanguageId(inkCanvs.Strokes,0x0804);
theInkAnalyer.SetStrokesType(inkCanvs.Strokes, StrokeType.Writing);
AnalysisStatus status = theInkAnalyer.Analyze();
if (status.Successful)
{
textBox1.Text = theInkAnalyer.GetRecognizedString();
for (int i = 0; i < theInkAnalyer.GetAlternates().Count; i++)
{
textBox2.Text += theInkAnalyer.GetAlternates()[i].RecognizedString;
}
}
else
{
MessageBox.Show("识别失败");
}