Open topic with navigation
After adding PLUSManagedGui to your application, the next step is to initialize the component. If the component is not initialized correctly, any attempt to use PLUSManagedGui while your application is running will result in an error message being displayed.
Throughout this section of the manual, the SampleLicense class is referenced. This class and its supporting classes are re-used from the sample applications.
In the example above, the SampleLicense class constructor receives and stores the reference to the PLUSManagedGui component. This allows your license implementation logic to leverage some of the features in PLUSManagedGui. For example, this will allow your license implementation class to automatically obtain proxy authentication credentials from a user when required for web service calls.
The next noteworthy part of the above code example is that the ApplicationLicense property is initialized and points to your license implementation object. This step is required by PLUSManagedGui, and an error will be displayed if it is omitted.
In order to access your license file, you will need to make your code aware of the location of the license file. The example code below shows how you can add a property to your form which assumes the license file is located in the same directory as your application (or your .EXE file).
Of course, when you select a final path for your application's license files, you will need to be considerate of permissions during deployment or installation of your application.
Once the objects have been initialized per the instructions above, the next step is to initialize the license by loading and validating it as shown below.
This code can be called as the last step in your form's constructor, or it may be called while your splash screen is loading (if your application is configured to periodically communicate with SOLO Server).