Chronos Plugins 5.9.0
This documentation covers the plugin interfaces definitions and an example implementation.
|
Model for default Chronos licenses. More...
Public Member Functions | |
virtual int | GetProductId (string serialNumber) |
If you want to use the same system for different licenses: Use this to extract the product code from the given SerialNumber. | |
Protected Member Functions | |
void | NotifyPropertyChanged ([CallerMemberName] string propertyName=null) |
Allow notification trigger by derived classes. | |
Properties | |
virtual string | SerialNumber [get, set] |
The license code you got from Axel Semrau - or the one you sold your customers. | |
virtual string | ActivationKey [get, set] |
The activation key, as the user entered it (and got from some activation site or from you). | |
virtual bool | IsActivationRequired = true [get, set] |
Do you need an activation code? Could depend on the serial, maybe. | |
virtual DateTime | ProductReferenceDate [get, set] |
For time dependent licensing: The reference date for your product (build date, commit...) | |
virtual TimeSpan | ValidityAfterReferenceDate [get, set] |
For how long after the reference date is your license OK? | |
virtual IReadOnlyList< int > | AcceptedProductIDs [get, set] |
Specify which product IDs you accept for this module. Comparison with the GetProductId result allows us to complain if something is wrong. | |
virtual bool | IsLicenseKeyCorrect [get, set] |
Basic verification - length, kind of digits, checksum - whatever. | |
virtual bool | IsActivationKeyOk [get, set] |
Verify the activation key against the other entered data. | |
virtual string | ComputerId [get] |
Some ID that should be displayed to the user that identifies this computer, if you use that in your activation code calculation. | |
virtual string | Complaints [get, set] |
Tell the reason why the currently entered data are not acceptable. If they are, this should be null. | |
virtual string | LicenseHint [get, set] |
Additional information for the user about the data entered so far that does not constitute an error. | |
virtual object | Explanation [get, set] |
Explanaition to the user what this license is about, and what they should enter. | |
Func< Uri > | ActivationUriBuilder [get, set] |
If you need a custom Uri, you can build it here (including parameters for computer id / serial) | |
virtual Uri | ActivationUri [get, set] |
Some internet address that should be visited to finish the activation. This will be displayed to the user just below the "Explanation" in clickable form. | |
virtual ICommand | OpenUri [get] |
Open the ActivationUri in a browser. | |
Events | |
PropertyChangedEventHandler | PropertyChanged |
Standard property changed handling logic. | |
Model for default Chronos licenses.
Create an instance of a derived class, or get one from the Helpers.UtilityFactories.CreateViewModel[LicenseCheckViewModel]. This separation allows you to use the default license check view in Chronos with your own license code, or the Chronos logic with a different view.
Definition at line 20 of file LicenseCheckViewModel.cs.
|
virtual |
If you want to use the same system for different licenses: Use this to extract the product code from the given SerialNumber.
serialNumber |
|
protected |
Allow notification trigger by derived classes.
propertyName |
Definition at line 109 of file LicenseCheckViewModel.cs.
References AxelSemrau.Chronos.Plugin.WPF.ViewModels.LicenseCheckViewModel.PropertyChanged.
|
getset |
Specify which product IDs you accept for this module. Comparison with the GetProductId result allows us to complain if something is wrong.
null for any product ID.
Definition at line 54 of file LicenseCheckViewModel.cs.
|
getset |
The activation key, as the user entered it (and got from some activation site or from you).
Definition at line 29 of file LicenseCheckViewModel.cs.
|
getset |
Some internet address that should be visited to finish the activation. This will be displayed to the user just below the "Explanation" in clickable form.
Definition at line 94 of file LicenseCheckViewModel.cs.
|
getset |
If you need a custom Uri, you can build it here (including parameters for computer id / serial)
This is pre-filled with the normal Chronos activation page if you get the ViewModel from the factory method.
Definition at line 89 of file LicenseCheckViewModel.cs.
|
getset |
Tell the reason why the currently entered data are not acceptable. If they are, this should be null.
Definition at line 73 of file LicenseCheckViewModel.cs.
|
get |
Some ID that should be displayed to the user that identifies this computer, if you use that in your activation code calculation.
Definition at line 69 of file LicenseCheckViewModel.cs.
|
getset |
Explanaition to the user what this license is about, and what they should enter.
This is meant to be shown as WPF content, so evertything from string to FlowDocument is fine here.
Definition at line 84 of file LicenseCheckViewModel.cs.
|
getset |
Verify the activation key against the other entered data.
Definition at line 63 of file LicenseCheckViewModel.cs.
|
getset |
Do you need an activation code? Could depend on the serial, maybe.
Definition at line 34 of file LicenseCheckViewModel.cs.
|
getset |
Basic verification - length, kind of digits, checksum - whatever.
Definition at line 58 of file LicenseCheckViewModel.cs.
|
getset |
Additional information for the user about the data entered so far that does not constitute an error.
Definition at line 77 of file LicenseCheckViewModel.cs.
|
get |
Open the ActivationUri in a browser.
Definition at line 99 of file LicenseCheckViewModel.cs.
|
getset |
For time dependent licensing: The reference date for your product (build date, commit...)
Definition at line 38 of file LicenseCheckViewModel.cs.
|
getset |
The license code you got from Axel Semrau - or the one you sold your customers.
Definition at line 25 of file LicenseCheckViewModel.cs.
|
getset |
For how long after the reference date is your license OK?
Definition at line 42 of file LicenseCheckViewModel.cs.
PropertyChangedEventHandler AxelSemrau.Chronos.Plugin.WPF.ViewModels.LicenseCheckViewModel.PropertyChanged |
Standard property changed handling logic.
Definition at line 103 of file LicenseCheckViewModel.cs.
Referenced by AxelSemrau.Chronos.Plugin.WPF.ViewModels.LicenseCheckViewModel.NotifyPropertyChanged().