Example #1
0
        private bool ApplyScriptXLicense(Uri licenseUri, Guid licenseGuid, int licenseRevision)
        {
            if (!_bLicenseApplied)
            {
                var secMgr = new SecMgr.SecMgr();
                secMgr.Apply(licenseUri == null ? "" : licenseUri.ToString(), "{" + licenseGuid.ToString() + "}",
                             licenseRevision);
                _bLicenseApplied = true;
            }

            return(_bLicenseApplied);
        }
Example #2
0
        /// <summary>
        /// License this application for use of ScriptX Advanced features.
        /// *NOTE* When debugging, must *not* Enable the Visual Studio Hosting Process (Project properties -> Debug page)
        /// </summary>
        /// <param name="licenseUri">The Uri of the license file, can be null/empty if using a machine license</param>
        /// <param name="licenseGuid">The unique id of the license</param>
        /// <param name="licenseRevision">The license revision</param>
        private void ApplyScriptXLicense(Uri licenseUri, Guid licenseGuid, int licenseRevision)
        {
            var secMgr = new SecMgr.SecMgr();

            try
            {
                secMgr.Apply(licenseUri == null ? "" : licenseUri.ToString(), "{" + licenseGuid.ToString() + "}", licenseRevision);
            }
            catch (Exception e)
            {
                MessageBox.Show(string.Format("Failed to license this application using: {0}\n\nThe error was: {1}", licenseUri == null ? "the machine license" : licenseUri.ToString(), e.Message), this.Title);
            }
        }
        /// <summary>
        /// License this application for use of ScriptX Advanced features.
        /// *NOTE* When debugging, must *not* Enable the Visual Studio Hosting Process (Project properties -> Debug page)
        /// </summary>
        private void ApplyScriptXLicense()
        {
            var secMgr = new SecMgr.SecMgr();
            string licenseUrl = AppDomain.CurrentDomain.BaseDirectory + "sxlic.mlf";
            try
            {
                secMgr.Apply(licenseUrl, ConfigurationManager.AppSettings["ScriptXLicenseGuid"],
                    Int32.Parse(ConfigurationManager.AppSettings["ScriptXLicenseRevision"]));
            }
            catch (Exception e)
            {
                MessageBox.Show(string.Format("Failed to license this application: {0}", e.Message), this.Title);
            }

        }
Example #4
0
        /// <summary>
        /// License this application for use of ScriptX Advanced features.
        /// *NOTE* When debugging, must *not* Enable the Visual Studio Hosting Process (Project properties -> Debug page)
        /// </summary>
        private void ApplyScriptXLicense()
        {
            var    secMgr     = new SecMgr.SecMgr();
            string licenseUrl = AppDomain.CurrentDomain.BaseDirectory + "sxlic.mlf";

            try
            {
                secMgr.Apply(licenseUrl, ConfigurationManager.AppSettings["ScriptXLicenseGuid"],
                             Int32.Parse(ConfigurationManager.AppSettings["ScriptXLicenseRevision"]));
            }
            catch (Exception e)
            {
                MessageBox.Show(string.Format("Failed to license this application: {0}", e.Message), this.Title);
            }
        }
        /// <summary>
        /// License this application for use of ScriptX Advanced features.
        /// *NOTE* When debugging, must *not* Enable the Visual Studio Hosting Process (Project properties -> Debug page)
        /// </summary>
        /// <param name="licenseUri">The Uri of the license file, can be null/empty if using a machine license</param>
        /// <param name="licenseGuid">The unique id of the license</param>
        /// <param name="licenseRevision">The license revision</param>
        private void ApplyScriptXLicense(Uri licenseUri, Guid licenseGuid, int licenseRevision)
        {
            var secMgr = new SecMgr.SecMgr();

            try
            {
                secMgr.Apply(licenseUri == null ? "" : licenseUri.ToString(), "{" + licenseGuid.ToString() + "}", licenseRevision);
            }
            catch (Exception e)
            {
                MessageBox.Show(string.Format("Failed to license this application using: {0}\n\nThe error was: {1}", licenseUri == null ? "the machine license" : licenseUri.ToString(),e.Message), this.Title);
            }

        }
        private bool ApplyScriptXLicense(Uri licenseUri, Guid licenseGuid, int licenseRevision)
        {
            if (!_bLicenseApplied)
            {
                var secMgr = new SecMgr.SecMgr();
                secMgr.Apply(licenseUri == null ? "" : licenseUri.ToString(), "{" + licenseGuid.ToString() + "}",
                    licenseRevision);
                _bLicenseApplied = true;
            }

            return _bLicenseApplied;
        }