Browse Source

compdfkit(win) - license update

liuaoran 1 year ago
parent
commit
fb694a8f64
54 changed files with 181 additions and 272 deletions
  1. 5 9
      Demo/Examples/Annotations/App.xaml.cs
  2. 1 0
      Demo/Examples/Compdfkit_Tools/Common/Helper/CommonHelper.cs
  3. 3 8
      Demo/Examples/ContentEditor/App.xaml.cs
  4. 3 9
      Demo/Examples/DigitalSignature/App.xaml.cs
  5. 3 8
      Demo/Examples/DocsEditor/App.xaml.cs
  6. 3 3
      Demo/Examples/DocsEditor/DocsEditor.csproj
  7. 4 9
      Demo/Examples/Forms/App.xaml.cs
  8. 3 3
      Demo/Examples/Forms/Forms.csproj
  9. 4 3
      Demo/Examples/PDFViewer/App.xaml.cs
  10. 4 6
      Demo/Examples/Samples/AnnotationImportExportTest/CS/AnnotationImportExportTest.csproj
  11. 3 5
      Demo/Examples/Samples/AnnotationImportExportTest/VB/AnnotationImportExportTest.vbproj
  12. 4 6
      Demo/Examples/Samples/AnnotationTest/CS/AnnotationTest.csproj
  13. 6 6
      Demo/Examples/Samples/AnnotationTest/VB/AnnotationTest.vbproj
  14. 4 6
      Demo/Examples/Samples/BackgroundTest/CS/BackgroundTest.csproj
  15. 4 6
      Demo/Examples/Samples/BackgroundTest/VB/BackgroundTest.vbproj
  16. 3 4
      Demo/Examples/Samples/BatesTest/CS/BatesTest.csproj
  17. 3 3
      Demo/Examples/Samples/BatesTest/VB/BatesTest.vbproj
  18. 3 5
      Demo/Examples/Samples/BookmarkTest/CS/BookmarkTest.csproj
  19. 3 3
      Demo/Examples/Samples/BookmarkTest/VB/BookmarkTest.vbproj
  20. 4 4
      Demo/Examples/Samples/DigitalSignatureTest/CS/DigitalSignatureTest.csproj
  21. 3 5
      Demo/Examples/Samples/DigitalSignatureTest/VB/DigitalSignatureTest.vbproj
  22. 3 5
      Demo/Examples/Samples/DocumentCompare/CS/DocumentCompareTest.csproj
  23. 3 3
      Demo/Examples/Samples/DocumentCompare/VB/DocumentCompareTest.vbproj
  24. 4 6
      Demo/Examples/Samples/DocumentInfoTest/CS/DocumentInfoTest.csproj
  25. 3 3
      Demo/Examples/Samples/DocumentInfoTest/VB/DocumentInfoTest.vbproj
  26. 3 5
      Demo/Examples/Samples/EncryptTest/CS/EncryptTest.csproj
  27. 3 3
      Demo/Examples/Samples/EncryptTest/VB/EncryptTest.vbproj
  28. 3 5
      Demo/Examples/Samples/FlattenTest/CS/FlattenTest.csproj
  29. 3 3
      Demo/Examples/Samples/FlattenTest/VB/FlattenTest.vbproj
  30. 3 4
      Demo/Examples/Samples/HeaderFooterTest/CS/HeaderFooterTest.csproj
  31. 3 3
      Demo/Examples/Samples/HeaderFooterTest/VB/HeaderFooterTest.vbproj
  32. 3 5
      Demo/Examples/Samples/ImageExtractTest/CS/ImageExtractTest.csproj
  33. 3 3
      Demo/Examples/Samples/ImageExtractTest/VB/ImageExtractTest.vbproj
  34. 3 5
      Demo/Examples/Samples/InteractiveFormsTest/CS/InteractiveFormsTest.csproj
  35. 3 3
      Demo/Examples/Samples/InteractiveFormsTest/VB/InteractiveFormsTest.vbproj
  36. 5 27
      Demo/Examples/Samples/LicenseKey.cs
  37. 3 5
      Demo/Examples/Samples/OutlineTest/CS/OutlineTest.csproj
  38. 3 3
      Demo/Examples/Samples/OutlineTest/VB/OutlineTest.vbproj
  39. 3 5
      Demo/Examples/Samples/PDFATest/CS/PDFATest.csproj
  40. 3 3
      Demo/Examples/Samples/PDFATest/VB/PDFATest.vbproj
  41. 3 5
      Demo/Examples/Samples/PDFPageTest/CS/PDFPageTest.csproj
  42. 3 3
      Demo/Examples/Samples/PDFPageTest/VB/PDFPageTest.vbproj
  43. 3 4
      Demo/Examples/Samples/PDFRedactTest/CS/PDFRedactTest.csproj
  44. 3 3
      Demo/Examples/Samples/PDFRedactTest/VB/PDFRedactTest.vbproj
  45. 3 5
      Demo/Examples/Samples/PDFToImage/CS/PDFToImageTest.csproj
  46. 3 3
      Demo/Examples/Samples/PDFToImage/VB/PDFToImageTest.vbproj
  47. 3 5
      Demo/Examples/Samples/TextExtractTest/CS/TextExtractTest.csproj
  48. 3 3
      Demo/Examples/Samples/TextExtractTest/VB/TextExtractTest.vbproj
  49. 3 5
      Demo/Examples/Samples/TextSearchTest/CS/TextSearchTest.csproj
  50. 3 3
      Demo/Examples/Samples/TextSearchTest/VB/TextSearchTest.vbproj
  51. 4 6
      Demo/Examples/Samples/WatermarkTest/CS/WatermarkTest.csproj
  52. 4 6
      Demo/Examples/Samples/WatermarkTest/VB/WatermarkTest.vbproj
  53. 4 8
      Demo/Examples/Viewer/App.xaml.cs
  54. 6 3
      Demo/Examples/Viewer/Viewer.csproj

