C# Class Orc.LicenseManager.ViewModels.LicenseViewModel

View model for a single License.
Inheritance: Catel.MVVM.ViewModelBase
Mostra file Open project: WildGums/Orc.LicenseManager

Private Properties

Property Type Description
ApplyLicense void
DetectLicenseMode void
LoadAndApplyLicense void
OnAboutSiteClickExecute void
OnLicenseModeChanged void
OnPasteExecuteAsync Task
OnPurchaseLinkClickExecute void
OnRemoveLicenseCanExecute bool
OnRemoveLicenseExecuteAsync Task
OnShowClipboardExecute void
UpdateLicenseInfo void

Public Methods

Method Description
LicenseViewModel ( LicenseInfo licenseInfo, INavigationService navigationService, IProcessService processService, ILicenseService licenseService, ILicenseValidationService licenseValidationService, IUIVisualizerService uiVisualizerService, IMessageService messageService ) : System

Initializes a new instance of the LicenseViewModel class.

Protected Methods

Method Description
CancelAsync ( ) : Task
InitializeAsync ( ) : Task

Initializes the view model. Normally the initialization is done in the constructor, but sometimes this must be delayed to a state where the associated UI element (user control, window, ...) is actually loaded. This method is called as soon as the associated UI element is loaded.

It's not recommended to implement the initialization of properties in this method. The initialization of properties should be done in the constructor. This method should be used to start the retrieval of data from a web service or something similar. During unit tests, it is recommended to manually call this method because there is no external container calling this method.

SaveAsync ( ) : Task

Private Methods

Method Description
ApplyLicense ( string licenseKey ) : void
DetectLicenseMode ( ) : void
LoadAndApplyLicense ( ) : void
OnAboutSiteClickExecute ( ) : void

Method to invoke when the AboutSiteClick command is executed.

OnLicenseModeChanged ( ) : void
OnPasteExecuteAsync ( ) : Task

Method to invoke when the Paste command is executed. Validates the license and xml,

OnPurchaseLinkClickExecute ( ) : void

Method to invoke when the PurchaseLinkClick command is executed.

OnRemoveLicenseCanExecute ( ) : bool
OnRemoveLicenseExecuteAsync ( ) : Task

Method to invoke when the RemoveLicense command is executed.

OnShowClipboardExecute ( ) : void

Method to invoke when the ShowClipboard command is executed.

UpdateLicenseInfo ( ) : void

Method Details

CancelAsync() protected method

protected CancelAsync ( ) : Task
return Task

InitializeAsync() protected method

Initializes the view model. Normally the initialization is done in the constructor, but sometimes this must be delayed to a state where the associated UI element (user control, window, ...) is actually loaded. This method is called as soon as the associated UI element is loaded.
It's not recommended to implement the initialization of properties in this method. The initialization of properties should be done in the constructor. This method should be used to start the retrieval of data from a web service or something similar. During unit tests, it is recommended to manually call this method because there is no external container calling this method.
protected InitializeAsync ( ) : Task
return Task

LicenseViewModel() public method

Initializes a new instance of the LicenseViewModel class.
The is null. The is null. The is null. The is null. The is null.
public LicenseViewModel ( LicenseInfo licenseInfo, INavigationService navigationService, IProcessService processService, ILicenseService licenseService, ILicenseValidationService licenseValidationService, IUIVisualizerService uiVisualizerService, IMessageService messageService ) : System
licenseInfo LicenseInfo The single license model.
navigationService INavigationService The navigation service.
processService IProcessService The process service.
licenseService ILicenseService The license service.
licenseValidationService ILicenseValidationService The license validation service.
uiVisualizerService IUIVisualizerService The uiVisualizer service.
messageService IMessageService The message service.
return System

SaveAsync() protected method

protected SaveAsync ( ) : Task
return Task