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
infoSerializationInfoSerializationInfo
contextStreamingContextStreamingContext
ColorSetting(string, string)
public ColorSetting(string settingName, string resourceId)
Parameters
Properties
Color
public Color Color { get; set; }
Property Value
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
Label
public override string Label { get; }
Property Value
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
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
buttonPropertyEntryButtonthe 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
infoSerializationInforeceives the data
contextStreamingContextthe destination of the serialization
Operators
implicit operator Color(ColorSetting)
public static implicit operator Color(ColorSetting cs)
Parameters
csColorSetting