123456789101112131415161718192021222324252627282930313233343536 |
- using ComPDFKit.NativeMethod;
- using Compdfkit_Tools.Helper;
- using System.Collections.Generic;
- using System.Windows;
- namespace PDFViewer
- {
- /// <summary>
- /// Interaction logic for App.xaml
- /// </summary>
- ///
- public partial class App : Application
- {
- static public bool DefaultPDFLoaded = false;
- public static List<string> OpenedFilePathList = new List<string>();
- 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;
- }
- }
- }
|