System.Object
Eplan.EplApi.DataModel.ProjectEventsProvider
System.Object
Eplan.EplApi.DataModel.ProjectEventsProvider
ProjectEventsProvider
tracks changes made only by current instance of P8. When making changes, please use Eplan.EplApi.HEServices.ChangeInfoService in order to disable notification and avoid infinite recursion.ProjectEventsProvider
.
public class EventListener : IDisposable { public EventListener() { oProjectEventsProvider.AddAnyChangeHandler( AnyChangeEvent_Handler); } public void Dispose() { oProjectEventsProvider.RemoveAnyChangeHandler( AnyChangeEvent_Handler); } public void AnyChangeEvent_Handler(StorableObject[] createdObjects, StorableObject[] changedObjects, String[] destroyedObjects) { foreach (StorableObject oStorableObject in createdObjects) { if (oStorableObject is Function) { Function oFunction = oStorableObject as Function; System.Console.WriteLine("Function created : " + oFunction.Name); } } } private ProjectEventsProvider oProjectEventsProvider = new ProjectEventsProvider(); } EventListener oEventListener = new EventListener();
Name | Description | |
---|---|---|
ProjectEventsProvider Constructor | Constructor |
Name | Description | |
---|---|---|
AddAnyChangeHandler | Adds project events handler. | |
AddPreRemoveHandler | Adds pre remove events handler. | |
Dispose | Destructor for deterministic finalization of ProjectEventsProvider object. | |
RemoveAnyChangeHandler | Removes project events handler. | |
RemovePreRemoveHandler | Removes pre remove events handler. |