예제 #1
0
 private void CloseWhenLicenseValid(object sender, ActivationResponseEventArgs e)
 {
     if (e.IsLicenseValid)
     {
         FinishInteraction();
     }
 }
예제 #2
0
        private void ViewModelOnActivationResponse(object sender, ActivationResponseEventArgs e)
        {
            if (!Dispatcher.CheckAccess())
            {
                Dispatcher.Invoke((Action)(() => ViewModelOnActivationResponse(sender, e)));
                return;
            }

            if (e.Edition.IsLicenseValid)
            {
                string title   = _translator.GetTranslation("LicenseTab", "ActivationSuccessful", "Activation successful");
                string message = _translator.GetTranslation("LicenseTab", "ActivationSuccessfulMessage", "The license has been activated successfully");

                MessageWindow.ShowTopMost(message, title, MessageWindowButtons.OK, MessageWindowIcon.PDFCreator);
            }
            else
            {
                string title   = _translator.GetTranslation("LicenseTab", "ActivationFailed", "Activation failed");
                string message = _translator.GetTranslation("LicenseTab", "ActivationFailedMessage", "The activation was not successful:");
                message += "\r\n"
                           + _translator?.GetTranslation("LicenseTab", "LicenseStatus." + e.Edition.LicenseStatus, EnumToStringValueHelper.GetStringValue(e.Edition.LicenseStatus));

                MessageWindow.ShowTopMost(message, title, MessageWindowButtons.OK, MessageWindowIcon.Error);
            }
        }
예제 #3
0
        private void CloseWhenLicenseValid(object sender, ActivationResponseEventArgs e)
        {
            if (!Dispatcher.CheckAccess())
            {
                Dispatcher.Invoke((Action)(() => CloseWhenLicenseValid(sender, e)));
                return;
            }

            if (e.Edition.IsLicenseValid)
            {
                Close();
            }
        }