123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using ComPDFKit.NativeMethod;
- using Compdfkit_Tools.Helper;
- using System;
- using System.Collections.Generic;
- using System.Configuration;
- using System.Data;
- using System.Linq;
- using System.Threading.Tasks;
- using System.Windows;
- using static ComPDFKit.NativeMethod.CPDFSDKVerifier;
- namespace Measure
- {
- /// <summary>
- /// App.xaml 的交互逻辑
- /// </summary>
- public partial class App : Application
- {
- protected override void OnStartup(StartupEventArgs e)
- {
- base.OnStartup(e);
- LicenseVerify();
- }
- private static bool LicenseVerify()
- {
- bool result = LoadNativeLibrary();
- if (!result)
- {
- return false;
- }
-
- SDKLicenseHelper sdkLicenseHelper = new SDKLicenseHelper();
- string TrialKey = "XvnZGEvx9IZlci4n0AIvhaOh98oIetIX+P8yOKgK3rdR+gp2wKYNdFB4cHnt+WIoUfimU0041gT1mRcKQ27D0wcTRk8URFuWJsjanD7GSHr2WbY8ukgPZVonIRUZC9qrwgPnP93UQbcu16GSvMyLsV6z4m4bhiQ+JcZ6jwkckDE=";
- string TrialSecret = "mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4iYSXB8erGstkUyaynN7k8o9Bkm261z3QDQQd7GhWhZ9ncfsMf6ptexRA+BXdOITlphrp9sGpqfp0B228KI+IMTu4aGVjtYuk+Uxs/kosIBwyVLBY93oKLBB8UJg4t07605BGbaBKUlDopA0iGq1HSnxfuQtxA3SCjGmJx+Rn/MrKDl1EzWv/F/0Gw7Q02pypAMFoEMtjKxkVmy+liLW9u9";
- LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(sdkLicenseHelper.key, sdkLicenseHelper.secret);
- //LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(TrialKey, TrialSecret);
- if (verifyResult != LicenseErrorCode.LICENSE_ERR_SUCCESS)
- {
- return false;
- }
-
- return result;
- }
- }
- }
|