In complex licensing scenarios you may want to store license specific data in a license such a list of named features, database names, SLA contract numbers, etc. DeployLX provides a named value collection that can used to save and retrieve this type of data.
For basic on/off style features consider using named features.
Adding Custom Data
The custom values collections are available only in the Advanced License Editor. DeployLX offers two separate named value collections that can be used to store arbitrary data in a license.
Contains data that is protected from modification. Modifying a value in this collection on the client will invalidate the license.
Example: The file formats that the user can save to.
Contains data that may be modified on the client. This can be used to save settings or state with the license. It should be considered unsafe and used only for data that the user may modify.
Example: The next date when the user should be notified that they are using the trial version.
To Add Custom Data
- Open a license in the Advanced License Editor.
- Select the General Properties tab.
- Select Secure Values to open the name/value editor.
- Enter a name and assign a value for each desired custom value.
Using Custom Data
Once validated, you can retrieve custom data from a license. You can use this data to then modify the behavior of the application.
_license = SecureLicenseManager.Validate(Me, Nothing, Nothing) If _license.Values("SaveToJpg") = "true" Then _saveToJpg.Enabled = True End If
_license = SecureLicenseManager.Validate( this, null, null ); if( _license.Values[ "SaveToJpg" ] == "true" ) _saveToJpg.Enabled = true;