Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Reconciles portions of the analysis results that changed during background ink analysis.
Namespace: System.Windows.Ink
Assembly: IAWinFX (in IAWinFX.dll)
Syntax
'Declaration
Public Sub Reconcile
'Usage
Dim instance As InkAnalyzer
instance.Reconcile()
public void Reconcile()
public:
void Reconcile()
public function Reconcile()
Remarks
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.
Examples
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();
}
}
Platforms
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0