←Select platform

RealizeRedaction Method

Summary

Realizes the AnnRedactionObject object currently being edited (selected).

Syntax

C#
VB
C++
public virtual void RealizeRedaction() 
  
Public Overridable Sub RealizeRedaction()  
public: 
virtual void RealizeRedaction();  

Remarks

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

This method will call the Realize method of the AnnRedactionObject class.

Example

C#
VB
Silverlight C#
Silverlight VB
using Leadtools.Windows.Controls; 
using Leadtools.Windows.Annotations; 
using Leadtools.Demos; 
using Leadtools.Help; 
 
private void AnnAutomation_RealizeRedaction(AnnAutomation automation) 
{ 
   // first add a new redaction object to the automation 
   AnnRedactionObject redaction = new AnnRedactionObject(); 
   redaction.Rect = new Rect(100, 100, 100, 100); 
   automation.Container.Children.Add(redaction); 
 
   // make sure no objects are selected in the automation 
   automation.SelectNone(); 
 
   // see if we can realize or restore the object (this should show a message informing you  
   // that no objects are currently selected (bring edited) 
   RealizeRestoreRedaction(automation); 
 
   // select (edit) the object we have just added 
   automation.StartEditing(redaction, false); 
 
   // see if we can realize/restore the object (should realize the redaction) 
   RealizeRestoreRedaction(automation); 
 
   // see if we can realize/restore the object (should restore the redaction) 
   RealizeRestoreRedaction(automation); 
} 
 
private void RealizeRestoreRedaction(AnnAutomation automation) 
{ 
   // first, check if we can realize or restore the object 
   if (automation.CanRealizeRedaction) 
   { 
      // realize 
      automation.RealizeRedaction(); 
      MessageBox.Show("Redaction object has been realized"); 
   } 
   else if (automation.CanRestoreRedaction) 
   { 
      // restore this object 
      automation.RestoreRedaction(); 
      MessageBox.Show("Redaction object has been restored"); 
   } 
   else 
      MessageBox.Show("Cannot realize or restore because no redaction object is currently being edited (selected)"); 
} 
Imports Leadtools.Windows.Controls 
Imports Leadtools.Windows.Annotations 
 
Private Sub AnnAutomation_RealizeRedaction(ByVal automation As AnnAutomation) 
   ' first add a new redaction object to the automation 
   Dim redaction As AnnRedactionObject = New AnnRedactionObject() 
   redaction.Rect = New Rect(100, 100, 100, 100) 
   automation.Container.Children.Add(redaction) 
 
   ' make sure no objects are selected in the automation 
   automation.SelectNone() 
 
   ' see if we can realize or restore the object (this should show a message informing you that  
   'no objects are currently selected (bring edited) 
   RealizeRestoreRedaction(automation) 
 
   ' select (edit) the object we have just added 
   automation.StartEditing(redaction, False) 
 
   ' see if we can realize/restore the object (should realize the redaction) 
   RealizeRestoreRedaction(automation) 
 
   ' see if we can realize/restore the object (should restore the redaction) 
   RealizeRestoreRedaction(automation) 
End Sub 
 
Private Sub RealizeRestoreRedaction(ByVal automation As AnnAutomation) 
   ' first, check if we can realize or restore the object 
   If automation.CanRealizeRedaction Then 
      ' realize 
      automation.RealizeRedaction() 
      MessageBox.Show("Redaction object has been realized") 
   ElseIf automation.CanRestoreRedaction Then 
      ' restore this object 
      automation.RestoreRedaction() 
      MessageBox.Show("Redaction object has been restored") 
   Else 
      MessageBox.Show("Cannot realize or restore because no redaction object is currently being edited (selected)") 
   End If 
End Sub 
using Leadtools.Windows.Controls; 
using Leadtools.Windows.Annotations; 
using Leadtools.Examples; 
using Leadtools.Silverlight.Demos; 
//using Leadtools.Help; 
 
private void AnnAutomation_RealizeRedaction(AnnAutomation automation) 
{ 
   // first add a new redaction object to the automation 
   AnnRedactionObject redaction = new AnnRedactionObject(); 
   redaction.Rect = new Rect(100, 100, 100, 100); 
   automation.Container.Children.Add(redaction); 
 
   // make sure no objects are selected in the automation 
   automation.SelectNone(); 
 
   // see if we can realize or restore the object (this should show a message informing you that no  
   // objects are currently selected (being edited) 
   RealizeRestoreRedaction(automation); 
 
   // select (edit) the object we have just added 
   automation.StartEditing(redaction, false); 
 
   // see if we can realize/restore the object (should realize the redaction) 
   RealizeRestoreRedaction(automation); 
 
   // see if we can realize/restore the object (should restore the redaction) 
   RealizeRestoreRedaction(automation); 
} 
 
private void RealizeRestoreRedaction(AnnAutomation automation) 
{ 
   // first, check if we can realize or restore the object 
   if (automation.CanRealizeRedaction) 
   { 
      // realize 
      automation.RealizeRedaction(); 
      MessageBox.Show("Redaction object has been realized"); 
   } 
   else if (automation.CanRestoreRedaction) 
   { 
      // restore this object 
      automation.RestoreRedaction(); 
      MessageBox.Show("Redaction object has been restored"); 
   } 
   else 
      MessageBox.Show("Cannot realize or restore because no redaction object is currently being edited (selected)"); 
} 
Imports Leadtools.Windows.Controls 
Imports Leadtools.Windows.Annotations 
Imports Leadtools.Silverlight.Demos 
'using Leadtools.Help; 
 
Private Sub AnnAutomation_RealizeRedaction(ByVal automation As AnnAutomation) 
   ' first add a new redaction object to the automation 
   Dim redaction As AnnRedactionObject = New AnnRedactionObject() 
   redaction.Rect = New Rect(100, 100, 100, 100) 
   automation.Container.Children.Add(redaction) 
 
   ' make sure no objects are selected in the automation 
   automation.SelectNone() 
 
   ' see if we can realize or restore the object (this should show a message informing you  
   ' that no objects are currently selected (bring edited) 
   RealizeRestoreRedaction(automation) 
 
   ' select (edit) the object we have just added 
   automation.StartEditing(redaction, False) 
 
   ' see if we can realize/restore the object (should realize the redaction) 
   RealizeRestoreRedaction(automation) 
 
   ' see if we can realize/restore the object (should restore the redaction) 
   RealizeRestoreRedaction(automation) 
End Sub 
 
Private Sub RealizeRestoreRedaction(ByVal automation As AnnAutomation) 
   ' first, check if we can realize or restore the object 
   If automation.CanRealizeRedaction Then 
      ' realize 
      automation.RealizeRedaction() 
      MessageBox.Show("Redaction object has been realized") 
   ElseIf automation.CanRestoreRedaction Then 
      ' restore this object 
      automation.RestoreRedaction() 
      MessageBox.Show("Redaction object has been restored") 
   Else 
      MessageBox.Show("Cannot realize or restore because no redaction object is currently being edited (selected)") 
   End If 
End Sub 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Windows.Annotations Assembly