|
@@ -1,108 +1,111 @@
|
|
-using System;
|
|
|
|
-using System.Collections.Generic;
|
|
|
|
-using System.Configuration;
|
|
|
|
-using System.Data;
|
|
|
|
-using System.IO;
|
|
|
|
-using System.Linq;
|
|
|
|
-using System.Threading.Tasks;
|
|
|
|
-using System.Windows;
|
|
|
|
-using System.Windows.Controls;
|
|
|
|
-using ComPDFKit.NativeMethod;
|
|
|
|
-using ComPDFKit_Conversion.Converter;
|
|
|
|
-using PDF_Office.CustomControl;
|
|
|
|
-using PDF_Office.CustomControl.SystemControl;
|
|
|
|
-using PDF_Office.ViewModels;
|
|
|
|
-using PDF_Office.Views;
|
|
|
|
-using PDF_Office.Views.BOTA;
|
|
|
|
-using PDF_Office.Views.Dialog;
|
|
|
|
-using PDF_Office.Views.HomePanel;
|
|
|
|
-using Prism.DryIoc;
|
|
|
|
-using Prism.Ioc;
|
|
|
|
-using Prism.Regions;
|
|
|
|
-using PDF_Office.Model;
|
|
|
|
-using PDF_Office.Views.PageEdit;
|
|
|
|
-using PDF_Office.Properties;
|
|
|
|
-using PDFSettings.Settings;
|
|
|
|
-using PDF_Office.Views.Tools;
|
|
|
|
-using PDF_Office.Views.Dialog.ToolsDialogs.SaftyDialogs;
|
|
|
|
-using PDF_Office.Views.Dialog.ToolsDialogs.CompressDialogs;
|
|
|
|
-using PDF_Office.Views.Dialog.PageEditDialogs;
|
|
|
|
|
|
+using System;
|
|
|
|
+using System.Collections.Generic;
|
|
|
|
+using System.Configuration;
|
|
|
|
+using System.Data;
|
|
|
|
+using System.IO;
|
|
|
|
+using System.Linq;
|
|
|
|
+using System.Threading.Tasks;
|
|
|
|
+using System.Windows;
|
|
|
|
+using System.Windows.Controls;
|
|
|
|
+using ComPDFKit.NativeMethod;
|
|
|
|
+using ComPDFKit_Conversion.Converter;
|
|
|
|
+using PDF_Office.CustomControl;
|
|
|
|
+using PDF_Office.CustomControl.SystemControl;
|
|
|
|
+using PDF_Office.ViewModels;
|
|
|
|
+using PDF_Office.Views;
|
|
|
|
+using PDF_Office.Views.BOTA;
|
|
|
|
+using PDF_Office.Views.Dialog;
|
|
|
|
+using PDF_Office.Views.HomePanel;
|
|
|
|
+using Prism.DryIoc;
|
|
|
|
+using Prism.Ioc;
|
|
|
|
+using Prism.Regions;
|
|
|
|
+using PDF_Office.Model;
|
|
|
|
+using PDF_Office.Views.PageEdit;
|
|
|
|
+using PDF_Office.Properties;
|
|
|
|
+using PDFSettings.Settings;
|
|
|
|
+using PDF_Office.Views.Tools;
|
|
|
|
+using PDF_Office.Views.Dialog.ToolsDialogs.SaftyDialogs;
|
|
|
|
+using PDF_Office.Views.Dialog.ToolsDialogs.CompressDialogs;
|
|
|
|
+using PDF_Office.Views.Dialog.PageEditDialogs;
|
|
using PDF_Office.Views.Dialog.HomePageToolsDialogs ;
|
|
using PDF_Office.Views.Dialog.HomePageToolsDialogs ;
|
|
using PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter;
|
|
using PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter;
|
|
using PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
|
|
using PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
|
|
using PDF_Office.Views.Dialog.ConverterDialogs;
|
|
using PDF_Office.Views.Dialog.ConverterDialogs;
|
|
using PDF_Office.Helper;
|
|
using PDF_Office.Helper;
|
|
|
|
+using PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter;
|
|
|
|
+using PDF_Office.Views.EditTools.Watermark;
|
|
|
|
+using PDF_Office.Views.EditTools.Background;
|
|
|
|
|
|
-namespace PDF_Office
|
|
|
|
-{
|
|
|
|
- /// <summary>
|
|
|
|
- /// App.xaml 的交互逻辑
|
|
|
|
- /// </summary>
|
|
|
|
- public partial class App : PrismApplication
|
|
|
|
- {
|
|
|
|
- public static string CurrentPath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "PDF Office");
|
|
|
|
-
|
|
|
|
- public static MainWindowViewModel mainWindowViewModel;
|
|
|
|
-
|
|
|
|
- public static List<string> OpenedFileList = new List<string>();
|
|
|
|
-
|
|
|
|
- public static bool IsFirstOpen = true;
|
|
|
|
-
|
|
|
|
- public App()
|
|
|
|
- {
|
|
|
|
-
|
|
|
|
-#if !DEBUG
|
|
|
|
- //接入Appcenter后台数据检测
|
|
|
|
- string appkey = "b099dccc-1ca5-4ea1-a2fa-afd4a6e1f8bb"
|
|
|
|
- AppCenter.Start(appkey, typeof(Analytics), typeof(Crashes));
|
|
|
|
- var countryCode = RegionInfo.CurrentRegion.TwoLetterISORegionName;//上传国家信息
|
|
|
|
- AppCenter.SetCountryCode(countryCode);
|
|
|
|
-#endif
|
|
|
|
- LicenseVerify();
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- if (Settings.Default.RecentOpenFiles == null)
|
|
|
|
- Settings.Default.RecentOpenFiles = new RecentOpenFiles();
|
|
|
|
-
|
|
|
|
- try
|
|
|
|
- {
|
|
|
|
- DirectoryInfo info = new DirectoryInfo(CurrentPath);
|
|
|
|
- if (File.Exists(CurrentPath))
|
|
|
|
- File.Delete(CurrentPath);
|
|
|
|
- if (!info.Exists)
|
|
|
|
- {
|
|
|
|
- info.Create();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- catch (Exception ex)
|
|
|
|
- {
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /// <summary>
|
|
|
|
- /// 创建启动窗口
|
|
|
|
- /// </summary>
|
|
|
|
- /// <returns></returns>
|
|
|
|
- protected override Window CreateShell()
|
|
|
|
- {
|
|
|
|
-
|
|
|
|
- return Container.Resolve<MainWindow>();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- protected override void RegisterTypes(IContainerRegistry containerRegistry)
|
|
|
|
- {
|
|
|
|
- //注册内容组件
|
|
|
|
- containerRegistry.RegisterForNavigation<HomeContent>();
|
|
|
|
- containerRegistry.RegisterForNavigation<ViewContent>();
|
|
|
|
- containerRegistry.RegisterForNavigation<MainContent>();
|
|
|
|
- containerRegistry.RegisterForNavigation<HomeCloudContent>("Cloud");
|
|
|
|
- containerRegistry.RegisterForNavigation<HomeToolsContent>("Tools");
|
|
|
|
- containerRegistry.RegisterForNavigation<HomeGuidContent>("Guid");
|
|
|
|
- containerRegistry.RegisterForNavigation<BOTAContent>();
|
|
|
|
- containerRegistry.RegisterForNavigation<PageEditContent>();
|
|
|
|
- containerRegistry.RegisterForNavigation<ToolsBarContent>();
|
|
|
|
|
|
+namespace PDF_Office
|
|
|
|
+{
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// App.xaml 的交互逻辑
|
|
|
|
+ /// </summary>
|
|
|
|
+ public partial class App : PrismApplication
|
|
|
|
+ {
|
|
|
|
+ public static string CurrentPath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "PDF Office");
|
|
|
|
+
|
|
|
|
+ public static MainWindowViewModel mainWindowViewModel;
|
|
|
|
+
|
|
|
|
+ public static List<string> OpenedFileList = new List<string>();
|
|
|
|
+
|
|
|
|
+ public static bool IsFirstOpen = true;
|
|
|
|
+
|
|
|
|
+ public App()
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+#if !DEBUG
|
|
|
|
+ //接入Appcenter后台数据检测
|
|
|
|
+ string appkey = "b099dccc-1ca5-4ea1-a2fa-afd4a6e1f8bb"
|
|
|
|
+ AppCenter.Start(appkey, typeof(Analytics), typeof(Crashes));
|
|
|
|
+ var countryCode = RegionInfo.CurrentRegion.TwoLetterISORegionName;//上传国家信息
|
|
|
|
+ AppCenter.SetCountryCode(countryCode);
|
|
|
|
+#endif
|
|
|
|
+ LicenseVerify();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (Settings.Default.RecentOpenFiles == null)
|
|
|
|
+ Settings.Default.RecentOpenFiles = new RecentOpenFiles();
|
|
|
|
+
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ DirectoryInfo info = new DirectoryInfo(CurrentPath);
|
|
|
|
+ if (File.Exists(CurrentPath))
|
|
|
|
+ File.Delete(CurrentPath);
|
|
|
|
+ if (!info.Exists)
|
|
|
|
+ {
|
|
|
|
+ info.Create();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ catch (Exception ex)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 创建启动窗口
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ protected override Window CreateShell()
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ return Container.Resolve<MainWindow>();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ protected override void RegisterTypes(IContainerRegistry containerRegistry)
|
|
|
|
+ {
|
|
|
|
+ //注册内容组件
|
|
|
|
+ containerRegistry.RegisterForNavigation<HomeContent>();
|
|
|
|
+ containerRegistry.RegisterForNavigation<ViewContent>();
|
|
|
|
+ containerRegistry.RegisterForNavigation<MainContent>();
|
|
|
|
+ containerRegistry.RegisterForNavigation<HomeCloudContent>("Cloud");
|
|
|
|
+ containerRegistry.RegisterForNavigation<HomeToolsContent>("Tools");
|
|
|
|
+ containerRegistry.RegisterForNavigation<HomeGuidContent>("Guid");
|
|
|
|
+ containerRegistry.RegisterForNavigation<BOTAContent>();
|
|
|
|
+ containerRegistry.RegisterForNavigation<PageEditContent>();
|
|
|
|
+ containerRegistry.RegisterForNavigation<ToolsBarContent>();
|
|
containerRegistry.RegisterForNavigation<HomePagePrinterModSizeContent>();
|
|
containerRegistry.RegisterForNavigation<HomePagePrinterModSizeContent>();
|
|
containerRegistry.RegisterForNavigation<HomePagePrinterModPosterContent>();
|
|
containerRegistry.RegisterForNavigation<HomePagePrinterModPosterContent>();
|
|
containerRegistry.RegisterForNavigation<HomePagePrinterModMultipleContent>();
|
|
containerRegistry.RegisterForNavigation<HomePagePrinterModMultipleContent>();
|
|
@@ -110,18 +113,25 @@ namespace PDF_Office
|
|
containerRegistry.RegisterForNavigation<HomePageCompressDialog>();
|
|
containerRegistry.RegisterForNavigation<HomePageCompressDialog>();
|
|
containerRegistry.RegisterForNavigation<HomePageSetPasswordDialog>();
|
|
containerRegistry.RegisterForNavigation<HomePageSetPasswordDialog>();
|
|
containerRegistry.RegisterForNavigation<ConverterBarContent>();
|
|
containerRegistry.RegisterForNavigation<ConverterBarContent>();
|
|
|
|
+ containerRegistry.RegisterForNavigation<HomePageConverterDialog>();
|
|
|
|
+ containerRegistry.RegisterForNavigation<HomePageConverterCSV>();
|
|
|
|
+ containerRegistry.RegisterForNavigation<HomePageConverterImg>();
|
|
|
|
+ containerRegistry.RegisterForNavigation<HomePageConverterWord>();
|
|
|
|
+ containerRegistry.RegisterForNavigation<HomePageConverterExcel>();
|
|
|
|
+ containerRegistry.RegisterForNavigation<WatermarkContent>();
|
|
|
|
+ containerRegistry.RegisterForNavigation<BackgroundContent>();
|
|
|
|
|
|
- //注册弹窗
|
|
|
|
- containerRegistry.RegisterDialog<VerifyPassWordDialog>(DialogNames.VerifyPassWordDialog);
|
|
|
|
- containerRegistry.RegisterDialog<FullScreenWindow>(DialogNames.FullScreenDialog);
|
|
|
|
- containerRegistry.RegisterDialog<CompressDialog>(DialogNames.CompressDialog);
|
|
|
|
- containerRegistry.RegisterDialog<SetPasswordDialog>(DialogNames.SetPasswordDialog);
|
|
|
|
- containerRegistry.RegisterDialog<CheckPasswordDialog>(DialogNames.CheckPasswordDialog);
|
|
|
|
- containerRegistry.RegisterDialog<DeleteSafetySettingsDialog>(DialogNames.DeleteSafetySettingsDialog);
|
|
|
|
- containerRegistry.RegisterDialog<CompressProgressBarDialog, PDF_Office.ViewModels.Dialog.ToolsDialogs.CompressDialogs.CompresProgressBarDialogViewModel>(DialogNames.CompressProgressBarDialog);
|
|
|
|
- containerRegistry.RegisterDialog<InsertDialog>(DialogNames.InsertDialog);
|
|
|
|
- containerRegistry.RegisterDialog<SplitDialog>(DialogNames.SplitDialog);
|
|
|
|
- containerRegistry.RegisterDialog<ExtractDialog>(DialogNames.ExtractDialog);
|
|
|
|
|
|
+ //注册弹窗
|
|
|
|
+ containerRegistry.RegisterDialog<VerifyPassWordDialog>(DialogNames.VerifyPassWordDialog);
|
|
|
|
+ containerRegistry.RegisterDialog<FullScreenWindow>(DialogNames.FullScreenDialog);
|
|
|
|
+ containerRegistry.RegisterDialog<CompressDialog>(DialogNames.CompressDialog);
|
|
|
|
+ containerRegistry.RegisterDialog<SetPasswordDialog>(DialogNames.SetPasswordDialog);
|
|
|
|
+ containerRegistry.RegisterDialog<CheckPasswordDialog>(DialogNames.CheckPasswordDialog);
|
|
|
|
+ containerRegistry.RegisterDialog<DeleteSafetySettingsDialog>(DialogNames.DeleteSafetySettingsDialog);
|
|
|
|
+ containerRegistry.RegisterDialog<CompressProgressBarDialog, PDF_Office.ViewModels.Dialog.ToolsDialogs.CompressDialogs.CompresProgressBarDialogViewModel>(DialogNames.CompressProgressBarDialog);
|
|
|
|
+ containerRegistry.RegisterDialog<InsertDialog>(DialogNames.InsertDialog);
|
|
|
|
+ containerRegistry.RegisterDialog<SplitDialog>(DialogNames.SplitDialog);
|
|
|
|
+ containerRegistry.RegisterDialog<ExtractDialog>(DialogNames.ExtractDialog);
|
|
containerRegistry.RegisterDialog<HomePageExtractDialog>(DialogNames.HomePageExtractDialog);
|
|
containerRegistry.RegisterDialog<HomePageExtractDialog>(DialogNames.HomePageExtractDialog);
|
|
containerRegistry.RegisterDialog<HomePageInsertDialog>(DialogNames.HomePageInsertDialog);
|
|
containerRegistry.RegisterDialog<HomePageInsertDialog>(DialogNames.HomePageInsertDialog);
|
|
containerRegistry.RegisterDialog<HomePageSplitDialog>(DialogNames.HomePageSplitDialog);
|
|
containerRegistry.RegisterDialog<HomePageSplitDialog>(DialogNames.HomePageSplitDialog);
|
|
@@ -138,84 +148,86 @@ namespace PDF_Office
|
|
containerRegistry.RegisterDialog<ConverterRTFDialog>(DialogNames.ConverterRTFDialog);
|
|
containerRegistry.RegisterDialog<ConverterRTFDialog>(DialogNames.ConverterRTFDialog);
|
|
containerRegistry.RegisterDialog<ConverterExcelDialog>(DialogNames.ConverterExcelDialog);
|
|
containerRegistry.RegisterDialog<ConverterExcelDialog>(DialogNames.ConverterExcelDialog);
|
|
containerRegistry.RegisterDialog<ConverterProgressBarDialog>(DialogNames.ConverterProgressBarDialog);
|
|
containerRegistry.RegisterDialog<ConverterProgressBarDialog>(DialogNames.ConverterProgressBarDialog);
|
|
-
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- protected override void ConfigureRegionAdapterMappings(RegionAdapterMappings regionAdapterMappings)
|
|
|
|
- {
|
|
|
|
- var region = new SingleActiveRegion() { Name = RegionNames.MainRegion };
|
|
|
|
-
|
|
|
|
- region.Behaviors.Add(DragablzWindowBehavior.BehaviorKey, new DragablzWindowBehavior());
|
|
|
|
-
|
|
|
|
- Container.Resolve<IRegionManager>().Regions.Add(region);
|
|
|
|
-
|
|
|
|
- base.ConfigureRegionAdapterMappings(regionAdapterMappings);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ protected override void ConfigureRegionAdapterMappings(RegionAdapterMappings regionAdapterMappings)
|
|
|
|
+ {
|
|
|
|
+ var region = new SingleActiveRegion() { Name = RegionNames.MainRegion };
|
|
|
|
+
|
|
|
|
+ region.Behaviors.Add(DragablzWindowBehavior.BehaviorKey, new DragablzWindowBehavior());
|
|
|
|
+
|
|
|
|
+ Container.Resolve<IRegionManager>().Regions.Add(region);
|
|
|
|
+
|
|
|
|
+ base.ConfigureRegionAdapterMappings(regionAdapterMappings);
|
|
|
|
+ }
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 验证SDK和转档库密钥
|
|
/// 验证SDK和转档库密钥
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- private static bool LicenseVerify()
|
|
|
|
- {
|
|
|
|
- bool result = false;
|
|
|
|
- try
|
|
|
|
- {
|
|
|
|
- result = CPDFSDKVerifier.LoadNativeLibrary();
|
|
|
|
- if (!result)
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- catch{ }
|
|
|
|
|
|
+ private static bool LicenseVerify()
|
|
|
|
+ {
|
|
|
|
+ bool result = false;
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ result = CPDFSDKVerifier.LoadNativeLibrary();
|
|
|
|
+ if (!result)
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ catch{ }
|
|
SDKLisenceHelper sdkhelper = new SDKLisenceHelper();
|
|
SDKLisenceHelper sdkhelper = new SDKLisenceHelper();
|
|
- string devKey = "";
|
|
|
|
- string devSecret = "";
|
|
|
|
-#if DEBUG
|
|
|
|
|
|
+ string devKey = "";
|
|
|
|
+ string devSecret = "";
|
|
|
|
+#if DEBUG
|
|
devKey = "ehrnKqkWc1XSEAWyPUt6+95GzCoLEyoKrCbsUuJkCqGmxmP5ozX4bS0R6crHItQVNTFvC5mBZ1M7QjJ6Ekdu4Daj7PM+EDLTBKbFJinK4Ri9E5E2X+a9vF5zSj0TkIscQPVnwj9ikxAFOWGIyybMwQQzwc8a4j1cGOqGXQRDMMY=";
|
|
devKey = "ehrnKqkWc1XSEAWyPUt6+95GzCoLEyoKrCbsUuJkCqGmxmP5ozX4bS0R6crHItQVNTFvC5mBZ1M7QjJ6Ekdu4Daj7PM+EDLTBKbFJinK4Ri9E5E2X+a9vF5zSj0TkIscQPVnwj9ikxAFOWGIyybMwQQzwc8a4j1cGOqGXQRDMMY=";
|
|
devSecret = "mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4gQurxTxGuBlGAhs0P1mD3X3bHT+AHfcLiymaqE4DY7kTFHoPs9I3tl5ErS+BHdzHRhrp9sGpqfp0B228KI+IMTu4aGVjtYuk+Uxs/kosIBw1367/WkJ00tM7U7tttD6ccHhEu996bvBgqf8Sw8OekQKQq13VBewK5AckaDux4W7SGRhCUNWC4MItkr36JnXMD2tiFQYzMG8C66HYmRGSLh";
|
|
devSecret = "mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4gQurxTxGuBlGAhs0P1mD3X3bHT+AHfcLiymaqE4DY7kTFHoPs9I3tl5ErS+BHdzHRhrp9sGpqfp0B228KI+IMTu4aGVjtYuk+Uxs/kosIBw1367/WkJ00tM7U7tttD6ccHhEu996bvBgqf8Sw8OekQKQq13VBewK5AckaDux4W7SGRhCUNWC4MItkr36JnXMD2tiFQYzMG8C66HYmRGSLh";
|
|
-#endif
|
|
|
|
|
|
+ devKey = sdkhelper.DevKey;
|
|
|
|
+ devSecret = sdkhelper.DevSecret;
|
|
|
|
+#endif
|
|
string userKey = sdkhelper.UserKey;
|
|
string userKey = sdkhelper.UserKey;
|
|
string userSecret = sdkhelper.UserSecret;
|
|
string userSecret = sdkhelper.UserSecret;
|
|
-
|
|
|
|
- try
|
|
|
|
- {
|
|
|
|
|
|
+
|
|
|
|
+ try
|
|
|
|
+ {
|
|
CPDFSDKVerifier.LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(devKey, devSecret);
|
|
CPDFSDKVerifier.LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(devKey, devSecret);
|
|
- if (verifyResult != CPDFSDKVerifier.LicenseErrorCode.LICENSE_ERR_SUCCESS)
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- catch{ }
|
|
|
|
-
|
|
|
|
|
|
+ if (verifyResult != CPDFSDKVerifier.LicenseErrorCode.LICENSE_ERR_SUCCESS)
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ catch{ }
|
|
|
|
+
|
|
string ConverterDevKey = sdkhelper.ConverterDevKey;
|
|
string ConverterDevKey = sdkhelper.ConverterDevKey;
|
|
string ConverterDevSecret = sdkhelper.ConverterDevSecret;
|
|
string ConverterDevSecret = sdkhelper.ConverterDevSecret;
|
|
string ConverterUserkey = sdkhelper.ConverterUserkey;
|
|
string ConverterUserkey = sdkhelper.ConverterUserkey;
|
|
string ConverterUserSecret = sdkhelper.ConverterUserSecret;
|
|
string ConverterUserSecret = sdkhelper.ConverterUserSecret;
|
|
-
|
|
|
|
- try
|
|
|
|
- {
|
|
|
|
- /*LicenseError licenseerror = CPDFConverter.SDKLicenseVerify(ConverterDevKey, ConverterDevSecret, ConverterUserkey, ConverterUserSecret);
|
|
|
|
- string resPath = Path.GetDirectoryName(typeof(MainWindow).Assembly.Location) + "\\";
|
|
|
|
- if (licenseerror != LicenseError.ERR_SUCCESS)
|
|
|
|
- {
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- CPDFConverter.Init(resPath);*/
|
|
|
|
- string resPath = Path.GetDirectoryName(typeof(MainWindow).Assembly.Location) + "\\";
|
|
|
|
|
|
+
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ /*LicenseError licenseerror = CPDFConverter.SDKLicenseVerify(ConverterDevKey, ConverterDevSecret, ConverterUserkey, ConverterUserSecret);
|
|
|
|
+ string resPath = Path.GetDirectoryName(typeof(MainWindow).Assembly.Location) + "\\";
|
|
|
|
+ if (licenseerror != LicenseError.ERR_SUCCESS)
|
|
|
|
+ {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ CPDFConverter.Init(resPath);*/
|
|
|
|
+ string resPath = Path.GetDirectoryName(typeof(MainWindow).Assembly.Location) + "\\";
|
|
LicenseError licenseerror = CPDFConverter.LicenseVerify(ConverterDevKey, ConverterDevSecret);
|
|
LicenseError licenseerror = CPDFConverter.LicenseVerify(ConverterDevKey, ConverterDevSecret);
|
|
- if (licenseerror != LicenseError.ERR_SUCCESS)
|
|
|
|
- {
|
|
|
|
- //MessageBox.Show("ComPDFKit Conversion SDK Load Failed!");
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- CPDFConverter.Init(resPath);
|
|
|
|
- }
|
|
|
|
- catch{ }
|
|
|
|
- return result;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- protected override void OnExit(ExitEventArgs e)
|
|
|
|
- {
|
|
|
|
- Environment.Exit(1);
|
|
|
|
- base.OnExit(e);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
|
|
+ if (licenseerror != LicenseError.ERR_SUCCESS)
|
|
|
|
+ {
|
|
|
|
+ //MessageBox.Show("ComPDFKit Conversion SDK Load Failed!");
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ CPDFConverter.Init(resPath);
|
|
|
|
+ }
|
|
|
|
+ catch{ }
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ protected override void OnExit(ExitEventArgs e)
|
|
|
|
+ {
|
|
|
|
+ Environment.Exit(1);
|
|
|
|
+ base.OnExit(e);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|