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"); } }
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(); } } }