+ 5 - 9
Demo/Examples/Annotations/App.xaml.cs

@@ -3,6 +3,8 @@ using Compdfkit_Tools.Helper;
 using System.Reflection;
 using System.Windows;
 using System.Xml;
+using static ComPDFKit.NativeMethod.CPDFSDKVerifier;
+
 
 namespace AnnotationViewControl
 {
@@ -20,17 +22,11 @@ namespace AnnotationViewControl
 
         private static bool LicenseVerify()
         {
-            bool result = false;
-
-            result = CPDFSDKVerifier.LoadNativeLibrary();
-            if (!result)
+            if (!LoadNativeLibrary())
                 return false;
-            SDKLicenseHelper sdkLicenseHelper = new SDKLicenseHelper();
 
-            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(sdkLicenseHelper.key, sdkLicenseHelper.secret);
-            if (verifyResult != LicenseErrorCode.LICENSE_ERR_SUCCESS)
-                return false;
-            return result;
+            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify("license_key_windows.txt", true);
+            return (verifyResult != LicenseErrorCode.E_LICENSE_SUCCESS);
         }
     }
 }

+ 1 - 0
Demo/Examples/Compdfkit_Tools/Common/Helper/CommonHelper.cs

@@ -28,6 +28,7 @@ using System.Drawing.Drawing2D;
 using Matrix = System.Windows.Media.Matrix;
 using System.Drawing.Imaging;
 using System.Runtime.InteropServices;
+using ComPDFKit.NativeMethod;
 
 namespace Compdfkit_Tools.Helper
 {

+ 3 - 8
Demo/Examples/ContentEditor/App.xaml.cs

@@ -25,16 +25,11 @@ namespace ContentEditorViewControl
 
         private static bool LicenseVerify()
         {
-            bool result = LoadNativeLibrary();
-            if (!result)
+            if (!LoadNativeLibrary())
                 return false;
 
-            SDKLicenseHelper sdkLicenseHelper = new SDKLicenseHelper();
-
-            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(sdkLicenseHelper.key, sdkLicenseHelper.secret);
-            if (verifyResult != LicenseErrorCode.LICENSE_ERR_SUCCESS)
-                return false;
-            return result;
+            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify("license_key_windows.txt", true);
+            return (verifyResult != LicenseErrorCode.E_LICENSE_SUCCESS);
         }
     }
 }

