InkAnalyzer.IntermediateResultsUpdated 事件
在当前中间分析阶段完成时发生。
命名空间: Microsoft.Ink
程序集: Microsoft.Ink.Analysis(在 Microsoft.Ink.Analysis.dll 中)
语法
声明
Public Event IntermediateResultsUpdated As ResultsUpdatedEventHandler
用法
Dim instance As InkAnalyzer
Dim handler As ResultsUpdatedEventHandler
AddHandler instance.IntermediateResultsUpdated, handler
public event ResultsUpdatedEventHandler IntermediateResultsUpdated
public:
event ResultsUpdatedEventHandler^ IntermediateResultsUpdated {
void add (ResultsUpdatedEventHandler^ value);
void remove (ResultsUpdatedEventHandler^ value);
}
/** @event */
public void add_IntermediateResultsUpdated (ResultsUpdatedEventHandler value)
/** @event */
public void remove_IntermediateResultsUpdated (ResultsUpdatedEventHandler value)
JScript 不支持事件。
备注
InkAnalyzer 在协调当前分析阶段的中间结果之后引发此事件。
如果您的应用程序维护其自己的数据结构(该数据结构与 InkAnalyzer 的数据结构同步),则此事件指示 InkAnalyzer 已完成此分析阶段中对其内部数据进行的更改。
请在墨迹分析器引发 InkAnalyzerStateChanging 事件时锁定您的数据结构。在此分析阶段中更改数据结构可能导致墨迹分析错误和同步错误。可以在墨迹分析器引发 IntermediateResultsUpdated 或 ResultsUpdated 事件时解锁数据结构。
有关将应用程序数据与 InkAnalyzer 同步的更多信息,请参见Data Proxy with Ink Analysis。
示例
此示例定义 AttachDataProxyEventHandlers 方法,该方法将数据代理事件处理程序附加到一个 InkAnalyzer (theInkAnalyzer)。
Private Sub AttachDataProxyEventHandlers()
' If the document model supports on demand data proxy, then add an
' event handler for the PopulateContextNode event. This event is raised
' when the InkAnalyzer accesses a partially populated ContextNode created
' by the document model.
If Me.theDocumentModel.SupportsOnDemandDataProxy Then
AddHandler Me.theInkAnalyzer.PopulateContextNode, AddressOf Me.PopulateContextNode
End If
' Add the other data proxy related event handlers. These events are raised
' by the InkAnalyzer to communicate ink analysis results to the document model.
AddHandler Me.theInkAnalyzer.ContextNodeCreated, AddressOf Me.AddContextNode
AddHandler Me.theInkAnalyzer.ContextNodeDeleting, AddressOf Me.RemoveContextNode
AddHandler Me.theInkAnalyzer.ContextNodeLinkAdding, AddressOf Me.AddContextNodeLink
AddHandler Me.theInkAnalyzer.ContextNodeLinkDeleting, AddressOf Me.RemoveContextNodeLink
AddHandler Me.theInkAnalyzer.ContextNodeMovingToPosition, AddressOf Me.MoveContextNodeToPosition
AddHandler Me.theInkAnalyzer.ContextNodePropertiesUpdated, AddressOf Me.UpdateContextNodeProperties
AddHandler Me.theInkAnalyzer.ContextNodeReparenting, AddressOf Me.ReparentContextNode
AddHandler Me.theInkAnalyzer.InkAnalyzerStateChanging, AddressOf Me.InkAnalyzer_StateChanging
AddHandler Me.theInkAnalyzer.StrokesReparented, AddressOf Me.ReparentStroke
AddHandler Me.theInkAnalyzer.IntermediateResultsUpdated, AddressOf Me.ResultsAvailable
AddHandler Me.theInkAnalyzer.ResultsUpdated, AddressOf Me.ResultsAvailable
End Sub 'AttachDataProxyEventHandlers
private void AttachDataProxyEventHandlers()
{
// If the document model supports on demand data proxy, then add an
// event handler for the PopulateContextNode event. This event is raised
// when the InkAnalyzer accesses a partially populated ContextNode created
// by the document model.
if (this.theDocumentModel.SupportsOnDemandDataProxy)
{
this.theInkAnalyzer.PopulateContextNode +=
new Microsoft.Ink.PopulateContextNodeEventHandler(
this.PopulateContextNode);
}
// Add the other data proxy related event handlers. These events are raised
// by the InkAnalyzer to communicate ink analysis results to the document model.
this.theInkAnalyzer.ContextNodeCreated +=
new Microsoft.Ink.ContextNodeCreatedEventHandler(
this.AddContextNode);
this.theInkAnalyzer.ContextNodeDeleting +=
new Microsoft.Ink.ContextNodeDeletingEventHandler(
this.RemoveContextNode);
this.theInkAnalyzer.ContextNodeLinkAdding +=
new Microsoft.Ink.ContextNodeLinkAddingEventHandler(
this.AddContextNodeLink);
this.theInkAnalyzer.ContextNodeLinkDeleting +=
new Microsoft.Ink.ContextNodeLinkDeletingEventHandler(
this.RemoveContextNodeLink);
this.theInkAnalyzer.ContextNodeMovingToPosition +=
new Microsoft.Ink.ContextNodeMovingToPositionEventHandler(
this.MoveContextNodeToPosition);
this.theInkAnalyzer.ContextNodePropertiesUpdated +=
new Microsoft.Ink.ContextNodePropertiesUpdatedEventHandler(
this.UpdateContextNodeProperties);
this.theInkAnalyzer.ContextNodeReparenting +=
new Microsoft.Ink.ContextNodeReparentingEventHandler(
this.ReparentContextNode);
this.theInkAnalyzer.InkAnalyzerStateChanging +=
new Microsoft.Ink.InkAnalyzerStateChangingEventHandler(
this.InkAnalyzer_StateChanging);
this.theInkAnalyzer.StrokesReparented +=
new Microsoft.Ink.StrokesReparentedEventHandler(
this.ReparentStrokes);
this.theInkAnalyzer.IntermediateResultsUpdated +=
new Microsoft.Ink.ResultsUpdatedEventHandler(
this.ResultsAvailable);
this.theInkAnalyzer.ResultsUpdated +=
new Microsoft.Ink.ResultsUpdatedEventHandler(
this.ResultsAvailable);
}
下面的示例定义 ResultsAvailable 方法,用以处理 IntermediateResultsUpdated 和 ResultsUpdated 事件。事件信息将传递给文档模型对象 theDocumentModel。
此示例不提供文档模型的定义,也不演示文档模型如何处理传入的信息。
'/ <summary>
'/ Handles the InkAnalyzer.Results and InkAnalyzer.IntermediateResults events.
'/ </summary>
'/ <param name="sender">The source of the event.</param>
'/ <param name="e">The event data.</param>
Private Sub ResultsAvailable( _
ByVal sender As Object, _
ByVal e As Microsoft.Ink.ResultsUpdatedEventArgs)
If e.Status.Successful Then
Me.theDocumentModel.ResultsAvailable(CType(sender, Microsoft.Ink.InkAnalyzer))
End If
End Sub 'ResultsAvailable
/// <summary>
/// Handles the InkAnalyzer.Results and InkAnalyzer.IntermediateResults events.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The event data.</param>
private void ResultsAvailable(object sender, Microsoft.Ink.ResultsUpdatedEventArgs e)
{
if (e.Status.Successful)
{
this.theDocumentModel.ResultsAvailable((Microsoft.Ink.InkAnalyzer)sender);
}
}
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0