|
@@ -13,11 +13,38 @@ using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Media.Imaging;
|
|
|
|
+using System.Xml;
|
|
using Point = System.Windows.Point;
|
|
using Point = System.Windows.Point;
|
|
using Size = System.Windows.Size;
|
|
using Size = System.Windows.Size;
|
|
|
|
|
|
namespace Compdfkit_Tools.Helper
|
|
namespace Compdfkit_Tools.Helper
|
|
{
|
|
{
|
|
|
|
+ public class SDKLicenseHelper
|
|
|
|
+ {
|
|
|
|
+ public string key = string.Empty;
|
|
|
|
+ public string secret = string.Empty;
|
|
|
|
+ public SDKLicenseHelper()
|
|
|
|
+ {
|
|
|
|
+ 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.");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
public static class CommonHelper
|
|
public static class CommonHelper
|
|
{
|
|
{
|
|
/// <summary>
|
|
/// <summary>
|