ReadyToReconcileEventHandler 委托

表示将处理 InkAnalyzerReadyToReconcile 事件的方法。

命名空间:  Microsoft.Ink
程序集:  Microsoft.Ink.Analysis(在 Microsoft.Ink.Analysis.dll 中)

语法

声明
Public Delegate Sub ReadyToReconcileEventHandler ( _
    sender As Object, _
    e As EventArgs _
)
用法
Dim instance As New ReadyToReconcileEventHandler(AddressOf HandlerMethod)
public delegate void ReadyToReconcileEventHandler(
    Object sender,
    EventArgs e
)
public delegate void ReadyToReconcileEventHandler(
    Object^ sender, 
    EventArgs^ e
)
/** @delegate */
public delegate void ReadyToReconcileEventHandler(
    Object sender,
    EventArgs e
)
JScript 不支持委托。

参数

备注

创建 ReadyToReconcileEventHandler 委托时,需要标识将处理该事件的方法。若要将该事件与事件处理程序关联,请将该委托的一个实例添加到事件中。除非移除了该委托,否则每当发生该事件时就会调用此事件处理程序。有关事件处理程序委托的更多信息,请参见 Events and Delegates(事件和委托)。

示例

下面的示例定义一个方法 theInkAnalyzer_ReadyToReconcile,该方法处理 InkAnalyzerReadyToReconcile 事件。如果设置了布尔值 abortAnalysis,则 theInkAnalyzerBase_ReadyToReconcile 中止分析操作。否则,该方法执行手动协调并继续执行分析操作。

''' <summary>
''' Handles the StrokeReparentedBase event of an InkAnalyzerBase.
''' </summary>
''' <param name="sender">The source of the event.</param>
''' <param name="e">The event data.</param>
Sub theInkAnalyzer_ReadyToReconcile( _
ByVal sender As Object, _
ByVal e As EventArgs)
    ' The source is an InkAnalyzerBase.
    Dim theInkAnalyzerBase As Microsoft.Ink.InkAnalyzer = _
        DirectCast(sender, Microsoft.Ink.InkAnalyzer)

    ' Check whether or not to abort analysis before continuing.
    If Me.abortAnalysis Then
        ' Abort analysis and update the analyzer's dirty region.
        Dim unanalyzedRegion As Microsoft.Ink.AnalysisRegion = _
            theInkAnalyzerBase.Abort()
        theInkAnalyzerBase.DirtyRegion.Union(unanalyzedRegion)
    Else
        ' Manually reconcile the analysis results for this analysis phase.
        theInkAnalyzerBase.Reconcile()
    End If

End Sub 'theInkAnalyzer_ReadyToReconcile
/// <summary>
/// Handles the ReadyToReconcile event of an InkAnalyzerBase.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The event data.</param>
void theInkAnalyzer_ReadyToReconcile(object sender, EventArgs e)
{
    // The source is an InkAnalyzer.
    Microsoft.Ink.InkAnalyzer theInkAnalyzerBase =
        sender as Microsoft.Ink.InkAnalyzer;

    // Check whether or not to abort analysis before continuing.
    if (this.abortAnalysis)
    {
        // Abort analysis and update the analyzer's dirty region.
        Microsoft.Ink.AnalysisRegion unanalyzedRegion =
            theInkAnalyzerBase.Abort();
        theInkAnalyzerBase.DirtyRegion.Union(unanalyzedRegion);
    }
    else
    {
        // Manually reconcile the analysis results for this analysis phase.
        theInkAnalyzerBase.Reconcile();
    }
}

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

Microsoft.Ink 命名空间