Show / Hide Table of Contents

Class IGeoObjectImpl.Changing

Helper class to wrap any changing of this GeoObject. Usually used in this way:

    using (new Changing(this,...))
    {
        // ... make the change here ...
    }

This will call FireWillChange(GeoObjectChange) before the GeoObject is changed and FireDidChange(GeoObjectChange) after the GeoObject was changed with the appropriate parameters. Changig takes nested changes into account and raises the events only at the outermost level.

Inheritance
System.Object
IGeoObjectImpl.Changing
IGeoObjectImpl.ChangingAttribute
Implements
System.IDisposable
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()
Namespace: CADability.GeoObject
Assembly: CADability.dll
Syntax
protected class Changing : IDisposable

Constructors

| Improve this Doc View Source

Changing(IGeoObjectImpl)

Changing geometrical aspects of an GeoObject. A Clone() of this GeoObject is made and saved and CopyGeometry(IGeoObject) might be called with that clone later when there is an undo.

Declaration
public Changing(IGeoObjectImpl geoObject)
Parameters
Type Name Description
IGeoObjectImpl geoObject

the GeoObject

| Improve this Doc View Source

Changing(IGeoObjectImpl, Boolean)

Changing geometrical aspects of an GeoObject. A Clone() of this GeoObject is made and saved and CopyGeometry(IGeoObject) might be called with that clone later when there is an undo.

Declaration
public Changing(IGeoObjectImpl geoObject, bool UndoNecessary)
Parameters
Type Name Description
IGeoObjectImpl geoObject

the GeoObject

System.Boolean UndoNecessary

true, if undo is required

| Improve this Doc View Source

Changing(IGeoObjectImpl, Boolean, Boolean)

Changing geometrical aspects of an GeoObject. A Clone() of this GeoObject is made and saved and CopyGeometry(IGeoObject) might be called with that clone later when there is an undo.

Declaration
public Changing(IGeoObjectImpl geoObject, bool UndoNecessary, bool onlyAttribute)
Parameters
Type Name Description
IGeoObjectImpl geoObject

the GeoObject

System.Boolean UndoNecessary
System.Boolean onlyAttribute
| Improve this Doc View Source

Changing(IGeoObjectImpl, Boolean, Boolean, String, Object[])

Changing a GeoObject with a specification on how to undo that change. Undo might be performed later vie reflection. So we need the name of the method here and the parameters for that method.

Declaration
public Changing(IGeoObjectImpl geoObject, bool noUndo, bool onlyAttribute, string MethodOrPropertyName, params object[] Parameters)
Parameters
Type Name Description
IGeoObjectImpl geoObject

the GeoObject

System.Boolean noUndo

true if no undo is required, false otherwise

System.Boolean onlyAttribute

true if only an attribute is changed not the geometry

System.String MethodOrPropertyName

name of a public method that might be called later by undo

System.Object[] Parameters

parameters for the method

| Improve this Doc View Source

Changing(IGeoObjectImpl, String)

Changing a property, that has public get and set methods, and has only one property with this name. On construction the value of that property will be requested by a reflection call to "get_PropertyName"

Declaration
public Changing(IGeoObjectImpl geoObject, string PropertyName)
Parameters
Type Name Description
IGeoObjectImpl geoObject

The GeoObject

System.String PropertyName

The Name of the property

| Improve this Doc View Source

Changing(IGeoObjectImpl, String, Object[])

Changing a GeoObject with a specification on how to undo that change. Undo might be performed later vie reflection. So we need the name of the method here and the parameters for that method.

Declaration
public Changing(IGeoObjectImpl geoObject, string MethodOrPropertyName, params object[] Parameters)
Parameters
Type Name Description
IGeoObjectImpl geoObject

the GeoObject

System.String MethodOrPropertyName

name of a public method that might be called later by undo

System.Object[] Parameters

parameters for the method

| Improve this Doc View Source

Changing(IGeoObjectImpl, Type, String, Object[])

Changing a GeoObject with a specification on how to undo that change. Undo might be performed later vie reflection. So we need the name of the method here and the parameters for that method. The method must be in the given interface.

Declaration
public Changing(IGeoObjectImpl geoObject, Type interfaceForMethod, string MethodOrPropertyName, params object[] Parameters)
Parameters
Type Name Description
IGeoObjectImpl geoObject

the GeoObject

System.Type interfaceForMethod

the type of the interface which contains the method

System.String MethodOrPropertyName

name of a public method that might be called later by undo

System.Object[] Parameters

parameters for the method

Methods

| Improve this Doc View Source

Dispose()

Implements IDisposable.Dispose. Calls FireDidChange(GeoObjectChange) when not inside a nested changing.

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

NoUndoNecessary()

Sets NoUndoNecessary to true for the parameter of the call to FireWillChange(GeoObjectChange) and FireDidChange(GeoObjectChange).

Declaration
public void NoUndoNecessary()

Implements

System.IDisposable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX