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
Settings
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.Serialization.IDeserializationCallback
Inherited Members
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()
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
|
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
Field Value
| Type |
Description |
| System.String |
|
Properties
|
Improve this Doc
View Source
ColorList
Declaration
public ColorList ColorList { get; }
Property Value
|
Improve this Doc
View Source
DimensionStyleList
Declaration
public DimensionStyleList DimensionStyleList { get; }
Property Value
|
Improve this Doc
View Source
EntryType
Declaration
public override ShowPropertyEntryType EntryType { get; }
Property Value
Overrides
|
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
|
Improve this Doc
View Source
HatchStyleList
Declaration
public HatchStyleList HatchStyleList { get; }
Property Value
|
Improve this Doc
View Source
HelpLink
Declaration
public override string HelpLink { get; }
Property Value
| Type |
Description |
| System.String |
|
Overrides
|
Improve this Doc
View Source
LayerList
Declaration
public LayerList LayerList { get; }
Property Value
|
Improve this Doc
View Source
LinePatternList
Declaration
public LinePatternList LinePatternList { get; }
Property Value
|
Improve this Doc
View Source
LineWidthList
Declaration
public LineWidthList LineWidthList { get; }
Property Value
|
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
|
Improve this Doc
View Source
SubEntries
Overrides SubEntries,
returns the subentries in this property view.
Declaration
public override IShowProperty[] SubEntries { get; }
Property Value
Overrides
|
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
Methods
|
Improve this Doc
View Source
Added(IPropertyPage)
Declaration
public override void Added(IPropertyPage propertyTreeView)
Parameters
Overrides
|
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
|
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
|
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
Overrides
|
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
Explicit Interface Implementations
|
Improve this Doc
View Source
IAttributeListContainer.Add(String, IAttributeList)
Declaration
void IAttributeListContainer.Add(string KeyName, IAttributeList ToAdd)
Parameters
|
Improve this Doc
View Source
IAttributeListContainer.AttributeChanged(IAttributeList, INamedAttribute, ReversibleChange)
Declaration
void IAttributeListContainer.AttributeChanged(IAttributeList list, INamedAttribute attribute, ReversibleChange change)
Parameters
|
Improve this Doc
View Source
IAttributeListContainer.GetList(String)
Declaration
IAttributeList IAttributeListContainer.GetList(string keyName)
Parameters
| Type |
Name |
Description |
| System.String |
keyName |
|
Returns
|
Improve this Doc
View Source
IAttributeListContainer.List(Int32)
Declaration
IAttributeList IAttributeListContainer.List(int keyIndex)
Parameters
| Type |
Name |
Description |
| System.Int32 |
keyIndex |
|
Returns
|
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
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IAttributeListContainer.UpdateList(IAttributeList)
Declaration
void IAttributeListContainer.UpdateList(IAttributeList list)
Parameters
|
Improve this Doc
View Source
IJsonSerialize.GetObjectData(IJsonWriteData)
Declaration
void IJsonSerialize.GetObjectData(IJsonWriteData data)
Parameters
|
Improve this Doc
View Source
IJsonSerialize.SetObjectData(IJsonReadData)
Declaration
void IJsonSerialize.SetObjectData(IJsonReadData data)
Parameters
|
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
System.Runtime.Serialization.ISerializable
System.Runtime.Serialization.IDeserializationCallback