AnalysisWarning.AnalysisHint Property
Returns the analysis hint that caused the warning during an ink analysis operation.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink.Analysis (in microsoft.ink.analysis.dll)
Syntax
'Declaration
Public ReadOnly Property AnalysisHint As AnalysisHintNode
'Usage
Dim instance As AnalysisWarning
Dim value As AnalysisHintNode
value = instance.AnalysisHint
public AnalysisHintNode AnalysisHint { get; }
public:
property AnalysisHintNode^ AnalysisHint {
AnalysisHintNode^ get ();
}
/** @property */
public AnalysisHintNode get_AnalysisHint ()
public function get AnalysisHint () : AnalysisHintNode
Not applicable.
Property Value
The AnalysisHintNode object that is responsible for this warning, if any.
Remarks
If no AnalysisHintNode is associated with this warning, a null reference (Nothing in Visual Basic) is returned.
The InkAnalyzer generates an AnalysisWarning with a non-null AnalysisHint property if, for example, you mispell a factoid on the AnalysisHintNode. In this case, ink analysis returns an AnalysisStatus with one AnalysisWarning. The AnalysisHint property of that AnalysisWarning references the AnalysisHintNode with the misspelled factoid. The WarningCode property of the AnalysisWarning is FactoidNotSupported to indicate that there is a problem with the factoid.
Example
The following example shows an AnalysisWarning, warning
, which is checked to see if it is associated with any hints. If it is associated with a hint, the information about the hint is added to a message string, message
.
If Not (warning.AnalysisHint Is Nothing) Then
Dim hint As AnalysisHintNode = warning.AnalysisHint
message = message & Environment.NewLine & "Hint information: "
message = message & "AllowPartialDictionaryTerms"
If hint.AllowPartialDictionaryTerms = True Then
message = message & " = True "
Else
message = message & " = False "
End If
message = message & "CoerceToFactoid"
If hint.CoerceToFactoid = True Then
message = message & " = True "
Else
message = message & " = False "
End If
If Not hint.Factoid Is Nothing Then
message = message & "Factoid = " & warning.AnalysisHint.Factoid & " "
End If
If hint.Guide.DrawnBox <> Rectangle.Empty Then
message = message & "Guide Drawn Box = " & hint.Guide.DrawnBox.ToString()
End If
If hint.Guide.WritingBox <> Rectangle.Empty Then
message = message & "Guide Writing Box = " & hint.Guide.WritingBox.ToString()
End If
message = message & String.Format("Guide = ({0}, {1})", _
hint.Guide.Columns, hint.Guide.Rows)
If Not hint.Name Is Nothing Then
message = message & "Name = " & warning.AnalysisHint.Name & " "
End If
If Not hint.PrefixText Is Nothing Then
message = message & "PrefixText = " & warning.AnalysisHint.PrefixText & " "
End If
If Not hint.SuffixText Is Nothing Then
message = message & "SuffixText = " & warning.AnalysisHint.SuffixText & " "
End If
message = message & "WordMode"
If hint.WordMode = True Then
message = message & " = True"
Else
message = message & " = False"
End If
End If
if (warning.AnalysisHint != null)
{
AnalysisHintNode hint = warning.AnalysisHint;
message += Environment.NewLine + "Hint information: ";
message += "AllowPartialDictionaryTerms";
if (hint.AllowPartialDictionaryTerms)
message += " = true ";
else
message += " = false ";
message += "CoerceToFactoid";
if (hint.CoerceToFactoid)
message += " = true ";
else
message += " = false ";
if (hint.Factoid != null)
message += "Factoid = " + warning.AnalysisHint.Factoid + " ";
if (hint.Guide.DrawnBox != Rectangle.Empty)
message += "Guide Drawn Box = " + hint.Guide.DrawnBox.ToString();
if (hint.Guide.WritingBox != Rectangle.Empty)
message += "Guide Writing Box = " + hint.Guide.WritingBox.ToString();
if (hint.Name != null)
message += "Name = " + warning.AnalysisHint.Name + " ";
if (hint.PrefixText != null)
message += "PrefixText = " + warning.AnalysisHint.PrefixText + " ";
if (hint.SuffixText != null)
message += "SuffixText = " + warning.AnalysisHint.SuffixText + " ";
message += "WordMode";
if (hint.WordMode)
message += " = true";
else
message += " = false";
}
Platforms
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Framework
Supported in: 3.0
See Also
Reference
AnalysisWarning Class
AnalysisWarning Members
Microsoft.Ink Namespace