Поделиться через


InkAnalyzer.Reconcile - метод

Обновлен: Ноябрь 2007

Reconciles portions of the analysis results that changed during background ink analysis.

Пространство имен:  System.Windows.Ink
Сборка:  IAWinFX (в IAWinFX.dll)

Синтаксис

'Декларация
Public Sub Reconcile
'Применение
Dim instance As InkAnalyzer

instance.Reconcile()
public void Reconcile()
public:
void Reconcile()
public void Reconcile()
public function Reconcile()

Заметки

The reconcile method determines which portions of the analysis results change during background analysis. As the analysis operation is processed on the background thread, changes to the ContextNode objects (for example, a stroke deletion or stroke movement) may invalidate that calculation.

By default, reconciliation happens automatically just prior to raising the IntermediateResultsUpdated or ResultsUpdated events. However, if you want to control when reconciliation occurs, disable AutomaticReconciliationEnabled by setting the appropriate AnalysisModes. Once disabled, you will need to register for the ReadyToReconcile event. When the ReadyToReconcile event is raised, you must call either this Reconcile() method, or the transactional Reconcile(Int64) method (either inside of, or outside of, your handling of the ReadyToReconcile event) for the analysis operation to complete or to continue.

The Reconcile method identifies context nodes that are updated by both the application and the analysis operation (referred to as a collision). Application changes to the ContextNodeCollection referenced by the RootNode property are preserved. Colliding analysis results are not updated to maintain the collection. Regions of the collisions are automatically added to the DirtyRegion property to ensure these areas are analyzed again.

The event is only raised if the BackgroundAnalyze method is used to invoke the analysis operation.

Calling this overload of Reconcile() multiple times will not raise any exceptions, but it will cause failure without notice.

After a transactional reconcile (with a time limit) occurs, calling this overload of Reconcile() will have the following result: processing will continue, starting at the point where the last transaction ended. Processing will then run until reconciliation is complete.

Примеры

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

Sub theInkAnalyzer_ReadyToReconcile(ByVal sender As Object, ByVal e As EventArgs) 
    MessageBox.Show("ReadyToReconcile")
    ' The source is an InkAnalyzer.
    Dim theInkAnalyzer As InkAnalyzer = CType(sender, 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 AnalysisRegion = theInkAnalyzer.Abort()
        theInkAnalyzer.DirtyRegion.Union(unanalyzedRegion)
    Else
        ' Manually reconcile the analysis results for this analysis phase.
        theInkAnalyzer.Reconcile()
    End If

End Sub 'theInkAnalyzer_ReadyToReconcile
void theInkAnalyzer_ReadyToReconcile(object sender, EventArgs e)
{
    MessageBox.Show("ReadyToReconcile");
    // The source is an InkAnalyzer.
    InkAnalyzer theInkAnalyzer = sender as InkAnalyzer;

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

}

Платформы

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

InkAnalyzer Класс

InkAnalyzer - члены

Reconcile - перегрузка

System.Windows.Ink - пространство имен