public async void Execute(object sender, EventArgs e)
        {
            FreeTrialController freeTrialController = new FreeTrialController();

            if (freeTrialController.WasEverInTrial() == false && activeLicense == false)
            {
                LicenseView licenseView = new LicenseView();
                licenseView.ShowDialog();
                return;
            }

            if (freeTrialController.IsActive() == false && activeLicense == false)
            {
                TrialExpiredView trialExpiredView = new TrialExpiredView();
                trialExpiredView.ShowDialog();
                return;
            }

            var command = CreateCommand(sender);

            if (command == null)
            {
                return;
            }
            await LaunchCommandAsync(command.CommandID.ID, commandUILocation);
        }
        public async void Execute(object sender, EventArgs e)
        {
            var freeTrialController = new FreeTrialController();

            // First app install - choose license
            if (freeTrialController.WasEverInTrial() == false && activeAccount == false)
            {
                LicenseView licenseView = new LicenseView();
                licenseView.ShowDialog();
                return;
            }

            // Trial expired
            if (freeTrialController.IsActive() == false && activeAccount == false && tokenExists == false)
            {
                TrialExpiredView trialExpiredView = new TrialExpiredView();
                trialExpiredView.ShowDialog();
                return;
            }

            // Session Expired
            if (freeTrialController.IsActive() == false && activeAccount == false && tokenExists == true)
            {
                LoginView loginView = new LoginView();
                loginView.ShowDialog();
                return;
            }

            var command = CreateCommand(sender);

            if (command == null)
            {
                return;
            }
            await LaunchCommandAsync(command.CommandID.ID, commandUILocation);
        }
Пример #3
0
 public TrialExpiredViewModel(TrialExpiredView view)
 {
     trialExpiredView = view;
 }