Reflection 2014 .NET API Guide
Log Events

Log Events

The Event Logger program demonstrates the range of events in Reflection to which you can add event handling functions and the order in which those events occur. This program sets up each event with an event handler that prompts a text notification immediately after the event occurs.

To build and run the Event Logger

  1. In Visual Studio, create a new Console Application project.
  2. In the New Project dialog box, type Event Logger in the Name box.
  3. Select the Create directory for solution box, click Browse to select your API projects folder (for example, C:\MyProjects), and then click OK.
  4. In Solution Explorer, add the class assemblies. (For instructions, see Create an API Project.)
  5. Copy the code for the Event Logger (IBM) program. (If you use OpenSystems terminal emulation, you'll need to adapt this program accordingly.)
  6. In Visual Studio, paste the code to the Program.cs tab, replacing all existing code.
  7. Build the application (Build > Rebuild Solution) and then run it (Debug > Start Without Debugging).

    The program starts a new session in Reflection and opens a console window in which to display notifications.