Gets a value indicating whether this AnnAutomation is in a state where all objects can be selected.
public virtual bool CanSelectAll { get; } Public Overridable ReadOnly Property CanSelectAll As Boolean
public:virtual property bool CanSelectAll {bool get();}
true if all objects in this AnnAutomation can be selected; otherwise, false.
If the AnnAutomation contains one or more AnnObject objects, then this property will return true. Selecting an object in AnnAutomation is the equivalent of starting its AnnEditDesigner. Call the SelectAll method to select all of the automation objects.
For information about grouping and ungrouping, refer to Grouping and Ungrouping Annotation Objects (Deprecated).
This example adds a few objects into an automation and then selects and deselects them.
using Leadtools;using Leadtools.Annotations;using Leadtools.WinForms;using Leadtools.Drawing;public void AnnAutomation_CanSelectAll(AnnAutomation automation){// first make sure no objects are in this automation containerautomation.Container.Objects.Clear();automation.Viewer.Invalidate();MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone));// add two objects to the automationAnnRectangleObject rectObj = new AnnRectangleObject();rectObj.Bounds = new AnnRectangle(100, 100, 100, 100, AnnUnit.Pixel);rectObj.Pen = new AnnPen(Color.Blue, new AnnLength(1, AnnUnit.Pixel));rectObj.Brush = null;automation.Container.Objects.Add(rectObj);automation.Viewer.Invalidate(rectObj.InvalidRectangle);AnnLineObject lineObj = new AnnLineObject();lineObj.StartPoint = new AnnPoint(100, 100, AnnUnit.Pixel);lineObj.EndPoint = new AnnPoint(200, 200, AnnUnit.Pixel);lineObj.Pen = new AnnPen(Color.Red, new AnnLength(1, AnnUnit.Pixel));automation.Container.Objects.Add(lineObj);automation.Viewer.Invalidate(lineObj.InvalidRectangle);MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone));// select all the objectsif (automation.CanSelectAll){automation.SelectAll();MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone));}// deselect all the objectsif (automation.CanSelectNone){automation.SelectNone();MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone));}}
Imports LeadtoolsImports Leadtools.AnnotationsImports Leadtools.WinFormsImports Leadtools.DrawingPublic Sub AnnAutomation_CanSelectAll(ByVal automation As AnnAutomation)' first make sure no objects are in this automation containerautomation.Container.Objects.Clear()automation.Viewer.Invalidate()MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone))' add two objects to the automationDim rectObj As AnnRectangleObject = New AnnRectangleObject()rectObj.Bounds = New AnnRectangle(100, 100, 100, 100, AnnUnit.Pixel)rectObj.Pen = New AnnPen(Color.Blue, New AnnLength(1, AnnUnit.Pixel))rectObj.Brush = Nothingautomation.Container.Objects.Add(rectObj)automation.Viewer.Invalidate(rectObj.InvalidRectangle)Dim lineObj As AnnLineObject = New AnnLineObject()lineObj.StartPoint = New AnnPoint(100, 100, AnnUnit.Pixel)lineObj.EndPoint = New AnnPoint(200, 200, AnnUnit.Pixel)lineObj.Pen = New AnnPen(Color.Red, New AnnLength(1, AnnUnit.Pixel))automation.Container.Objects.Add(lineObj)automation.Viewer.Invalidate(lineObj.InvalidRectangle)MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone))' select all the objectsIf automation.CanSelectAll Thenautomation.SelectAll()MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone))End If' deselect all the objectsIf automation.CanSelectNone Thenautomation.SelectNone()MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone))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
