License validation

Validating a license is as simple as three lines of code. Generally you'd check for if a license is valid when the program starts:

 

using SkyXoft.BusinessSolutions.LicenseManager.Protector;

 

   public class MainForm : Form

   {

       

       private ExtendedLicense license;

 

       public MainForm()

       {

           

           this.license = ExtendedLicenseManager.GetLicense(typeof(MainForm), this);

 

        }

   }

   private void MainForm_Load(object sender, EventArgs e)

   {

           if (license.Validate())

           {

               MessageBox.Show("License is valid");

           }

           else

           {

               MessageBox.Show("License is invalid");          

           }

     }