Decrease method
procedure TOgDaysCode.Decrease;
Decrease method procedure TOgDaysCode.Decrease; |
Decrease reduces the day count value stored in the release code.
Performing this action requires several vital pieces of information, which are normally obtained by triggering several event handlers that you define. The normal sequence of events performed by Decrease is:
1. Trigger the OnGetKey event to get the key used to encode and decode the release code. The key should always be embedded in the application as a constant.
2. Trigger the OnGetCode event to get the release code. The release code is normally stored in the registry or an INI file.
3. Trigger the OnGetModifier event to get the key modifier. The modifier can be stored as a constant in the application, stored in the registry or INI file, or generated when it is needed.
4. Apply the modifier to the key.
5. Test the code to see if it is valid.
6. Decrease the day count by one if it has not already been decreased today.
7. | Trigger the OnChangeCode event to store the changed release code. |
See also: OnChangeCode, OnGetCode, OnGetKey, OnGetModifier