App.xaml.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334
  1. using System.Globalization;
  2. using System.Reflection;
  3. using System.Threading;
  4. using System.Windows;
  5. using System.Xml;
  6. using ComPDFKit.NativeMethod;
  7. using Compdfkit_Tools.Helper;
  8. namespace FormViewControl
  9. {
  10. /// <summary>
  11. /// Interaction logic for App.xaml
  12. /// </summary>
  13. public partial class App: Application
  14. {
  15. private static bool LicenseVerify()
  16. {
  17. if (!CPDFSDKVerifier.LoadNativeLibrary())
  18. return false;
  19. string license = "vRK+dzgqDsImQkoKZb2i2WhhdsKYquZ5JJUUuOF6q4xySFETAYvInXOu/f3JAvR9X14z/s4W20EE9WSKsbEum6IvdY8uLoNFy6YM7SyvNC0zVPs5T7GnEBaTQ+qVgnGeV88LA7nbZjPGfQmC75jFLlItpetrbbp75d7LQs6ftq/I8akPBz4Kxc3SSow2MFj5GzH6VbCFYSlUKw/TwA4adwM8uk2g6Kh86i23vTzGejQ4FtQ6stKHXn4HllO0bXpWnFihljcZ3R8PR31pFNwT8UUw4h9NVdFcZxpnGRDbwx9QP9WyHpHZLwbeO48ufCgFCVysJEk1riNSTGTAaAP3FUtTVN6c+2dRhnnKQ9BD2+ZXPq1h0mtlp1NQ+RMIko/jptqMsDODbroq9eCcyCqv15famjsc5QhApxJ66Uir6JIEWg+1gHSh2bjFiiXJAZ6NYxZRbQCMGNWAvkvPL3VOmCcPKDpJojB4dAuUzkjcfNP3FtGWASLlf1sxBLPPUH3/SUjuKo61mV+inIkdPNQcpTuQO57aUzB8KSNTD9t5EApfDx1B3KqboczEI8JHpWmS+IJqLCfsdlZLlGqIVobinsWoWlrK+RCjMLVb1nG6cwgJkaUZSOX6lhqKCVjsk/y/UkMufir2Jr3VOcSskcB2q89CFCFifHHHnhIhHClAv/cmsbjAv8udd4vC2c8/IMyeZDTKE61QPTGv5Web7Veww7UvwzOJJzdEyurazXA+8W54OEFOcXWYSdIgqS/vfVtnuO1kXkGQlSX1V0ead/9e5cgbJBA0v6oCmcgFsdJ19cJWN2eb8XRaylJBvRjCLTfxyhbz5ot00OuvKj41xr9kzFxfdbfnnZIUvdt0DhdKOcq/XESwVIL+pht7hkwzW7dk3HovfUURbW/42AUBTS3P/UNn7rp3eHOhZnTYo6erdzuLfnoMUa8M8nhOhIEkkRTxyCgKfwd4akkqZVJx9r83Hlf9ceP1IoDYgrXYwpetLJ8=";
  20. LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(license, false);
  21. return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
  22. }
  23. protected override void OnStartup(StartupEventArgs e)
  24. {
  25. base.OnStartup(e);
  26. LicenseVerify();
  27. Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
  28. Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
  29. }
  30. }
  31. }