C#
VB
C++
Gets or sets the default picture used by all AnnAudioObject objects.
public static AnnPicture DefaultPicture { get; set; } Public Shared Property DefaultPicture As Leadtools.Annotations.AnnPicture
public:static property Leadtools.Annotations.AnnPicture^ DefaultPicture {Leadtools.Annotations.AnnPicture^ get();void set ( Leadtools.Annotations.AnnPicture^ );}
An AnnPicture class that defines the picture used by the AnnAudioObject.
Set the UseOriginalPicture property to true to revert back to the original picture.
using Leadtools;using Leadtools.Annotations;using Leadtools.Codecs;using Leadtools.WinForms;public void AnnAudioObject_DefaultPicture(AnnContainer container, RasterImageViewer viewer, string newAudioPicture){// first add a new AnnAudioObject with the original pictureAnnAudioObject obj = new AnnAudioObject();obj.Bounds = new AnnRectangle(100, 100, 100, 100);container.Objects.Add(obj);viewer.Invalidate();MessageBox.Show("An audio object with the original picture");// now change the picture to one of our ownImage img = Image.FromFile(newAudioPicture);AnnPicture picture = new AnnPicture(img);AnnAudioObject.DefaultPicture = picture;// at this point, all new AnnAudioObject objects will use this new picture// add another audio objectobj = new AnnAudioObject();obj.Bounds = new AnnRectangle(100, 210, 100, 100);container.Objects.Add(obj);viewer.Invalidate();MessageBox.Show("An audio object with the new picture");// set the picture back to the original valueAnnAudioObject.UseOriginalPicture = true;// add another audio objectobj = new AnnAudioObject();obj.Bounds = new AnnRectangle(100, 320, 100, 100);container.Objects.Add(obj);viewer.Invalidate();MessageBox.Show("An audio object with the original picture");}
Imports LeadtoolsImports Leadtools.AnnotationsImports Leadtools.CodecsImports Leadtools.WinFormsPublic Sub AnnAudioObject_DefaultPicture(ByVal container As AnnContainer, ByVal viewer As RasterImageViewer, ByVal newAudioPicture As String)' first add a new AnnAudioObject with the original pictureDim obj As AnnAudioObject = New AnnAudioObject()obj.Bounds = New AnnRectangle(100, 100, 100, 100)container.Objects.Add(obj)viewer.Invalidate()MessageBox.Show("An audio object with the original picture")' now change the picture to one of our ownDim img As Image = Image.FromFile(newAudioPicture)Dim picture As AnnPicture = New AnnPicture(img)AnnAudioObject.DefaultPicture = picture' at this point, all new AnnAudioObject objects will use this new picture' add another audio objectobj = New AnnAudioObject()obj.Bounds = New AnnRectangle(100, 210, 100, 100)container.Objects.Add(obj)viewer.Invalidate()MessageBox.Show("An audio object with the new picture")' set the picture back to the original valueAnnAudioObject.UseOriginalPicture = True' add another audio objectobj = New AnnAudioObject()obj.Bounds = New AnnRectangle(100, 320, 100, 100)container.Objects.Add(obj)viewer.Invalidate()MessageBox.Show("An audio object with the original picture")End Sub
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
