1234567891011121314151617181920212223242526272829303132333435363738 |
- using ComPDFKit.NativeMethod;
- using Compdfkit_Tools.Helper;
- using System;
- using System.Collections.Generic;
- using System.Configuration;
- using System.Data;
- using System.Linq;
- using System.Reflection;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Xml;
- namespace DocsEditor
- {
- public partial class App : Application
- {
- protected override void OnStartup(StartupEventArgs e)
- {
- string str = this.GetType().Assembly.Location;
- base.OnStartup(e);
- LicenseVerify();
- }
- private static bool LicenseVerify()
- {
- bool result = CPDFSDKVerifier.LoadNativeLibrary();
- if (!result)
- return false;
- SDKLicenseHelper sdkLicenseHelper = new SDKLicenseHelper();
- LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(sdkLicenseHelper.key, sdkLicenseHelper.secret);
- if (verifyResult != LicenseErrorCode.LICENSE_ERR_SUCCESS)
- return false;
- return result;
- }
- }
- }
|