←Select platform

CanRestoreAllRedactions Property

Summary
Gets a value that indicates whether any AnnRedactionObject objects in this AnnAutomation can be restored.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public virtual bool CanRestoreAllRedactions { get; } 
@property (nonatomic, assign, readonly) BOOL canRestoreAllRedactions; 
public boolean canRestoreAllRedactions() 
public:  
   virtual property bool CanRestoreAllRedactions 
   { 
      bool get() 
   } 
CanRestoreAllRedactions # get  (AnnAutomation) 

Property Value

true if any AnnRedactionObject object in this AnnAutomation can be restored; otherwise, it is false.

Remarks

This property will determine whether there is at least one AnnRedactionObject currently in this AnnAutomation that can be restored. The value of AnnRedactionObject.CanRestore must be true in order to be able to restore an AnnRedactionObject.

Use the RestoreAllRedactions method to restore all of the AnnRedactionObject objects in this AnnAutomation that have not been restored.

Example
C#
using Leadtools.Annotations.Automation; 
 
using Leadtools.Annotations.Engine; 
using Leadtools.Codecs; 
using Leadtools.Controls; 
using Leadtools.Annotations.Rendering; 
using Leadtools.Annotations.WinForms; 
 
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); 
} 
Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations.Automation Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.