+ 3 - 9
Demo/Examples/DigitalSignature/App.xaml.cs

@@ -23,17 +23,11 @@ namespace DigitalSignature
 
         private static bool LicenseVerify()
         {
-            bool result = false;
-
-            result = CPDFSDKVerifier.LoadNativeLibrary();
-            if (!result)
+            if (!CPDFSDKVerifier.LoadNativeLibrary())
                 return false;
-            SDKLicenseHelper sdkLicenseHelper = new SDKLicenseHelper();
 
-            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(sdkLicenseHelper.key, sdkLicenseHelper.secret);
-            if (verifyResult != LicenseErrorCode.LICENSE_ERR_SUCCESS)
-                return false;
-            return result;
+            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify("license_key_windows.txt", true);
+            return (verifyResult != LicenseErrorCode.E_LICENSE_SUCCESS);
         }
     }
 }

+ 3 - 8
Demo/Examples/DocsEditor/App.xaml.cs

@@ -28,16 +28,11 @@ namespace DocsEditControl
 
         private static bool LicenseVerify()
         {
-            bool result = LoadNativeLibrary();
-            if (!result)
+            if (!LoadNativeLibrary())
                 return false;
 
-            SDKLicenseHelper sdkLicenseHelper = new SDKLicenseHelper();
-
-            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(sdkLicenseHelper.key, sdkLicenseHelper.secret);
-            if (verifyResult != LicenseErrorCode.LICENSE_ERR_SUCCESS)
-                return false;
-            return result;
+            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify("license_key_windows.txt", true);
+            return (verifyResult != LicenseErrorCode.E_LICENSE_SUCCESS);
         }
     }
 }

+ 3 - 3
Demo/Examples/DocsEditor/DocsEditor.csproj

@@ -122,10 +122,10 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <Content Include="..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
+    </Resource>
     <Resource Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 4 - 9
Demo/Examples/Forms/App.xaml.cs

@@ -3,6 +3,7 @@ using System.Windows;
 using System.Xml;
 using ComPDFKit.NativeMethod;
 using Compdfkit_Tools.Helper;
+using static ComPDFKit.NativeMethod.CPDFSDKVerifier;
 
 namespace FormViewControl
 { 
@@ -19,17 +20,11 @@ namespace FormViewControl
 
         private static bool LicenseVerify()
         {
-            bool result = false;
-
-            result = CPDFSDKVerifier.LoadNativeLibrary();
-            if (!result)
+            if (!LoadNativeLibrary())
                 return false;
-            SDKLicenseHelper sdkLicenseHelper = new SDKLicenseHelper();
 
-            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(sdkLicenseHelper.key, sdkLicenseHelper.secret);
-            if (verifyResult != LicenseErrorCode.LICENSE_ERR_SUCCESS)
-                return false;
-            return result;
+            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify("license_key_windows.txt", true);
+            return (verifyResult != LicenseErrorCode.E_LICENSE_SUCCESS);
         }
     }
 }

+ 3 - 3
Demo/Examples/Forms/Forms.csproj

@@ -104,10 +104,10 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <Content Include="..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
+    </Resource>
     <Content Include="..\TestFile\PDF32000_2008.pdf">
       <Link>PDF32000_2008.pdf</Link>
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>

+ 4 - 3
Demo/Examples/PDFViewer/App.xaml.cs

@@ -23,7 +23,7 @@ namespace PDFViewer
 
         protected override void OnStartup(StartupEventArgs e)
         {
-            string str = this.GetType().Assembly.Location;
+            string str = GetType().Assembly.Location;
             base.OnStartup(e);
             LicenseVerify();
             FileHistoryHelper<PDFFileInfo>.Instance.LoadHistory();
@@ -38,15 +38,16 @@ namespace PDFViewer
             return (verifyResult != LicenseErrorCode.E_LICENSE_SUCCESS);
         }
     }
