Realizes all the AnnRedactionObject objects in this AnnAutomation.
public virtual void RealizeAllRedactions() Public Overridable Sub RealizeAllRedactions()
public:virtual void RealizeAllRedactions();
Use the CanRealizeAllRedactions property to determine whether you can currently call this method.
This method will call the AnnRedactionObject.Realize(RasterImageViewer) method for all AnnRedactionObject objects that have the AnnRedactionObject.IsRealized value set to false.
using Leadtools;using Leadtools.Annotations;using Leadtools.WinForms;using Leadtools.Drawing;public void AnnAutomation_RealizeAllRedactions(AnnAutomation automation){// remove all objects from this automationautomation.SelectAll();automation.Delete();// see if we can realize or restore all the redaction objects (this should show a message informing you there are no redaction objects in this automation)RealizeRestoreAllRedactions(automation);// first add a couple of new redaction object to the automationAnnRedactionObject redaction = new AnnRedactionObject();redaction.Bounds = new AnnRectangle(100, 100, 100, 100, AnnUnit.Pixel);automation.Container.Objects.Add(redaction);automation.Viewer.Invalidate(redaction.InvalidRectangle);redaction = new AnnRedactionObject();redaction.Bounds = new AnnRectangle(300, 300, 100, 100, AnnUnit.Pixel);automation.Container.Objects.Add(redaction);automation.Viewer.Invalidate(redaction.InvalidRectangle);// see if we can realize/restore the objects (should realize the redactions)RealizeRestoreAllRedactions(automation);// see if we can realize/restore the objects (should restore the redactions)RealizeRestoreAllRedactions(automation);}private void RealizeRestoreAllRedactions(AnnAutomation automation){if (automation.CanRealizeAllRedactions){// realizeautomation.RealizeAllRedactions();MessageBox.Show("Redaction objects have been realized");}else if (automation.CanRestoreAllRedactions){// restoreautomation.RestoreAllRedactions();MessageBox.Show("Redaction objects have been restored");}elseMessageBox.Show("Cannot realize or restore because no redaction object is currently in this automation");}
Imports LeadtoolsImports Leadtools.AnnotationsImports Leadtools.WinFormsImports Leadtools.DrawingPublic Sub AnnAutomation_RealizeAllRedactions(ByVal automation As AnnAutomation)' remove all objects from this automationautomation.SelectAll()automation.Delete()' see if we can realize or restore all the redaction objects (this should show a message informing you there are no redaction objects in this automation)RealizeRestoreAllRedactions(automation)' first add a couple of new redaction object to the automationDim redaction As AnnRedactionObject = New AnnRedactionObject()redaction.Bounds = New AnnRectangle(100, 100, 100, 100, AnnUnit.Pixel)automation.Container.Objects.Add(redaction)automation.Viewer.Invalidate(redaction.InvalidRectangle)redaction = New AnnRedactionObject()redaction.Bounds = New AnnRectangle(300, 300, 100, 100, AnnUnit.Pixel)automation.Container.Objects.Add(redaction)automation.Viewer.Invalidate(redaction.InvalidRectangle)' see if we can realize/restore the objects (should realize the redactions)RealizeRestoreAllRedactions(automation)' see if we can realize/restore the objects (should restore the redactions)RealizeRestoreAllRedactions(automation)End SubPrivate Sub RealizeRestoreAllRedactions(ByVal automation As AnnAutomation)If automation.CanRealizeAllRedactions Then' realizeautomation.RealizeAllRedactions()MessageBox.Show("Redaction objects have been realized")ElseIf automation.CanRestoreAllRedactions Then' restoreautomation.RestoreAllRedactions()MessageBox.Show("Redaction objects have been restored")ElseMessageBox.Show("Cannot realize or restore because no redaction object is currently in this automation")End IfEnd 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
