Log Events
The Event Logger program demonstrates the range of events in Reflection 2008 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
- In Visual Studio, create a new Console Application project.
- In the New Project dialog box, type Event Logger in the Name box.
- Select the Create directory for solution box, click Browse to select your API projects folder (for example, C:\MyProjects), and then click OK.
- In Solution Explorer, add the class assemblies. (For instructions, see Create an API Project.)
- Copy the code for the Event Logger (IBM) program. (If you use OpenSystems terminal emulation, you'll need to adapt this program accordingly.)
- In Visual Studio, paste the code to the Program.cs tab, replacing all existing code.
- Build the application (Build > Rebuild Solution) and then run it (Debug > Start Without Debugging).
The program starts a new session in Reflection 2008 and opens a console window in which to display notifications.
|