示例#1
0
        private void Bt_Decrypt_Click(object sender, EventArgs e)
        {
            DeployLX.Licensing.v3.SecureLicense         Secure       = new SecureLicense();
            DeployLX.Licensing.Management.v3.LicenseKey myLicenseKey = new DeployLX.Licensing.Management.v3.LicenseKey(new FileStream("", FileMode.Open));

            myLicenseKey.DecryptLicense(Secure);
        }
示例#2
0
        private void Bt_Generate_Click(object sender, EventArgs e)
        {
            MemoryStream  MemStream = new MemoryStream(Properties.Resources.Keys);
            string        value     = string.Empty;
            SecureLicense sl        = new SecureLicense();

            sl.SerialNumber = "1234";
            DeployLX.Licensing.Management.v3.LicenseKey mykey3 = new DeployLX.Licensing.Management.v3.LicenseKey(MemStream);
            // DeployLX.Licensing.Management.v4.LicenseKey key = new DeployLX.Licensing.Management.v4.LicenseKey(MemStream);

            memoEdit1.Text         = "";
            memoEdit1.SelectedText = DateTime.Now + "---" + "Start Generate." + Environment.NewLine;
            Thread.Sleep(TimeSpan.FromMilliseconds(100));
            memoEdit1.SelectedText = "----------------" + Environment.NewLine;
            Thread.Sleep(TimeSpan.FromMilliseconds(100));
            switch (cb_LicMethod.SelectedIndex)
            {
            case 0:
                memoEdit1.SelectedText = DateTime.Now + "---" + "Generate Serial Standard edition." + Environment.NewLine;
                string prefix = "STD-";
                TxtBox_Result.Text = mykey3.MakeSerialNumber(prefix, 1, DeployLX.Licensing.v3.SerialNumberFlags.None, -1, 0, -1, 0, null, "U9VWT2FG3Q7RS0AC1DEYMNX6P8HJ4KL5", DeployLX.Licensing.v3.CodeAlgorithm.SerialNumber);
                break;

            case 1:
                memoEdit1.SelectedText = DateTime.Now + "---" + "Generate Serial Profesional edition." + Environment.NewLine;
                string prefix1 = "PRO-";
                TxtBox_Result.Text = mykey3.MakeSerialNumber(prefix1, 1, SerialNumberFlags.None, -1, 0, -1, 0, null, "U9VWT2FG3Q7RS0AC1DEYMNX6P8HJ4KL5", CodeAlgorithm.SerialNumber);
                break;
            }
            memoEdit1.SelectedText = "Serial is : " + Environment.NewLine;
            Thread.Sleep(TimeSpan.FromMilliseconds(100));
            memoEdit1.SelectedText = TxtBox_Result.Text + Environment.NewLine;
        }