Dim annotationManager As AnnotationManager = New AnnotationManager()
Dim status As GdPictureStatus = annotationManager.InitFromFile("test.jpg")
If status = GdPictureStatus.OK Then
status = annotationManager.SelectPage(1)
If status = GdPictureStatus.OK Then
Dim annotCount As Integer = annotationManager.GetAnnotationCount()
status = annotationManager.GetStat()
If status = GdPictureStatus.OK Then
MessageBox.Show("The number of annotations: " + annotCount.ToString(), "AnnotationManager.GetStat")
Else
MessageBox.Show("The GetAnnotationCount() method has failed with the status: " + status.ToString(), "AnnotationManager.GetStat")
End If
Else
MessageBox.Show("The SelectPage() method has failed with the status: " + status.ToString(), "AnnotationManager.GetStat")
End If
annotationManager.Close()
Else
MessageBox.Show("The AnnotationManager can't be properly initialized. Status: " + status.ToString(), "AnnotationManager.GetStat")
End If
annotationManager.Dispose()
AnnotationManager annotationManager = new AnnotationManager();
GdPictureStatus status = annotationManager.InitFromFile("test.jpg");
if (status == GdPictureStatus.OK)
{
status = annotationManager.SelectPage(1);
if (status == GdPictureStatus.OK)
{
int annotCount = annotationManager.GetAnnotationCount();
status = annotationManager.GetStat();
if (status == GdPictureStatus.OK)
{
MessageBox.Show("The number of annotations: " + annotCount.ToString(), "AnnotationManager.GetStat");
}
else
MessageBox.Show("The GetAnnotationCount() method has failed with the status: " + status.ToString(), "AnnotationManager.GetStat");
}
else
MessageBox.Show("The SelectPage() method has failed with the status: " + status.ToString(), "AnnotationManager.GetStat");
annotationManager.Close();
}
else
MessageBox.Show("The AnnotationManager can't be properly initialized. Status: " + status.ToString(), "AnnotationManager.GetStat");
annotationManager.Dispose();