2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Runtime.CompilerServices;
5using System.Windows.Input;
111 PropertyChanged?.Invoke (
this,
new PropertyChangedEventArgs(propertyName));
Model for default Chronos licenses.
virtual string ActivationKey
The activation key, as the user entered it (and got from some activation site or from you).
virtual Uri ActivationUri
Some internet address that should be visited to finish the activation. This will be displayed to the ...
virtual DateTime ProductReferenceDate
For time dependent licensing: The reference date for your product (build date, commit....
virtual ICommand OpenUri
Open the ActivationUri in a browser.
virtual string LicenseHint
Additional information for the user about the data entered so far that does not constitute an error.
PropertyChangedEventHandler PropertyChanged
Standard property changed handling logic.
Func< Uri > ActivationUriBuilder
If you need a custom Uri, you can build it here (including parameters for computer id / serial)
void NotifyPropertyChanged([CallerMemberName] string propertyName=null)
Allow notification trigger by derived classes.
virtual bool IsActivationKeyOk
Verify the activation key against the other entered data.
virtual bool IsActivationRequired
Do you need an activation code? Could depend on the serial, maybe.
virtual string Complaints
Tell the reason why the currently entered data are not acceptable. If they are, this should be null.
virtual bool IsLicenseKeyCorrect
Basic verification - length, kind of digits, checksum - whatever.
virtual object Explanation
Explanaition to the user what this license is about, and what they should enter.
virtual IReadOnlyList< int > AcceptedProductIDs
Specify which product IDs you accept for this module. Comparison with the GetProductId result allows ...
virtual int GetProductId(string serialNumber)
If you want to use the same system for different licenses: Use this to extract the product code from ...
virtual string SerialNumber
The license code you got from Axel Semrau - or the one you sold your customers.
virtual TimeSpan ValidityAfterReferenceDate
For how long after the reference date is your license OK?
virtual string ComputerId
Some ID that should be displayed to the user that identifies this computer, if you use that in your a...