Пример #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            int id = Convert.ToInt32(this.SaveActivation());

            this.activation = licenseService.GetActivationById(id);
            MessageBox.Show("Success", "Save Activation");
        }
Пример #2
0
        public AddActivation(LMan4.com.licensemanager4web.License l, LMan4.com.licensemanager4web.LicenseFeaturesParams lf, LMan4.com.licensemanager4web.Activation a)
        {
            InitializeComponent();
            this.license         = l;
            this.licenseFeatures = lf;
            this.activation      = a;

            this.populateLicense();
            this.populateActivation();

            this.Text = "Edit Activation Record";
        }
Пример #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
        void ulvActivations_ItemDoubleClick(object sender, ItemDoubleClickEventArgs e)
        {
            if (ulvActivations.SelectedItems.Count > 0)
            {
                if (this.currentLicenseId != -1)
                {
                    LMan4.com.licensemanager4web.License l = licenseService.GetLicenseById(this.currentLicenseId);
                    LMan4.com.licensemanager4web.LicenseFeaturesParams lf = licenseService.GetLicenseFeatureParams(this.currentLicenseId);
                    LMan4.com.licensemanager4web.Activation            a  = licenseService.GetActivationById(Convert.ToInt32(ulvActivations.SelectedItems[0].Key));

                    AddActivation frm = new AddActivation(l, lf, a);
                    frm.FormClosed += new FormClosedEventHandler(frm_FormClosed);
                    frm.Show();
                }
                else
                {
                    MessageBox.Show("Please select and existing license record, or save current record before creating an activation record.", "Error");
                }
            }
        }