arg22
Joined: 07 Dec 2006 Posts: 1
|
Posted: Thu Dec 07, 2006 10:00 am Post subject: Customizing License Tracker |
|
|
Hi
I need to have license code that are valid only on one machine, so I want to add the machine ID the license ProductInfo
I created this code bellow and compiled it into a dll, copied the DLL to the
E:\Program Files\Infralution\Infralution Licensing System\LicenseTracker
directory but LicenseTracker does not seem to pick it, when I create a new product and specify my class name in the custom generation field "LicenseGenerator.MachineIDLock"
I get an error that type could not be resolved, I double check and the dll is in place
Any idea?
see my code
Code: | using System;
using System.Collections.Generic;
using System.Text;
using Infralution.Licensing;
using Infralution.LicenseTracker;
namespace LicenseGenerator
{
public class MachineIDLock : Infralution.LicenseTracker.CustomGenerator
{
/// <summary>
/// Get the ProductInfo and comments to include for the license key
/// </summary>
/// <param name="data"></param>
/// <param name="customer"></param>
/// <param name="sale"></param>
public override void GetLicenseKeyData(LicenseKeyData data, ICustomer customer, ISale sale)
{
// display a form to get the details from the user
//
LicenseDataForm form = new LicenseDataForm();
// default to the company name
//
form.ShowDialog();
string machineID = form.lblMachineID.Text;
machineID = machineID.Trim();
data.ProductInfo = EncryptedLicense.Checksum(machineID);
data.Comments = string.Format("MachineID: {0}", machineID);
}
}
}
|
|
|