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 方法,將資料 Proxy 事件處理常式附加至 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);
}
下列範例會定義用來處理 IntermediateResultsUpdated 和 ResultsUpdated 事件的 ResultsAvailable 方法。事件資訊會傳遞至 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