Drawing3d documented Class Library

MNComponent Members

MNComponent overview

Public Instance Constructors

MNComponent Constructor Initializes a new instance of the MNComponent class.

Public Instance Fields

Children
GenerateNames If GenerateNames is true, a Name will be generated, if the parent is set to a component which has no name. With GenerateNames is guaranteed, that every member of a tree (except the root) has a unique name and there is a fullpath, with which the element can be identified.
UpDateCount Sets or gets a counter. It will be incremented by the method UpDating and deremented by UpDated. If it is 0 then UpDate is called.

Public Instance Properties

Count Returns the count of children
Item The default indexer retrieves and sets MNComponents
Name Name of the component.
Parent Sets or gets the parent of the component and looks for the correct and unique name.
See also GenerateNames, setParent
Tag A free programmable property, which is not stored in a file.

Public Instance Methods

addChild Adds an elment in the list.
checkuniquename If the parent is setted, this method returns a name, consisting of value and a number, so that it is unique in his parent.
ChildByName Retrieves the index of child by a name.
ChildByPathName You can get a MNComponent by setting a fullpath relative to the given MNComponent. The names are seperated by "/".
MNComponent root = new MNComponent();
MNComponent a = new MNComponent();
MNComponent b = new MNComponent();
MNComponent c = new MNComponent();
a.Name = "Frank";
b.Name = "Joe";
c.Name = "Sam";
c.Parent = b;
b.Parent = a;
a.Parent = root;
MNComponent d = root.ChildByPathName("Frank/Joe/Sam");
// d is then the component c

Equals (inherited from Object) 
fullPath Gives the full path of the component over all ancestors until a null-parent occurs. This parent is often called the root. To separate the names "/" is used.
GetEnumerator Returns the Enumerator of an intern ArrayList
GetHashCode (inherited from Object) 
getName Returns the name
getPath Returns a path, whose member are separated by "/" beginning with "/"
getRoot Implements the ISerializePath interface. If parent is null then it returns the object itself.
GetType (inherited from Object) 
InsertChild Insert a MNComponentobject at position index.
MoveTO Moves a children-component to a position
RemoveChild Removes a component.
ToString (inherited from Object) 
UpDate This protected method is called, if some changes are made. Some times on should inform other components about this changes to obtain a consisting system.
UpDated If you change anything in the component, you should first call
UpDating()
..Change some things
UpDated()
In this case the method UpDate will be called only one time. The counter UpDateCount will be incremented for UpDating and decremented by UpDated. If he is 0 then UpDate is called. See UpDating
UpDating f you change anything in the component, you should first call
UpDating()
..Change some things
UpDated()
In this case the method UpDate will be called only one time. The counter UpDateCount will be incremented for UpDating and decremented by UpDated. If he is 0, UpDate is called. See UpDated

Public Instance Events

OnDisposed
OnUpdate This event is called by UpDate
OnUpdating This event is called by UpDating

Protected Instance Methods

Disposed Setzt den Parent auf null.
Finalize (inherited from Object) 
MemberwiseClone (inherited from Object) 
setParent Virtual set-Method of the property Parent.

See Also

MNComponent Class | Drawing3d Namespace