public interface IAnnBatesElement
Public Interface IAnnBatesElement
public:
interface class IAnnBatesElement abstract
This example creates different Bates stamp elements and sets their properties.
using Leadtools.Annotations.BatesStamp;
public void IAnnBateElement_IAnnBateElement()
{
//The base interface for all bates stamp elements
IAnnBatesElement baseElement = null;
//Create AnnBatesDateTime element and set its properties
AnnBatesDateTime dateTimeElement = new AnnBatesDateTime();
dateTimeElement.CurrentDateTime = DateTime.Now;
dateTimeElement.Kind = AnnDateTimeKind.Local;
dateTimeElement.Format = "M/d/yy";
baseElement = dateTimeElement;
//print the content of this dateTimeElement
Debug.WriteLine(baseElement.AsString());
//Create AnnBatesNumber element and set its properties
AnnBatesNumber numberElement = new AnnBatesNumber();
numberElement.NumberOfDigits = 4;
numberElement.PrefixText = "PrefixTest";
numberElement.StartNumber = 5;
numberElement.SuffixText = "SuffixTest";
numberElement.UseAllDigits = true;
numberElement.AutoIncrement = true;
baseElement = numberElement;
//print the content of this numberElement
Debug.WriteLine(baseElement.AsString()); // the output will be "PrefixTest0005SuffixTest"
//Create AnnBatesText element
AnnBatesText textElement = AnnBatesText.Create("This is text");
baseElement = textElement;
//print the content of this textElement
Debug.WriteLine(baseElement.AsString()); // the output will be "This is text"
}
Imports Leadtools.Annotations.Engine
Imports Leadtools.Annotations.BatesStamp
Imports LeadtoolsExamples.Common
Public Sub IAnnBateElement_IAnnBateElement()
'The base interface for all Bates stamp elements
Dim baseElement As IAnnBatesElement = Nothing
'Create AnnBatesDateTime element and set its properties
Dim dateTimeElement As AnnBatesDateTime = New AnnBatesDateTime()
dateTimeElement.CurrentDateTime = DateTime.Now
dateTimeElement.Kind = AnnDateTimeKind.Local
dateTimeElement.Format = "M/d/yy"
baseElement = dateTimeElement
'print the content of this dateTimeElement
Debug.WriteLine(baseElement.AsString())
'Create AnnBatesNumber element and set its properties
Dim numberElement As AnnBatesNumber = New AnnBatesNumber()
numberElement.NumberOfDigits = 4
numberElement.PrefixText = "PrefixTest"
numberElement.StartNumber = 5
numberElement.SuffixText = "SuffixTest"
numberElement.UseAllDigits = True
numberElement.AutoIncrement = True
baseElement = numberElement
'print the content of this numberElement
Debug.WriteLine(baseElement.AsString()) ' the output will be "PrefixTest0005SuffixTest"
'Create AnnBatesText element
Dim textElement As AnnBatesText = AnnBatesText.Create("This is text")
baseElement = textElement
'print the content of this textElement
Debug.WriteLine(baseElement.AsString()) ' the output will be "This is text"
End Sub
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.