+
     public class FilePathList : List<string>
     {
         public new void Add(string item)
         {
             base.Add(item);
-            YourCustomFunction(item);
+            HistoryFile(item);
         }
 
-        private void YourCustomFunction(string item)
+        private void HistoryFile(string item)
         {
             PDFFileInfo fileInfo = new PDFFileInfo();
             fileInfo.FilePath = item;

+ 4 - 6
Demo/Examples/Samples/AnnotationImportExportTest/CS/AnnotationImportExportTest.csproj

@@ -112,12 +112,6 @@
     <None Include="App.config" />
     <None Include="packages.config" />
   </ItemGroup>
-  <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
   <ItemGroup>
     <BootstrapperPackage Include=".NETFramework,Version=v4.6">
       <Visible>False</Visible>
@@ -131,6 +125,10 @@
     </BootstrapperPackage>
   </ItemGroup>
   <ItemGroup>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 5
Demo/Examples/Samples/AnnotationImportExportTest/VB/AnnotationImportExportTest.vbproj

@@ -131,12 +131,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />

+ 4 - 6
Demo/Examples/Samples/AnnotationTest/CS/AnnotationTest.csproj

@@ -95,12 +95,6 @@
     <None Include="App.config" />
     <None Include="packages.config" />
   </ItemGroup>
-  <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
   <ItemGroup>
     <None Include="..\..\..\TestFile\logo.png">
       <Link>logo.png</Link>
@@ -120,6 +114,10 @@
     </BootstrapperPackage>
   </ItemGroup>
   <ItemGroup>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 6 - 6
Demo/Examples/Samples/AnnotationTest/VB/AnnotationTest.vbproj

@@ -127,12 +127,6 @@
     <None Include="App.config" />
     <None Include="packages.config" />
   </ItemGroup>
-  <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
   <ItemGroup>
     <None Include="..\..\..\TestFile\Bird.wav">
       <Link>Bird.wav</Link>
@@ -145,6 +139,12 @@
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
   </ItemGroup>
+  <ItemGroup>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Resource>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
   <Import Project="..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

+ 4 - 6
Demo/Examples/Samples/BackgroundTest/CS/BackgroundTest.csproj

@@ -99,12 +99,6 @@
     <None Include="App.config" />
     <None Include="packages.config" />
   </ItemGroup>
-  <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
   <ItemGroup>
     <BootstrapperPackage Include=".NETFramework,Version=v4.6.1">
       <Visible>False</Visible>
@@ -118,6 +112,10 @@
     </BootstrapperPackage>
   </ItemGroup>
   <ItemGroup>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 4 - 6
Demo/Examples/Samples/BackgroundTest/VB/BackgroundTest.vbproj

@@ -131,17 +131,15 @@
     <None Include="App.config" />
     <None Include="packages.config" />
   </ItemGroup>
-  <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
   <ItemGroup>
     <None Include="..\..\..\TestFile\logo.png">
       <Link>logo.png</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />

+ 3 - 4
Demo/Examples/Samples/BatesTest/CS/BatesTest.csproj

@@ -72,11 +72,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 3
Demo/Examples/Samples/BatesTest/VB/BatesTest.vbproj

@@ -127,10 +127,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
+    </Resource>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
   <Import Project="..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" />

+ 3 - 5
Demo/Examples/Samples/BookmarkTest/CS/BookmarkTest.csproj

@@ -76,12 +76,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 3
Demo/Examples/Samples/BookmarkTest/VB/BookmarkTest.vbproj

@@ -127,10 +127,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
+    </Resource>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
   <Import Project="..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" />

+ 4 - 4
Demo/Examples/Samples/DigitalSignatureTest/CS/DigitalSignatureTest.csproj

@@ -63,10 +63,6 @@
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
     <None Include="..\..\..\TestFile\CommonFivePage.pdf">
       <Link>CommonFivePage.pdf</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@@ -87,6 +83,10 @@
     </None>
   </ItemGroup>
   <ItemGroup>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 5
Demo/Examples/Samples/DigitalSignatureTest/VB/DigitalSignatureTest.vbproj

@@ -131,12 +131,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
     <None Include="Logo.png">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

+ 3 - 5
Demo/Examples/Samples/DocumentCompare/CS/DocumentCompareTest.csproj

@@ -87,12 +87,10 @@
     </None>
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 3
Demo/Examples/Samples/DocumentCompare/VB/DocumentCompareTest.vbproj

@@ -140,10 +140,10 @@
     </None>
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />

+ 4 - 6
Demo/Examples/Samples/DocumentInfoTest/CS/DocumentInfoTest.csproj

@@ -86,12 +86,6 @@
     <None Include="App.config" />
     <None Include="packages.config" />
   </ItemGroup>
-  <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
   <ItemGroup>
     <BootstrapperPackage Include=".NETFramework,Version=v4.6.1">
       <Visible>False</Visible>
@@ -105,6 +99,10 @@
     </BootstrapperPackage>
   </ItemGroup>
   <ItemGroup>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 3
Demo/Examples/Samples/DocumentInfoTest/VB/DocumentInfoTest.vbproj

@@ -125,10 +125,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />

+ 3 - 5
Demo/Examples/Samples/EncryptTest/CS/EncryptTest.csproj

@@ -76,12 +76,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 3
Demo/Examples/Samples/EncryptTest/VB/EncryptTest.vbproj

@@ -129,10 +129,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />

+ 3 - 5
Demo/Examples/Samples/FlattenTest/CS/FlattenTest.csproj

@@ -72,12 +72,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 3
Demo/Examples/Samples/FlattenTest/VB/FlattenTest.vbproj

@@ -124,10 +124,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />

+ 3 - 4
Demo/Examples/Samples/HeaderFooterTest/CS/HeaderFooterTest.csproj

@@ -69,11 +69,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 3
Demo/Examples/Samples/HeaderFooterTest/VB/HeaderFooterTest.vbproj

@@ -122,10 +122,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />

+ 3 - 5
Demo/Examples/Samples/ImageExtractTest/CS/ImageExtractTest.csproj

@@ -75,12 +75,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 3
Demo/Examples/Samples/ImageExtractTest/VB/ImageExtractTest.vbproj

@@ -125,10 +125,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />

+ 3 - 5
Demo/Examples/Samples/InteractiveFormsTest/CS/InteractiveFormsTest.csproj

@@ -73,12 +73,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 3
Demo/Examples/Samples/InteractiveFormsTest/VB/InteractiveFormsTest.vbproj

@@ -124,10 +124,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />

+ 5 - 27
Demo/Examples/Samples/LicenseKey.cs

@@ -1,38 +1,16 @@
 using ComPDFKit.NativeMethod;
 using System;
 using System.Xml;
+using static ComPDFKit.NativeMethod.CPDFSDKVerifier;
 
 public static class SDKLicenseHelper
-{
-    public static string key = string.Empty;
-    public static string secret = string.Empty; 
-
+{ 
     public static bool LicenseVerify()
     {
-        string sdkLicensePath = "license_key_windows.xml";
-        XmlDocument xmlDocument = new XmlDocument();
-        xmlDocument.Load(sdkLicensePath);
-
-        XmlNode keyNode = xmlDocument.SelectSingleNode("/license/key");
-        XmlNode secretNode = xmlDocument.SelectSingleNode("/license/secret");
-
-        if (keyNode != null && secretNode != null)
-        {
-            key = keyNode.InnerText;
-            secret = secretNode.InnerText;
-
-        }
-        else
-        {
-            Console.WriteLine("Key or secret element not found in the XML.");
-        }
-        bool result = CPDFSDKVerifier.LoadNativeLibrary();
-        if (!result)
+        if (!LoadNativeLibrary())
             return false;
 
-        LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(key, secret);
-        if (verifyResult != LicenseErrorCode.LICENSE_ERR_SUCCESS)
-            return false;
-        return result;
+        LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify("license_key_windows.txt", true);
+        return (verifyResult != LicenseErrorCode.E_LICENSE_SUCCESS);
     }
 }

+ 3 - 5
Demo/Examples/Samples/OutlineTest/CS/OutlineTest.csproj

@@ -72,12 +72,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 3
Demo/Examples/Samples/OutlineTest/VB/OutlineTest.vbproj

@@ -124,10 +124,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />

+ 3 - 5
Demo/Examples/Samples/PDFATest/CS/PDFATest.csproj

@@ -72,12 +72,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 3
Demo/Examples/Samples/PDFATest/VB/PDFATest.vbproj

@@ -124,10 +124,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />

+ 3 - 5
Demo/Examples/Samples/PDFPageTest/CS/PDFPageTest.csproj

@@ -76,12 +76,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 3
Demo/Examples/Samples/PDFPageTest/VB/PDFPageTest.vbproj

@@ -128,10 +128,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />

+ 3 - 4
Demo/Examples/Samples/PDFRedactTest/CS/PDFRedactTest.csproj

@@ -71,11 +71,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 3
Demo/Examples/Samples/PDFRedactTest/VB/PDFRedactTest.vbproj

@@ -125,10 +125,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />

+ 3 - 5
Demo/Examples/Samples/PDFToImage/CS/PDFToImageTest.csproj

@@ -74,12 +74,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 3
Demo/Examples/Samples/PDFToImage/VB/PDFToImageTest.vbproj

@@ -127,10 +127,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />

+ 3 - 5
Demo/Examples/Samples/TextExtractTest/CS/TextExtractTest.csproj

@@ -72,12 +72,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 3
Demo/Examples/Samples/TextExtractTest/VB/TextExtractTest.vbproj

@@ -124,10 +124,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />

+ 3 - 5
Demo/Examples/Samples/TextSearchTest/CS/TextSearchTest.csproj

@@ -73,12 +73,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 3
Demo/Examples/Samples/TextSearchTest/VB/TextSearchTest.vbproj

@@ -126,10 +126,10 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />

+ 4 - 6
Demo/Examples/Samples/WatermarkTest/CS/WatermarkTest.csproj

@@ -77,12 +77,6 @@
     <None Include="App.config" />
     <None Include="packages.config" />
   </ItemGroup>
-  <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
   <ItemGroup>
     <None Include="..\..\..\TestFile\logo.png">
       <Link>logo.png</Link>
@@ -90,6 +84,10 @@
     </None>
   </ItemGroup>
   <ItemGroup>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 4 - 6
Demo/Examples/Samples/WatermarkTest/VB/WatermarkTest.vbproj

@@ -127,12 +127,6 @@
     <None Include="App.config" />
     <None Include="packages.config" />
   </ItemGroup>
-  <ItemGroup>
-    <None Include="..\..\..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
   <ItemGroup>
     <Compile Include="..\..\LicenseKey.vb">
       <Link>LicenseKey.vb</Link>
@@ -141,6 +135,10 @@
       <Link>logo.png</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
+    <Resource Include="..\..\..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Resource>
     <Content Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />

+ 4 - 8
Demo/Examples/Viewer/App.xaml.cs

@@ -23,16 +23,12 @@ namespace Viewer
 
         private static bool LicenseVerify()
         {
-            bool result = LoadNativeLibrary();
-            if (!result)
+            if (!LoadNativeLibrary())
                 return false;
 
-            SDKLicenseHelper sdkLicenseHelper = new SDKLicenseHelper();
-
-            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(sdkLicenseHelper.key, sdkLicenseHelper.secret);
-            if (verifyResult != LicenseErrorCode.LICENSE_ERR_SUCCESS)
-                return false;
-            return result;
+            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify("license_key_windows.txt", true);
+            return (verifyResult != LicenseErrorCode.E_LICENSE_SUCCESS);
         }
     }
 }
+

+ 6 - 3
Demo/Examples/Viewer/Viewer.csproj

@@ -110,9 +110,6 @@
     <None Include="App.config" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\license_key_windows.xml">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
     <Resource Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <ItemGroup>
@@ -129,6 +126,12 @@
       <Name>Compdfkit_Tools</Name>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">