public AvailableCheckoutsModel(IDisplayState displayState)
 {
     RefreshCommmand = new RelayCommand( Load );
     AcquireCheckoutCommand = new RelayCommand( AcquireCheckout, CanAcquireCheckout );
     DisplayState = displayState;
     Load();
 }
Exemplo n.º 2
0
 public CurrentCheckoutModel(  )
 {
     Checkout.TryGetCurrent( out _checkout );
     ValidUntil = _checkout.ValidUntil;
     Features = new ObservableCollection<string>( _checkout.Features );
     CheckinCommand = new RelayCommand( Checkin );
 }
 public ConfigurationModel()
 {
     TestConnectionCommand = new RelayCommand( TestConnection, HasValidDistributorUrl );
     SaveCommand = new RelayCommand( Save, HasValidDistributorUrlOrEmpty );
     DistributorUrl = DistributorConfigurationRepository.Load();
     LicenseCount = LicenseRepository.LicenseCount( SpAgent.Product );
     ActivationCommand = new RelayCommand( () => DisplayState.Navigate( new ActivationPage() ) );
     ViewLicensesCommand = new RelayCommand( () => DisplayState.Navigate( new LicenseListPage() ) );
 }
Exemplo n.º 4
0
        public AcquireModel()
        {
            AcquireCommand = new RelayCommand( Acquire );

            // NB - RunFeatureCommand in this model is only available if a given feature is already held in current context.
            // If RunFeatureCommand isn't available for a given feature, the respective 'Feature X' button bound to this command will be disabled.
            RunFeatureCommand = new RelayCommand<string>( RunFeature, CanRunFeature, Convert.ToString );

            SpAgent.Product.Stores.LicenseInstalled += OnLicenseInstalled;
            SpAgent.Distributed.FeaturesUpdated += OnDistributedFeaturesUpdated;
        }
Exemplo n.º 5
0
        public LicenseListModel()
        {
            IProductContext productContext = SpAgent.Product;

            ProductName = productContext.ProductName;
            ProductVersion = productContext.ProductVersion;

            // If there's no product context, then probably SpAgent hasn't been initialized
            // (this can happen inside Visual Studio Designer)
            if ( productContext == null )
                return;

            Licenses = new ObservableCollection<LicenseItemModel>( LicenseRepository.RetrieveAllLicenses( productContext ) );
            foreach ( var license in Licenses )
                license.ItemRemoved += RemoveSelectedItem;
            BackCommand = new RelayCommand( () => DisplayState.Navigate( new ConfigurationPage() ) );
        }
Exemplo n.º 6
0
 public LicenseItemModel()
 {
     RemoveLicenseCommand = new RelayCommand( RemoveLicense );
 }
Exemplo n.º 7
0
 public OfflineActivationModel()
 {
     GenerateRequestCommand = new RelayCommand( GenerateRequest, CanGenerateRequest );
     CopyToClipboardCommand = new RelayCommand( CopyToClipboard, CanCopyToClipboard );
     BrowseAndInstallCommand = new RelayCommand( BrowseAndInstallLicense );
 }
Exemplo n.º 8
0
 public ActivationModel()
 {
     ActivationCommand = new RelayCommand( ActivateOnline, CanActivate );
 }
Exemplo n.º 9
0
 public ActivationModel()
 {
     ActivationCommand = new RelayCommand( ActivateOnline, CanActivate );
     CancelCommand = new RelayCommand( () => DisplayState.Navigate( new ConfigurationPage() ) );
 }
Exemplo n.º 10
0
 public AvailableCheckoutsModel()
 {
     RefreshCommmand = new RelayCommand( Load );
     AcquireCheckoutCommand = new RelayCommand( AcquireCheckout, CanAcquireCheckout );
     Load();
 }