Application

All application related events and properties are attached to the application (CscScriptApplication) object. This object is placed in the project script sheet and is referenced by each Application.

Divide the event into events that are available for every module that supports scripting and those that are only related to user interaction in Document Review.

The following image lists the events that are available for every module.


An image that shows the Application event sequence

The Application_InitializeScript and the Application_DeinitializeScript events contain the events that control batch processing. These events are related to the load of a new Project object and the initialization of the script engine. Typically, these events are designed for the initialization of variables with a global scope. You can also use these events to control the active language of the project. By default the language is determined by the application UI language. You can retrieve the language by using the UILanguage property in the Application object. You can set a different language to one of the supported languages by assigning Project.ActiveLanguage the desired language. All language identifiers are in the .NET format like "en-US."

The Application_DeinitializeScript event is fired when the script engine is deinitialized.

The Application_InitializeBatch event is fired when a new batch starts processing. For the user modules, these events are processed in sequence, and for the Server they are processed in parallel. For further details please refer to Batch Processing in Server.