Table of Contents

Class LinePatternSelectionProperty

Namespace
CADability.UserInterface
Assembly
CADability.dll

A property page entry to select a LinePattern from a LinePatternList in a drop down list, optionally with an additional "undefined" entry. It either controls the line pattern of an ILinePattern object (the object is updated when the selection changes and the entry follows changes of the object) or reports the selected line pattern via LinePatternChangedEvent.

public class LinePatternSelectionProperty : MultipleChoiceProperty, IPropertyEntry, IShowProperty
Inheritance
LinePatternSelectionProperty
Implements
Inherited Members

Constructors

LinePatternSelectionProperty(string, LinePatternList, ILinePattern, bool)

Creates an entry which controls the line pattern of iLinePattern. The current line pattern of the object is preselected; if the object is an IGeoObject, the entry follows changes of its line pattern or style.

public LinePatternSelectionProperty(string ResourceID, LinePatternList linePatternList, ILinePattern iLinePattern, bool includeUndefined)

Parameters

ResourceID string

Resource id of the label text

linePatternList LinePatternList

The list providing the choices

iLinePattern ILinePattern

The object whose line pattern is edited

includeUndefined bool

true: an "undefined" entry (resource "LinePattern.Undefined") is offered as the first choice

LinePatternSelectionProperty(string, LinePatternList, LinePattern)

Creates an entry without the "undefined" choice which is not connected to an object; the selection is reported via LinePatternChangedEvent.

public LinePatternSelectionProperty(string ResourceID, LinePatternList linePatternList, LinePattern select)

Parameters

ResourceID string

Resource id of the label text

linePatternList LinePatternList

The list providing the choices

select LinePattern

The initially selected line pattern, or null for no selection

LinePatternSelectionProperty(string, LinePatternList, LinePattern, bool)

Creates an entry which is not connected to an object; the selection is reported via LinePatternChangedEvent.

public LinePatternSelectionProperty(string ResourceID, LinePatternList linePatternList, LinePattern select, bool includeUndefined)

Parameters

ResourceID string

Resource id of the label text

linePatternList LinePatternList

The list providing the choices

select LinePattern

The initially selected line pattern, or null for "undefined" resp. no selection

includeUndefined bool

true: an "undefined" entry (resource "LinePattern.Undefined") is offered as the first choice

Properties

Connected

The IGeoObject whose line pattern is controlled by this entry. Setting it connects the entry to the new object (which must implement ILinePattern): its line pattern is changed when the user selects an entry, and the entry is refreshed when the line pattern or style of the object changes.

public IGeoObject Connected { get; set; }

Property Value

IGeoObject

Methods

Added(IPropertyPage)

Implementation of Added(IPropertyPage): memorizes the page in propertyPage and reports Added. Override it to subscribe to events while the entry is displayed, and call the base implementation.

public override void Added(IPropertyPage propertyPage)

Parameters

propertyPage IPropertyPage

OnSelectionChanged(string)

Called when the user has picked a choice. Raises SelectionChangedEvent, stores the text in SelectedText and raises ValueChangedEvent. Derived classes override it to pass the selection on to the object they represent.

protected override void OnSelectionChanged(string selected)

Parameters

selected string

The selected text

Removed(IPropertyPage)

public override void Removed(IPropertyPage propertyPage)

Parameters

propertyPage IPropertyPage

the IPropertyTreeView from which it was removed

Events

LinePatternChangedEvent

Raised when the user selects a line pattern, before it is applied to the connected object (if any).

public event LinePatternSelectionProperty.LinePatternChangedDelegate LinePatternChangedEvent

Event Type

LinePatternSelectionProperty.LinePatternChangedDelegate