Show / Hide Table of Contents

Class Settings

This class is used to give access and store information that influences global behavior of the CADability system. There is a static variable GlobalSettings. This is the only use of settings in CADability. This class behaves as a hierarchical dictionary. The keys are strings, which may have the form "mainkey.subkey" The values are objects, i.e. any kind of data. If the objects implement the IShowProperty interface they are displayed in the global setting tab of the controlcenter. There are some classes like ColorSetting, IntegerProperty, DoubleProperty, StringProperty which can be used as a setting value. If you instead simply use a double or string value the setting will be only available to programming code but not to the user in the ControlCenter.

Inheritance
System.Object
IShowPropertyImpl
Settings
Implements
IShowProperty
IPropertyEntry
System.Runtime.Serialization.ISerializable
ISettingChanged
IAttributeListContainer
System.Runtime.Serialization.IDeserializationCallback
IJsonSerialize
IJsonSerializeDone
Inherited Members
IShowPropertyImpl.propertyTreeView
IShowPropertyImpl.labelText
IShowPropertyImpl.resourceId
IShowPropertyImpl.flagsToSuppress
IShowPropertyImpl.SuppressFlags(ShowPropertyLabelFlags)
IShowPropertyImpl.Frame
IShowPropertyImpl.IShowProperty.Added(IPropertyTreeView)
IShowPropertyImpl.Added(IPropertyTreeView)
IShowPropertyImpl.Selected()
IShowPropertyImpl.UnSelected()
IShowPropertyImpl.ChildSelected(IShowProperty)
IShowPropertyImpl.Opened(Boolean)
IShowPropertyImpl.Removed(IPropertyTreeView)
IShowPropertyImpl.ShowOpen(Boolean)
IShowPropertyImpl.Select()
IShowPropertyImpl.LabelText
IShowPropertyImpl.InfoText
IShowPropertyImpl.LabelType
IShowPropertyImpl.OwnerDrawHeight
IShowPropertyImpl.IShowProperty.SetTabIndex(Int32)
IShowPropertyImpl.StateChangedEvent
IShowPropertyImpl.LabelChanged(String)
IShowPropertyImpl.SetFocus()
IShowPropertyImpl.Hidden
IShowPropertyImpl.ReadOnly
IShowPropertyImpl.Refresh()
IShowPropertyImpl.OnEnterPressed()
IShowPropertyImpl.OnVisibilityChanged(Boolean)
IShowPropertyImpl.IsSelected
IShowPropertyImpl.Concat(IShowProperty[], IShowProperty[])
IShowPropertyImpl.Update(IShowProperty)
IShowPropertyImpl.SelectedBckgColor
IShowPropertyImpl.SelectedTextColor
IShowPropertyImpl.UnselectedBckgColor
IShowPropertyImpl.UnselectedTextColor
IShowPropertyImpl.IPropertyEntry.IsOpen
IShowPropertyImpl.HasDropDownButton
IShowPropertyImpl.ValueIsEditable
IShowPropertyImpl.Flags
IShowPropertyImpl.Label
IShowPropertyImpl.Value
IShowPropertyImpl.ResourceId
IShowPropertyImpl.Parent
IShowPropertyImpl.SubItems
IShowPropertyImpl.ButtonClicked(PropertyEntryButton)
IShowPropertyImpl.OpenOrCloseSubEntries()
IShowPropertyImpl.propertyPage
IShowPropertyImpl.ContextMenu
IShowPropertyImpl.GetDropDownList()
IShowPropertyImpl.StartEdit(Boolean)
IShowPropertyImpl.EndEdit(Boolean, Boolean, String)
IShowPropertyImpl.EditTextChanged(String)
IShowPropertyImpl.IPropertyEntry.Index
IShowPropertyImpl.IPropertyEntry.IndentLevel
IShowPropertyImpl.Selected(IPropertyEntry)
IShowPropertyImpl.UnSelected(IPropertyEntry)
IShowPropertyImpl.ListBoxSelected(Int32)
IShowPropertyImpl.DeferUpdate
IShowPropertyImpl.PropertyEntryChangedStateEvent
IShowPropertyImpl.PropertyEntryChangedState(StateChangedArgs)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CADability
Assembly: CADability.dll
Syntax
[Serializable]
public class Settings : IShowPropertyImpl, IShowProperty, IPropertyEntry, ISerializable, ISettingChanged, IAttributeListContainer, IDeserializationCallback, IJsonSerialize, IJsonSerializeDone

