Example #1
0
 protected virtual void OnFirstActivated()
 {
     if (!Tools.Runtime.IsDesignMode)
     {
         // This is a blocking call (will show a nag if necessary)
         ApplicationServices.ApplyLicense();
     }
 }
Example #2
0
        private void _enterNewProductKey_Click(object sender, EventArgs e)
        {
            ProductActivationForm form = new ProductActivationForm();

            form.ShowDialog();
            _productExpirationDetailsControl.RefreshText();
            ApplicationServices.ApplyLicense(false);
        }
Example #3
0
        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();
                }
            }
        }