ITPub博客

首页 > Linux操作系统 > Linux操作系统 > InkAnalyzer.ReadyToReconcile 事件C#

InkAnalyzer.ReadyToReconcile 事件C#

原创 Linux操作系统 作者:iDotNetSpace 时间:2008-06-26 14:15:13 0 删除 编辑
程序集: Microsoft.Ink.Analysis(在 microsoft.ink.analysis.dll 中)
Visual Basic(声明)
Public Event ReadyToReconcile As ReadyToReconcileEventHandler
Visual Basic (用法)
Dim instance As InkAnalyzer
Dim handler As ReadyToReconcileEventHandler

AddHandler instance.ReadyToReconcile, handler
C#
public event ReadyToReconcileEventHandler ReadyToReconcile
C++
public:
event ReadyToReconcileEventHandler^ ReadyToReconcile {
    void add (ReadyToReconcileEventHandler^ value);
    void remove (ReadyToReconcileEventHandler^ value);
}
J#
/** @event */
public void add_ReadyToReconcile (ReadyToReconcileEventHandler value)

/** @event */
public void remove_ReadyToReconcile (ReadyToReconcileEventHandler value)
JScript
在 JScript. 中,可处理由类定义的事件,但无法定义自己的事件。
XAML
不适用。

The InkAnalyzer performs automatic reconciliation when the AnalysisModes property has the AnalysisModes flag AutomaticReconciliationEnabled set. When the AutomaticReconciliationEnabled flag is not set, your application needs to reconcile background analysis results manually.

To handle manual reconciliation, follow these steps.

  1. Clear the AutomaticReconciliationEnabled flag in the AnalysisModes property of the InkAnalyzer.

  2. Add an event handler for the ReadyToReconcile event.

  3. To reconcile the analysis results, call the Reconcile method from the event handler for the ReadyToReconcile event. To cancel the current background analysis operation, call the Abort method from the event handler for the ReadyToReconcile event.

The ink analyzer raises this event before it raises the InkAnalyzerStateChanging event.

For more information about synchronizing your application data with the InkAnalyzer, see Data Proxy with Ink Analysis.

The ink analyzer raises this event during background analysis.

The following example defines a method, theInkAnalyzer_ReadyToReconcile, that handles the ReadyToReconcile event of an InkAnalyzer. If the Boolean value abortAnalysis is set, theInkAnalyzerBase_ReadyToReconcile aborts the analysis operation. Otherwise, it performs manual reconciliation and continues with the analysis operation.

Visual Basic
''' 
''' Handles the StrokeReparentedBase event of an InkAnalyzerBase.
''' 
''' The source of the event.
''' The event data.
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
/// 
/// Handles the ReadyToReconcile event of an InkAnalyzerBase.
/// 
/// The source of the event.
/// The event data.
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 XP Media Center Edition

Windows Vista、Microsoft Windows XP SP2 和 Windows Server 2003 SP1 支持 Microsoft .NET Framework 3.0。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12639172/viewspace-366004/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 配置存储和工具
请登录后发表评论 登录
全部评论

注册时间:2008-01-04

最新文章