Constructors

| Improve this Doc View Source

Settings()

Declaration
public Settings()
| Improve this Doc View Source

Settings(SerializationInfo, StreamingContext)

Constructor required by deserialization

Declaration
protected Settings(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info

SerializationInfo

System.Runtime.Serialization.StreamingContext context

StreamingContext

| Improve this Doc View Source

Settings(String)

Declaration
public Settings(string ResourceID)
Parameters
Type Name Description
System.String ResourceID

Fields

| Improve this Doc View Source

myName

Declaration
protected string myName
Field Value
Type Description
System.String

Properties

| Improve this Doc View Source

ColorList

Declaration
public ColorList ColorList { get; }
Property Value
Type Description
ColorList
| Improve this Doc View Source

DimensionStyleList

Declaration
public DimensionStyleList DimensionStyleList { get; }
Property Value
Type Description
DimensionStyleList
| Improve this Doc View Source

EntryType

Overrides EntryType, returns GroupTitle.

Declaration
public override ShowPropertyEntryType EntryType { get; }
Property Value
Type Description
ShowPropertyEntryType
Overrides
IShowPropertyImpl.EntryType
| Improve this Doc View Source

GlobalSettings

The global settings contain many different settings or configurations for the program execution. The settings are displayed in the "global" tab of the controlcenter. User code may add or remove settings. AddSetting(String, Object).

Declaration
public static Settings GlobalSettings { get; set; }
Property Value
Type Description
Settings
| Improve this Doc View Source

HatchStyleList

Declaration
public HatchStyleList HatchStyleList { get; }
Property Value
Type Description
HatchStyleList
| Improve this Doc View Source

HelpLink

Declaration
public override string HelpLink { get; }
Property Value
Type Description
System.String
Overrides
IShowPropertyImpl.HelpLink
| Improve this Doc View Source

LayerList

Declaration
public LayerList LayerList { get; }
Property Value
Type Description
LayerList
| Improve this Doc View Source

LinePatternList

Declaration
public LinePatternList LinePatternList { get; }
Property Value
Type Description
LinePatternList
| Improve this Doc View Source

LineWidthList

Declaration
public LineWidthList LineWidthList { get; }
Property Value
Type Description
LineWidthList
| Improve this Doc View Source

Modified

Declaration
public bool Modified { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

StyleList

Declaration
public StyleList StyleList { get; }
Property Value
Type Description
StyleList
| Improve this Doc View Source

SubEntries

Overrides SubEntries, returns the subentries in this property view.

Declaration
public override IShowProperty[] SubEntries { get; }
Property Value
Type Description
IShowProperty[]
Overrides
IShowPropertyImpl.SubEntries
| Improve this Doc View Source

SubEntriesCount

Overrides SubEntriesCount, returns the number of subentries in this property view.

Declaration
public override int SubEntriesCount { get; }
Property Value
Type Description
System.Int32
Overrides
IShowPropertyImpl.SubEntriesCount

Methods

| Improve this Doc View Source

Added(IPropertyPage)

Declaration
public override void Added(IPropertyPage propertyTreeView)
Parameters
Type Name Description
IPropertyPage propertyTreeView
Overrides
IShowPropertyImpl.Added(IPropertyPage)
| Improve this Doc View Source

AddSetting(String, Object)

Declaration
public void AddSetting(string Name, object Value)
Parameters
Type Name Description
System.String Name
System.Object Value
| Improve this Doc View Source

AllowOpenCascadeMultiThreading(Boolean)

Declaration
public static void AllowOpenCascadeMultiThreading(bool allow)
Parameters
Type Name Description
System.Boolean allow
| Improve this Doc View Source

ContainsSetting(String)

Declaration
public bool ContainsSetting(string Name)
Parameters
Type Name Description
System.String Name
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Dispose()

Declaration
public void Dispose()
| Improve this Doc View Source

GetAllKeys()

Declaration
public string[] GetAllKeys()
Returns
Type Description
System.String[]
| Improve this Doc View Source

GetBoolValue(Object)

Wandelt das im Parameter gegebene Objekt in den Typ bool um. Werte vom Typ bool können auf zwei Arten in den Settings gespeichert sein: einmal als primitiver bool Typ und einmal als Booleanproperty Typ. Letzterer hat noch Informationen, wie er interaktiv durch den Anwender in einem ShowProperty Control geändert werden kann. Wenn das gegebene Objekt einen anderen Typ hat, dann gibt es eine InvalidCastException.

Declaration
public static bool GetBoolValue(object TheValue)
Parameters
Type Name Description
System.Object TheValue

ein Objekt, gewöhnlich aus den Einstellungen

Returns
Type Description
System.Boolean

der bool Wert des Objektes

| Improve this Doc View Source

GetBoolValue(String, Boolean)

Declaration
public bool GetBoolValue(string Name, bool DefaultValue)
Parameters
Type Name Description
System.String Name
System.Boolean DefaultValue
Returns
Type Description
System.Boolean
| Improve this Doc View Source

GetDoubleValue(Object)

Declaration
public static double GetDoubleValue(object TheValue)
Parameters
Type Name Description
System.Object TheValue
Returns
Type Description
System.Double
| Improve this Doc View Source

GetDoubleValue(String, Double)

Declaration
public double GetDoubleValue(string Name, double DefaultValue)
Parameters
Type Name Description
System.String Name
System.Double DefaultValue
Returns
Type Description
System.Double
| Improve this Doc View Source

GetIntValue(Object)

Declaration
public static int GetIntValue(object TheValue)
Parameters
Type Name Description
System.Object TheValue
Returns
Type Description
System.Int32
| Improve this Doc View Source

GetIntValue(String, Int32)

Declaration
public int GetIntValue(string Name, int DefaultValue)
Parameters
Type Name Description
System.String Name
System.Int32 DefaultValue
Returns
Type Description
System.Int32
| Improve this Doc View Source

GetObjectData(SerializationInfo, StreamingContext)

Implements System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)

Declaration
public void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info

The System.Runtime.Serialization.SerializationInfo to populate with data.

System.Runtime.Serialization.StreamingContext context

The destination (System.Runtime.Serialization.StreamingContext) for this serialization.

| Improve this Doc View Source

GetStringValue(String, String)

Declaration
public string GetStringValue(string Name, string DefaultValue)
Parameters
Type Name Description
System.String Name
System.String DefaultValue
Returns
Type Description
System.String
| Improve this Doc View Source

GetSubSetting(String)

Declaration
public Settings GetSubSetting(string Name)
Parameters
Type Name Description
System.String Name
Returns
Type Description
Settings
| Improve this Doc View Source

GetValue(String)

Declaration
public object GetValue(string Name)
Parameters
Type Name Description
System.String Name
Returns
Type Description
System.Object
| Improve this Doc View Source

LoadGlobalSettings(String)

Declaration
public static void LoadGlobalSettings(string FileName)
Parameters
Type Name Description
System.String FileName
| Improve this Doc View Source

OnDeserialization()

Declaration
protected void OnDeserialization()
| Improve this Doc View Source

RearrangeSetting(String, String, Boolean)

Declaration
public void RearrangeSetting(string toMove, string moveTo, bool setBefore)
Parameters
Type Name Description
System.String toMove
System.String moveTo
System.Boolean setBefore
| Improve this Doc View Source

RefreshSubentries()

Declaration
public void RefreshSubentries()
| Improve this Doc View Source

Removed(IPropertyPage)

Declaration
public override void Removed(IPropertyPage propertyTreeView)
Parameters
Type Name Description
IPropertyPage propertyTreeView
Overrides
IShowPropertyImpl.Removed(IPropertyPage)
| Improve this Doc View Source

RemoveSetting(String)

Declaration
public void RemoveSetting(string Name)
Parameters
Type Name Description
System.String Name
| Improve this Doc View Source

SaveGlobalSettings()

Declaration
public static void SaveGlobalSettings()
| Improve this Doc View Source

SaveGlobalSettings(String)

Declaration
public static void SaveGlobalSettings(string FileName)
Parameters
Type Name Description
System.String FileName
| Improve this Doc View Source

SetValue(String, Object)

Declaration
public void SetValue(string Name, object NewValue)
Parameters
Type Name Description
System.String Name
System.Object NewValue
| Improve this Doc View Source

ShutDown()

GlobalSettings has registered the Application.ApplicationExit event. This call saves the settings and unregisters the event.

Declaration
public static void ShutDown()

Events

| Improve this Doc View Source

SettingChangedEvent

Declaration
public event SettingChangedDelegate SettingChangedEvent
Event Type
Type Description
SettingChangedDelegate

Explicit Interface Implementations

| Improve this Doc View Source

IAttributeListContainer.Add(String, IAttributeList)

Declaration
void IAttributeListContainer.Add(string KeyName, IAttributeList ToAdd)
Parameters
Type Name Description
System.String KeyName
IAttributeList ToAdd
| Improve this Doc View Source

IAttributeListContainer.AttributeChanged(IAttributeList, INamedAttribute, ReversibleChange)

Declaration
void IAttributeListContainer.AttributeChanged(IAttributeList list, INamedAttribute attribute, ReversibleChange change)
Parameters
Type Name Description
IAttributeList list
INamedAttribute attribute
ReversibleChange change
| Improve this Doc View Source

IAttributeListContainer.GetList(String)

Declaration
IAttributeList IAttributeListContainer.GetList(string keyName)
Parameters
Type Name Description
System.String keyName
Returns
Type Description
IAttributeList
| Improve this Doc View Source

IAttributeListContainer.List(Int32)

Declaration
IAttributeList IAttributeListContainer.List(int keyIndex)
Parameters
Type Name Description
System.Int32 keyIndex
Returns
Type Description
IAttributeList
| Improve this Doc View Source

IAttributeListContainer.ListCount

Declaration
int IAttributeListContainer.ListCount { get; }
Returns
Type Description
System.Int32
| Improve this Doc View Source

IAttributeListContainer.ListKeyName(Int32)

Declaration
string IAttributeListContainer.ListKeyName(int keyIndex)
Parameters
Type Name Description
System.Int32 keyIndex
Returns
Type Description
System.String
| Improve this Doc View Source

IAttributeListContainer.Remove(String)

Declaration
void IAttributeListContainer.Remove(string KeyName)
Parameters
Type Name Description
System.String KeyName
| Improve this Doc View Source

IAttributeListContainer.RemovingItem(IAttributeList, INamedAttribute, String)

Declaration
bool IAttributeListContainer.RemovingItem(IAttributeList list, INamedAttribute attribute, string resourceId)
Parameters
Type Name Description
IAttributeList list
INamedAttribute attribute
System.String resourceId
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IAttributeListContainer.UpdateList(IAttributeList)

Declaration
void IAttributeListContainer.UpdateList(IAttributeList list)
Parameters
Type Name Description
IAttributeList list
| Improve this Doc View Source

IJsonSerialize.GetObjectData(IJsonWriteData)

Declaration
void IJsonSerialize.GetObjectData(IJsonWriteData data)
Parameters
Type Name Description
IJsonWriteData data
| Improve this Doc View Source

IJsonSerialize.SetObjectData(IJsonReadData)

Declaration
void IJsonSerialize.SetObjectData(IJsonReadData data)
Parameters
Type Name Description
IJsonReadData data
| Improve this Doc View Source

IJsonSerializeDone.SerializationDone()

Declaration
void IJsonSerializeDone.SerializationDone()
| Improve this Doc View Source

IDeserializationCallback.OnDeserialization(Object)

Declaration
void IDeserializationCallback.OnDeserialization(object sender)
Parameters
Type Name Description
System.Object sender

Implements

IShowProperty
IPropertyEntry
System.Runtime.Serialization.ISerializable
ISettingChanged
IAttributeListContainer
System.Runtime.Serialization.IDeserializationCallback
IJsonSerialize
IJsonSerializeDone
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX