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


InkAnalyzer.DirtyRegion - свойство

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

Gets the area that has changed since the last analysis operation.

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

Синтаксис

'Декларация
Public ReadOnly Property DirtyRegion As AnalysisRegion
'Применение
Dim instance As InkAnalyzer
Dim value As AnalysisRegion

value = instance.DirtyRegion
public AnalysisRegion DirtyRegion { get; }
public:
property AnalysisRegion^ DirtyRegion {
    AnalysisRegion^ get ();
}
/** @property */
public AnalysisRegion get_DirtyRegion()
public function get DirtyRegion () : AnalysisRegion

Значение свойства

Тип: Microsoft.Ink.AnalysisRegion
The area that has changed since the last analysis operation.

Заметки

This property identifies the areas that need to be analyzed or reanalyzed. All of the InkAnalyzer methods that add, remove, or update stroke data update the DirtyRegion. To manually mark an area for reanalysis, use the DirtyRegion object's Union method.

Only ink within the DirtyRegion of the InkAnalyzer is analyzed during a call to the Analyze or BackgroundAnalyze method.

This property may contain nonadjacent areas.

Примеры

This example demonstrates user-initiated ink analysis within a form application. An event handler, theInkAnalyzeMenuItem_Click, handles the user request for analysis results. The event handler performs analysis only if the InkAnalyzer object's DirtyRegion is not empty.

''' <summary>
''' The Analyze menu item's Click event handler.
''' </summary>
''' <param name="sender">The source of the event.</param>
''' <param name="e">The event data.</param>
Private Sub theInkAnalyzeMenuItem_Click( _
    ByVal sender As System.Object, ByVal e As System.EventArgs) _
    Handles theInkAnalyzeMenuItem.Click

    ' Only start ink analysis if the dirty region is not empty.
    If Not Me.theInkAnalyzer.DirtyRegion.IsEmpty Then
        ' Perform the ink analysis.
        Dim theStatus As Microsoft.Ink.AnalysisStatus = _
            Me.theInkAnalyzer.Analyze()

        ' Update the analysis results on the form.
        Me.UpdateResults(theStatus)
    End If

End Sub 'theInkAnalyzeMenuItem_Click
/// <summary>
/// The Ink menu's Analyze menu item's Click event handler.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The event data.</param>
private void theInkAnalyzeMenuItem_Click(object sender, EventArgs e)
{
    // Only start ink analysis if the dirty region is not empty.
    if (!this.theInkAnalyzer.DirtyRegion.IsEmpty)
    {
        // Perform the ink analysis.
        Microsoft.Ink.AnalysisStatus theStatus =
            this.theInkAnalyzer.Analyze();

        // Update the analysis results on the form.
        this.UpdateResults(theStatus);
    }
}

Платформы

Windows Vista

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

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

.NET Framework

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

См. также

Ссылки

InkAnalyzer Класс

InkAnalyzer - члены

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

InkAnalyzer.Analyze

InkAnalyzer.BackgroundAnalyze

InkAnalyzer.AddStroke

InkAnalyzer.AddStrokes

InkAnalyzer.RemoveStroke

InkAnalyzer.RemoveStrokes