Open topic with navigation
SimpleTextEditorSelfSignedTrial Sample
Overview
The SimpleTextEditorSelfSigned sample application is similar to the SimpleTextEditorReadOnly sample. However, trial licenses not issued through SOLO Server, as this sample provides a middle-ground with security, where the trial is more easily accessible on machines with no or limited Internet connectivity, while still requiring fully activated machines to use licenses issued by SOLO Server.
Design Outline
- Licensing logic is implemented in the ReadOnlyLicenseand SelfSignedLicense classes, which inherit the PLUSManaged library's License class. The ReadOnlyLicense and SelfSignedLicense classes include data specific to this application and its author, and methods specific to the licensing needs of this application.
- These classes contain 1 simple constructor that takes in a path to a license file since this sample revolves around this. This then calls the License class's constructor passing in data specific to this particular application, and initializes data for uniquely identifying the system on which the application is run.
- The SelfSignedLicense class inherits from PLUSManaged's WritableLicense class, which allows you to create a license which may be written to freely (by your application) without requiring the application to communicate with SOLO Server.
- Each also implements its own license validation in the IsValid property. Here, depending on the type of license, it may perform various combinations of checks to determine whether or not the license should be considered valid on the system on which it is run.
- Several forms are used, none of which perform licensing functions directly, as this is all abstracted out in the SimpleTextEditorReadOnlyLicense class and the PLUSManaged library's License class. However, they provide the means to display licensing information and perform common licensing functions.
- In order to show how an application might look and function after licensing logic has been integrated with it, the main form resembles a standard text editor, similar to Windows Notepad.
- The about form shows the license status, and provides buttons to perform common licensing functions (such as activating).
- The online activation form - This form allows a license to be activated online through web service calls, and is the simplest way a user may activate his or her license.
- The manual activation form allows manual activation to be done when web services are unreachable. This does, however, require the user to send data through some alternative form of transmission, such as sending an email or using a web page. This can be useful in situations where an application/personal firewall blocks web service calls, for example.