예제 #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");
            }
        }
예제 #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();
 }
예제 #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();
                }
            }
        }
예제 #4
0
 public static bool GenerateLicense(LicenseFeaturesParams p, Activation a)
 {
     return(LicenseUtility.saveLicenseFile(p, a));
 }
예제 #5
0
 public static bool GenerateLicense(LicenseFeaturesParams p)
 {
     return(LicenseUtility.saveLicenseFile(p, null));
 }