App.xaml.cs 649 B

123456789101112131415161718192021222324
  1. using ComPDFKit.NativeMethod;
  2. using ComPDFKit.Controls.Helper;
  3. using System.Windows;
  4. namespace Measure
  5. {
  6. public partial class App : Application
  7. {
  8. protected override void OnStartup(StartupEventArgs e)
  9. {
  10. base.OnStartup(e);
  11. LicenseVerify();
  12. }
  13. private static bool LicenseVerify()
  14. {
  15. if (!CPDFSDKVerifier.LoadNativeLibrary())
  16. return false;
  17. LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(SDKLicenseHelper.ParseLicenseXML(), false);
  18. return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
  19. }
  20. }
  21. }