App.xaml.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using ComPDFKit.NativeMethod;
  2. using ComPDFKit.Controls.Helper;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Configuration;
  6. using System.Data;
  7. using System.Globalization;
  8. using System.Linq;
  9. using System.Reflection;
  10. using System.Threading;
  11. using System.Threading.Tasks;
  12. using System.Windows;
  13. namespace ContentEditorViewControl
  14. {
  15. public partial class App : Application
  16. {
  17. protected override void OnStartup(StartupEventArgs e)
  18. {
  19. string str = this.GetType().Assembly.Location;
  20. base.OnStartup(e);
  21. LicenseVerify();
  22. Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
  23. Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
  24. }
  25. public static bool LicenseVerify()
  26. {
  27. if (!CPDFSDKVerifier.LoadNativeLibrary())
  28. return false;
  29. LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(SDKLicenseHelper.ParseLicenseXML(), false);
  30. return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
  31. }
  32. }
  33. }