protected virtual void OnFirstActivated() { if (!Tools.Runtime.IsDesignMode) { // This is a blocking call (will show a nag if necessary) ApplicationServices.ApplyLicense(); } }
private void _enterNewProductKey_Click(object sender, EventArgs e) { ProductActivationForm form = new ProductActivationForm(); form.ShowDialog(); _productExpirationDetailsControl.RefreshText(); ApplicationServices.ApplyLicense(false); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (!Tools.Runtime.IsDesignMode) { //// initialize local members #region Fire First Time Use Events if (ApplicationServices.ProductUsageInformation.NumberOfUsesBySystem == 1) { FireFirstTimeExecutedBySystemEvent(); } else { FireNotFirstTimeExecutedBySystemEvent(); } if (ApplicationServices.ProductUsageInformation.NumberOfUsesByUser == 1) { FireFirstTimeExecutedByUserEvent(); } else { FireNotFirstTimeExecutedByUserEvent(); } #endregion // trigger license verify ComponentRegistry.Instance.Resolve <IBackgroundLicenseVerifier>().VerifyLicense(); if ((WindowState == FormWindowState.Minimized || !Visible) && !Nagged) { Nagged = true; // This is a blocking call (will show a nag if necessary) ApplicationServices.ApplyLicense(); } } }