Table of Contents

Class ColorSetting

Namespace
CADability
Assembly
CADability.dll

ColorSetting is intended for objects to be used in Settings. It provides a Color with the IShowProperty interface.

public class ColorSetting : IShowPropertyImpl, IShowProperty, IPropertyEntry, ISerializable, ISettingChanged
Inheritance
ColorSetting
Implements
Inherited Members

Constructors

ColorSetting()

public ColorSetting()

ColorSetting(SerializationInfo, StreamingContext)

Constructor required by deserialization

protected ColorSetting(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

SerializationInfo

context StreamingContext

StreamingContext

ColorSetting(string, string)

public ColorSetting(string settingName, string resourceId)

Parameters

settingName string
resourceId string

Properties

Color

public Color Color { get; set; }

Property Value

Color

Flags

Implementation of Flags for the current property page, derived from the older properties of this class: the LabelType flags (which have the same values), GroupTitle or Seperator from EntryType, DropDown from HasDropDownButton, ValueEditable from ValueIsEditable and HasSubEntries when SubEntriesCount is greater than 0.

public override PropertyEntryType Flags { get; }

Property Value

PropertyEntryType

Label

Implementation of Label: returns LabelText.

public override string Label { get; }

Property Value

string

Value

Implementation of Value: the text shown in the value column. The default is null, which means the entry has no value column; entries that show a value override it.

public override string Value { get; }

Property Value

string

Methods

ButtonClicked(PropertyEntryButton)

Implementation of ButtonClicked(PropertyEntryButton). The base implementation throws a NotImplementedException; an entry whose Flags announce a button (OK, cancel, check box, lock symbol, direct menu, value as button) must override it.

public override void ButtonClicked(PropertyEntryButton button)

Parameters

button PropertyEntryButton

the button that was clicked

GetObjectData(SerializationInfo, StreamingContext)

Writes the data of this object for the legacy binary serialization (ISerializable). Files are written in the JSON format (IJsonSerialize) now; the binary format is still read.

public void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

receives the data

context StreamingContext

the destination of the serialization

Operators

implicit operator Color(ColorSetting)

public static implicit operator Color(ColorSetting cs)

Parameters

cs ColorSetting

Returns

Color