Beispiel #1
0
        private void btnGenerate_Click(object sender, EventArgs e)
        {
            //generate non activated license file
            if (this.currentLicenseId >= 0)
            {
                LicenseFeaturesParams p = licenseService.GetLicenseFeatureParams(this.currentLicenseId);

                LicenseUtility.GenerateLicense(p);
            }
            else
            {
                MessageBox.Show("Please save current license, or load a license before generating a license file.", "Error");
            }
        }
Beispiel #2
0
 private void setTestMode()
 {
     if (LicenseUtility.TestMode)
     {
         button2.ForeColor = Color.Green;
         this.Text         = "LeanPath License Manager - Using Test Database";
         button2.Text      = "Using Test Database";
     }
     else
     {
         button2.ForeColor = Color.Red;
         this.Text         = "LeanPath License Manager - Using Production Database";
         button2.Text      = "Using Production Database";
     }
     licenseService = LicenseUtility.GetWebService();
 }
Beispiel #3
0
        private void btnGenerateActivatedLicense_Click(object sender, EventArgs e)
        {
            int id = Convert.ToInt32(this.SaveActivation());

            this.activation = licenseService.GetActivationById(id);

            if (this.activation.CPUID == string.Empty || this.activation.ActivationCode == string.Empty)
            {
                MessageBox.Show("You must generate an activation code before activation.", "Error");
            }
            else
            {
                if (LicenseUtility.GenerateLicense(licenseFeatures, activation))
                {
                    MessageBox.Show("Success", "Generate License File");
                    this.Close();
                }
            }
        }
Beispiel #4
0
 public static bool GenerateLicense(LicenseFeaturesParams p, Activation a)
 {
     return(LicenseUtility.saveLicenseFile(p, a));
 }
Beispiel #5
0
 public static bool GenerateLicense(LicenseFeaturesParams p)
 {
     return(LicenseUtility.saveLicenseFile(p, null));
 }