Error processing SSI file
(Leadtools.Annotations.Automation)

Show in webframe

RealizeAllRedactions Method






Realizes all the AnnRedactionObject objects in this AnnAutomation.
Syntax
public virtual void RealizeAllRedactions()
'Declaration
 
Public Overridable Sub RealizeAllRedactions() 
public virtual void RealizeAllRedactions()
-(void) realizeAllRedactions;
public void realizeAllRedactions()
 function Leadtools.Annotations.Automation.AnnAutomation.RealizeAllRedactions()
Remarks

Use the CanRealizeAllRedactions property to determine whether you can currently call this method.

This method will call the Realize method for all AnnRedactionObject objects.

Example

This example will add a couple of redaction objects then realizes and restores them.

Copy Code  
using Leadtools.Annotations.Automation;
using Leadtools.Annotations.Core;
using Leadtools.Codecs;
using Leadtools.Controls;
using Leadtools.Annotations.Rendering;
using Leadtools.Annotations.WinForms;

[TestMethod]
public void AnnAutomation_RealizeAllRedactions()
{
   // 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 automation
   AnnRedactionObject redaction = new AnnRedactionObject();
   redaction.Rect = LeadRectD.Create(100, 100, 800, 800);
   _automation.Container.Children.Add(redaction);

   redaction = new AnnRedactionObject();
   redaction.Rect = LeadRectD.Create(1000, 1000, 800, 800);
   _automation.Container.Children.Add(redaction);

   _automation.Invalidate(LeadRectD.Empty);

   // 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)
   {
      // realize
      automation.RealizeAllRedactions();
      Debug.WriteLine("Redaction objects have been realized");
   }
   else if (automation.CanRestoreAllRedactions)
   {
      // restore
      automation.RestoreAllRedactions();
      Debug.WriteLine("Redaction objects have been restored");
   }
   else
      Debug.WriteLine("Cannot realize or restore because no redaction object is currently in this automation");

   automation.Invalidate(LeadRectD.Empty);
}
using Leadtools.Annotations.Automation;
using Leadtools.Controls;
using Leadtools.Converters;
using Leadtools.Annotations.Core;
using Leadtools.Codecs;

[TestMethod]
public void AnnAutomation_RealizeAllRedactions()
{
   // 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 automation
   AnnRedactionObject redaction = new AnnRedactionObject();
   redaction.Rect = LeadRectDHelper.Create(100, 100, 800, 800);
   _automation.Container.Children.Add(redaction);

   redaction = new AnnRedactionObject();
   redaction.Rect = LeadRectDHelper.Create(1000, 1000, 800, 800);
   _automation.Container.Children.Add(redaction);

   _automation.Invalidate(LeadRectDHelper.Empty);

   // 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)
   {
      // realize
      automation.RealizeAllRedactions();
      Debug.WriteLine("Redaction objects have been realized");
   }
   else if (automation.CanRestoreAllRedactions)
   {
      // restore
      automation.RestoreAllRedactions();
      Debug.WriteLine("Redaction objects have been restored");
   }
   else
      Debug.WriteLine("Cannot realize or restore because no redaction object is currently in this automation");

   automation.Invalidate(LeadRectDHelper.Empty);
}
Requirements

Target Platforms

See Also

Reference

AnnAutomation Class
AnnAutomation Members

Error processing SSI file
  Leadtools.Annotations.Automation requires a Document or Medical toolkit license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features