liyijie 2 лет назад
Родитель
Сommit
aa72cb0945
34 измененных файлов с 1537 добавлено и 194 удалено
  1. 184 176
      PDF Office/App.xaml.cs
  2. 1 0
      PDF Office/Model/Dialog/ConverterDialogs/ConverterDialogsModel.cs
  3. 2 2
      PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBatchProcessingDialogModel.cs
  4. 12 0
      PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterCSVModel.cs
  5. 45 0
      PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialogModel.cs
  6. 22 0
      PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterExcelModel.cs
  7. 12 0
      PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterHTMLModel.cs
  8. 15 0
      PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterImgModel.cs
  9. 12 0
      PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterPPTModel.cs
  10. 12 0
      PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterRTFModel.cs
  11. 12 0
      PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterTextModel.cs
  12. 12 0
      PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterWordModel.cs
  13. 49 0
      PDF Office/PDF Office.csproj
  14. 3 1
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterProgressBarDialogViewModel.cs
  15. 1 1
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBatchProcessingDialogViewModel.cs
  16. 1 4
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageCompressDialogViewModel.cs
  17. 57 0
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterCSVViewModel.cs
  18. 454 0
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialogViewModel.cs
  19. 65 0
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterExcelViewModel.cs
  20. 63 0
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterImgViewModel.cs
  21. 56 0
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterWordViewModel.cs
  22. 0 4
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageSetPasswordDialogViewModel.cs
  23. 9 0
      PDF Office/ViewModels/HomePanel/HomeGuidContentViewModel.cs
  24. 16 6
      PDF Office/ViewModels/ViewContentViewModel.cs
  25. 16 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterCSV.xaml
  26. 15 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterCSV.xaml.cs
  27. 136 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialog.xaml
  28. 66 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialog.xaml.cs
  29. 27 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterExcel.xaml
  30. 36 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterExcel.xaml.cs
  31. 13 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterImg.xaml
  32. 79 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterImg.xaml.cs
  33. 19 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterWord.xaml
  34. 15 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterWord.xaml.cs

+ 184 - 176
PDF Office/App.xaml.cs

@@ -1,108 +1,109 @@
-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.HomePagePrinter;
 using PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
 using PDF_Office.Views.Dialog.ConverterDialogs;
 using PDF_Office.Helper;
+using PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter;
 
-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<HomePagePrinterModPosterContent>();
             containerRegistry.RegisterForNavigation<HomePagePrinterModMultipleContent>();
@@ -110,18 +111,23 @@ namespace PDF_Office
             containerRegistry.RegisterForNavigation<HomePageCompressDialog>();
             containerRegistry.RegisterForNavigation<HomePageSetPasswordDialog>();
             containerRegistry.RegisterForNavigation<ConverterBarContent>();
+            containerRegistry.RegisterForNavigation<HomePageConverterDialog>();
+            containerRegistry.RegisterForNavigation<HomePageConverterCSV>();
+            containerRegistry.RegisterForNavigation<HomePageConverterImg>();
+            containerRegistry.RegisterForNavigation<HomePageConverterWord>();
+            containerRegistry.RegisterForNavigation<HomePageConverterExcel>();
 
-            //注册弹窗
-            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<HomePageInsertDialog>(DialogNames.HomePageInsertDialog);
             containerRegistry.RegisterDialog<HomePageSplitDialog>(DialogNames.HomePageSplitDialog);
@@ -138,84 +144,86 @@ namespace PDF_Office
             containerRegistry.RegisterDialog<ConverterRTFDialog>(DialogNames.ConverterRTFDialog);
             containerRegistry.RegisterDialog<ConverterExcelDialog>(DialogNames.ConverterExcelDialog);
             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>
         /// 验证SDK和转档库密钥
         /// </summary>
         /// <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();
-            string devKey = "";
-            string devSecret = "";
-#if DEBUG
+            string devKey = "";
+            string devSecret = "";
+#if DEBUG
             devKey = "ehrnKqkWc1XSEAWyPUt6+95GzCoLEyoKrCbsUuJkCqGmxmP5ozX4bS0R6crHItQVNTFvC5mBZ1M7QjJ6Ekdu4Daj7PM+EDLTBKbFJinK4Ri9E5E2X+a9vF5zSj0TkIscQPVnwj9ikxAFOWGIyybMwQQzwc8a4j1cGOqGXQRDMMY=";
             devSecret = "mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4gQurxTxGuBlGAhs0P1mD3X3bHT+AHfcLiymaqE4DY7kTFHoPs9I3tl5ErS+BHdzHRhrp9sGpqfp0B228KI+IMTu4aGVjtYuk+Uxs/kosIBw1367/WkJ00tM7U7tttD6ccHhEu996bvBgqf8Sw8OekQKQq13VBewK5AckaDux4W7SGRhCUNWC4MItkr36JnXMD2tiFQYzMG8C66HYmRGSLh";
-#endif
+            devKey = sdkhelper.DevKey;
+            devSecret = sdkhelper.DevSecret;
+#endif
             string userKey = sdkhelper.UserKey; 
             string userSecret = sdkhelper.UserSecret; 
-
-            try
-            {
+
+            try
+            {
                 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 ConverterDevSecret = sdkhelper.ConverterDevSecret; 
             string ConverterUserkey = sdkhelper.ConverterUserkey; 
             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);
-                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);
+        }
+    }
+}

+ 1 - 0
PDF Office/Model/Dialog/ConverterDialogs/ConverterDialogsModel.cs

@@ -10,6 +10,7 @@ namespace PDF_Office.Model.Dialog.ConverterDialogs
     public class ConverterDialogsModel
     {
 
+
         /// <summary>
         /// 文档地址;
         /// </summary>

+ 2 - 2
PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBatchProcessingDialogModel.cs

@@ -11,8 +11,8 @@ namespace PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing
         public static int BatchProcessingIndex = 0;
 
         public static List<string> FilePaths=new List<string>();
-        // "HomePageShiftingDialog","HomePageCompressDialog" , "HomePageSetPasswordDialog", "HomePageWatermarkDialog", "HomePageBackgroundDialog", "HomePageHeaderFooterDialog", "HomePageBatesDialog", "HomePageDeleteSafetySettintgsDialog"
-        public static List<string> GetBatchProcessing = new List<string> { "HomePageShiftingDialog", "HomePageCompressDialog", "HomePageSetPasswordDialog", "HomePageWatermarkDialog", "HomePageBackgroundDialog", "HomePageHeaderFooterDialog", "HomePageBatesDialog", "HomePageDeleteSafetySettintgsDialog" };
+
+        public static List<string> GetBatchProcessing = new List<string> { "HomePageConverterDialog", "HomePageCompressDialog", "HomePageSetPasswordDialog", "HomePageWatermarkDialog", "HomePageBackgroundDialog", "HomePageHeaderFooterDialog", "HomePageBatesDialog", "HomePageDeleteSafetySettintgsDialog" };
 
     }
 }

+ 12 - 0
PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterCSVModel.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    public class HomePageConverterCSVModel: HomePageConverterDialogModel
+    {
+    }
+}

+ 45 - 0
PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialogModel.cs

@@ -0,0 +1,45 @@
+using ComPDFKit_Conversion.Converter;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    public class HomePageConverterDialogModel
+    {
+        public static List<string> GetConverter = new List<string> { "HomePageConverterWord","HomePageConverterExcel","HomePageConverterPPT","HomePageConverterRTF","HomePageConverterHTML"
+            ,"HomePageConverterText","HomePageConverterCSV","HomePageConverterImg" };
+
+        /// <summary>
+        /// 文档地址;
+        /// </summary>
+        public string InputPath = "";
+
+        /// <summary>
+        /// 输出地址;
+        /// </summary>
+        public string OutputPath = "";
+
+        /// <summary>
+        /// 进度;
+        /// </summary>
+        public OnProgress GetProgress = null;
+
+        /// <summary>
+        /// 页码 页码范围;
+        /// </summary>
+        public List<int> PageIndexLists = new List<int> { };
+
+        /// <summary>
+        /// 页面信息
+        /// </summary>
+        public string PageRange = "1,3-4,10";
+
+        /// <summary>
+        /// 文档密码;
+        /// </summary>
+        public string Pawssword = "";
+    }
+}

+ 22 - 0
PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterExcelModel.cs

@@ -0,0 +1,22 @@
+using ComPDFKit_Conversion.Options;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    public class HomePageConverterExcelModel: HomePageConverterDialogModel
+    {
+        public CPDFConvertExcelOptions excelOption = new CPDFConvertExcelOptions();
+
+        public CPDFConvertExcelOptions ExcelOptions(WorksheetOptions worksheetOptions = WorksheetOptions.ForEachPage, ContentOptions contentOptions = ContentOptions.AllContent)
+        {
+
+            excelOption.ContentOpts = contentOptions;
+            excelOption.WorksheetOpts = worksheetOptions;
+            return excelOption;
+        }
+    }
+}

+ 12 - 0
PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterHTMLModel.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    public class HomePageConverterHTMLModel : HomePageConverterDialogModel
+    {
+    }
+}

+ 15 - 0
PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterImgModel.cs

@@ -0,0 +1,15 @@
+using ComPDFKit_Conversion.Converter;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    public class HomePageConverterImgModel : HomePageConverterDialogModel
+    {
+        public ImgType Type = ImgType.JPEG;
+        public string DPI = "50";
+    }
+}

+ 12 - 0
PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterPPTModel.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    public class HomePageConverterPPTModel : HomePageConverterDialogModel
+    {
+    }
+}

+ 12 - 0
PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterRTFModel.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    public class HomePageConverterRTFModel : HomePageConverterDialogModel
+    {
+    }
+}

+ 12 - 0
PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterTextModel.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    public class HomePageConverterTextModel : HomePageConverterDialogModel
+    {
+    }
+}

+ 12 - 0
PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterWordModel.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    public class HomePageConverterWordModel : HomePageConverterDialogModel
+    {
+    }
+}

+ 49 - 0
PDF Office/PDF Office.csproj

@@ -238,6 +238,15 @@
     <Compile Include="Model\Dialog\ConverterDialogs\ConverterWordDialogModel.cs" />
     <Compile Include="Model\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageBatchProcessingDialogModel.cs" />
     <Compile Include="Model\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageCompressDialogModel.cs" />
+    <Compile Include="Model\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterCSVModel.cs" />
+    <Compile Include="Model\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterDialogModel.cs" />
+    <Compile Include="Model\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterExcelModel.cs" />
+    <Compile Include="Model\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterHTMLModel.cs" />
+    <Compile Include="Model\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterImgModel.cs" />
+    <Compile Include="Model\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterPPTModel.cs" />
+    <Compile Include="Model\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterRTFModel.cs" />
+    <Compile Include="Model\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterTextModel.cs" />
+    <Compile Include="Model\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterWordModel.cs" />
     <Compile Include="Model\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageSetPasswordDialogModel.cs" />
     <Compile Include="Model\Dialog\HomePageToolsDialogs\HomePagePictureToPDFDialogModel.cs" />
     <Compile Include="Model\Dialog\ToolsDialogs\CompressDialogModel\CompressDialogModel.cs" />
@@ -278,6 +287,11 @@
     <Compile Include="ViewModels\Dialog\ConverterDialogs\ConverterRTFDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ConverterDialogs\ConverterTextDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ConverterDialogs\ConverterWordDialogViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterDialogViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterCSVViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterExcelViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterImgViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterWordViewModel.cs" />
     <Compile Include="ViewModels\Tools\ConverterBarContentViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ExtractDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\FullScreenWindowViewModel.cs" />
@@ -359,6 +373,21 @@
     <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageCompressDialog.xaml.cs">
       <DependentUpon>HomePageCompressDialog.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterCSV.xaml.cs">
+      <DependentUpon>HomePageConverterCSV.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterDialog.xaml.cs">
+      <DependentUpon>HomePageConverterDialog.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterExcel.xaml.cs">
+      <DependentUpon>HomePageConverterExcel.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterImg.xaml.cs">
+      <DependentUpon>HomePageConverterImg.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterWord.xaml.cs">
+      <DependentUpon>HomePageConverterWord.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageSetPasswordDialog.xaml.cs">
       <DependentUpon>HomePageSetPasswordDialog.xaml</DependentUpon>
     </Compile>
@@ -600,6 +629,26 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterCSV.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterDialog.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterExcel.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterImg.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterWord.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageSetPasswordDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 3 - 1
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterProgressBarDialogViewModel.cs

@@ -65,6 +65,8 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
 
         public void OnDialogClosed()
         {
+            ConverterHelper.Clear();
+
         }
 
         public async void OnDialogOpened(IDialogParameters parameters)
@@ -83,7 +85,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                     {
                         PageNumber = ConverterCSVModel.PageIndexLists.Count().ToString();
                         result = await ConverterHelper.CSVConvert(ConverterCSVModel.InputPath, ConverterCSVModel.OutputPath, GetProgress, ConverterCSVModel.PageIndexLists, ConverterCSVModel.Pawssword);
-                        RequestClose.Invoke(new DialogResult(ButtonResult.Cancel));
+                       
                     }
                     break;
                 case "Excel":

+ 1 - 1
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBatchProcessingDialogViewModel.cs

@@ -50,7 +50,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
         }
 
         public void ChangeBatchProcessing(string index) {
-            if (index =="1"||index=="2") { 
+            if (index=="0"||index =="1"||index=="2") { 
             NavigationParameters param = new NavigationParameters();
             param.Add(ParameterNames.FilePath, HomePageBatchProcessingDialogModel.FilePaths);
             BatchProcessingVisible = Visibility.Collapsed;

+ 1 - 4
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageCompressDialogViewModel.cs

@@ -178,10 +178,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             }
             CompressGridIsEnabled = "True";
             MessageBoxEx.Show("已完成");
-            SetCompressGridIsEnabled = "False";
-            AddFileVisibility = Visibility.Visible;
-            fileNames.Clear();
-            HomePageBatchProcessingDialogModel.FilePaths.Clear();
+            
         }
 
         /// <summary>

+ 57 - 0
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterCSVViewModel.cs

@@ -0,0 +1,57 @@
+using PDF_Office.Model;
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Regions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    public class HomePageConverterCSVViewModel : BindableBase, INavigationAware
+    {
+        public DelegateCommand<string> RadioButtonCommand { get; set; }
+
+        public HomePageConverterDialogViewModel homePageConverterDialogViewModel { get; set; }
+
+        public HomePageConverterCSVViewModel()
+        {
+            RadioButtonCommand = new DelegateCommand<string>(radiobutton);
+        }
+        private void radiobutton(string e)
+        {
+            string radioButton = e;
+            if (radioButton != null)
+            {
+                switch (radioButton)
+                {
+                    case "ForEachPageRadioBtn":
+                        break;
+                    case "OnlyTableRadioBtn":
+                        break;
+                    default:
+                        break;
+                }
+            }
+
+        }
+
+        public void OnNavigatedTo(NavigationContext navigationContext)
+        {
+            var homePageConverterVM = navigationContext.Parameters[ParameterNames.ViewContentViewModel] as HomePageConverterDialogViewModel;
+            if (homePageConverterVM != null)
+            {
+                homePageConverterDialogViewModel = homePageConverterVM;
+            }
+        }
+
+        public bool IsNavigationTarget(NavigationContext navigationContext)
+        {
+            return true;
+        }
+
+        public void OnNavigatedFrom(NavigationContext navigationContext)
+        {
+        }
+    }
+}

+ 454 - 0
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialogViewModel.cs

@@ -0,0 +1,454 @@
+using ComPDFKit.PDFDocument;
+using ComPDFKit_Conversion.Converter;
+using Microsoft.Office.Interop.Word;
+using PDF_Office.CustomControl;
+using PDF_Office.Helper;
+using PDF_Office.Model;
+using PDF_Office.Model.Dialog.ConverterDialogs;
+using PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
+using PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter;
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Regions;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Windows;
+using System.Windows.Forms;
+using DataTable = System.Data.DataTable;
+
+namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    public class HomePageConverterDialogViewModel : BindableBase, INavigationAware
+    {
+        private List<string> fileNames;
+
+        public HomePageConverterCSVModel ConverterCSVModel = new HomePageConverterCSVModel();
+        public HomePageConverterExcelModel ConverterExcelModel = new HomePageConverterExcelModel();
+        public HomePageConverterHTMLModel ConverterHTMLModel = new HomePageConverterHTMLModel();
+        public HomePageConverterImgModel ConverterImgModel = new HomePageConverterImgModel();
+        public HomePageConverterPPTModel ConverterPPTModel = new HomePageConverterPPTModel();
+        public HomePageConverterRTFModel ConverterRTFModel = new HomePageConverterRTFModel();
+        public HomePageConverterTextModel ConverterTextModel = new HomePageConverterTextModel();
+        public HomePageConverterWordModel ConverterWordModel = new HomePageConverterWordModel();
+
+        private CPDFDocument tempDocument;
+
+        public string PageNumber = "";
+
+        public IRegionManager ConverterRegion;
+
+        public int ConverterTypeIndex=0;
+
+        public List<int> fileNamesView = new List<int>();
+
+        private int fileNamesIndex = 0;
+
+        public List<string> ConverterTypeFamily { set; get; } = new List<string>();
+
+        private void SetImageTypeOrigin()
+        {
+            this.ConverterTypeFamily.Add("Word");
+            this.ConverterTypeFamily.Add("Excel");
+            this.ConverterTypeFamily.Add("PPT");
+            this.ConverterTypeFamily.Add("RTF");
+            this.ConverterTypeFamily.Add("HTML");
+            this.ConverterTypeFamily.Add("Text");
+            this.ConverterTypeFamily.Add("CSV");
+            this.ConverterTypeFamily.Add("Img");
+        }
+
+        private string converterGridIsEnabled = "True";
+        public string ConverterGridIsEnabled
+        {
+            get
+            {
+                return converterGridIsEnabled;
+            }
+            set
+            {
+                SetProperty(ref converterGridIsEnabled, value);
+            }
+        }
+
+        private string setConverterGridIsEnabled = "True";
+        public string SetConverterGridIsEnabled
+        {
+            get
+            {
+                return setConverterGridIsEnabled;
+            }
+            set
+            {
+                SetProperty(ref setConverterGridIsEnabled, value);
+            }
+        }
+
+        private DataTable pdfDataTable = new DataTable();
+        public DataTable PDFDataTable
+        {
+            get { return pdfDataTable; }
+            set
+            {
+                SetProperty(ref pdfDataTable, value);
+            }
+        }
+
+       
+
+        private string removeIsEnable = "False";
+        public string RemoveIsEnable
+        {
+            get { return removeIsEnable; }
+            set
+            {
+                SetProperty(ref removeIsEnable, value);
+            }
+        }
+
+        private string selectFileName = "False";
+        public string SelectFileName
+        {
+            get { return selectFileName; }
+            set
+            {
+                SetProperty(ref selectFileName, value);
+            }
+        }
+
+        private string converterRegionName;
+        public string ConverterRegionName
+        {
+            get
+            {
+                return converterRegionName;
+            }
+            set
+            {
+                SetProperty(ref converterRegionName, value);
+            }
+        }
+
+        private Visibility converterVisible = Visibility.Collapsed;
+        public Visibility ConverterVisible
+        {
+            get { return converterVisible; }
+            set { SetProperty(ref converterVisible, value); }
+        }
+
+        private Visibility addFileVisibility = Visibility.Hidden;
+        public Visibility AddFileVisibility
+        {
+            get { return addFileVisibility; }
+            set
+            {
+                SetProperty(ref addFileVisibility, value);
+                RaisePropertyChanged();
+
+            }
+        }
+        public DelegateCommand ADDPDFCommand { get; set; }
+
+        public DelegateCommand RemovePDFFileCommand { get; set; }
+
+        public DelegateCommand ConvertCommand { get; set; }
+
+        public DelegateCommand ADDPDFFilesCommand { get; set; }
+
+        public HomePageConverterDialogViewModel(IRegionManager converterRegion)
+        {
+
+            SetImageTypeOrigin();
+            PDFDataTable.Columns.Add("FileName");
+            PDFDataTable.Columns.Add("FileSize");
+            PDFDataTable.Columns.Add("FileState");
+            ADDPDFCommand = new DelegateCommand(addpicture);
+            ADDPDFFilesCommand = new DelegateCommand(addpicturefiles);
+            RemovePDFFileCommand = new DelegateCommand(removepdffile);
+            ConvertCommand = new DelegateCommand(convert);
+            ConverterRegion = converterRegion;
+            ConverterRegionName=Guid.NewGuid().ToString();
+        }
+        private void SetProgress(int pageIndex)
+        {
+            PDFDataTable.Rows[fileNamesIndex]["FileState"] = "已经转换" + pageIndex.ToString() + "页";
+            pageIndex.ToString();
+        }
+        private async void convert()
+        {
+
+            bool result = false;
+            OnProgress GetProgress = null;
+            GetProgress += SetProgress;
+            fileNamesIndex = 0;
+            ConverterGridIsEnabled = "False";
+            foreach (var filename in fileNames)
+            {
+                FileInfo fileinfo = new FileInfo(filename);
+                string OutputPath = fileinfo.DirectoryName;
+                char[] enumerationSeparator = new char[] { ',' };
+                char[] rangeSeparator = new char[] { '-' };
+                List<int> PageIndexLists=new List<int>();
+                CPDFDocument document = CPDFDocument.InitWithFilePath(filename);
+                if (document == null)
+                {
+                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                    continue;
+                }
+                if (!CommonHelper.GetPagesInRange(ref PageIndexLists, "1-" + document.PageCount.ToString(),document.PageCount, enumerationSeparator, rangeSeparator))
+                { //TODO
+                    Trace.WriteLine("输入不对");
+                    MessageBoxEx.Show("输入不对");
+                    return;
+                }
+                switch (ConverterTypeIndex)
+                {
+                    case 0:
+                        if (ConverterWordModel != null)
+                        {
+                            PageNumber = ConverterWordModel.PageIndexLists.Count().ToString();
+                            result = await ConverterHelper.WordConvert(filename, OutputPath, GetProgress, PageIndexLists, ConverterWordModel.Pawssword);
+                        }
+                        break;
+
+                    case 1:
+                        if (ConverterExcelModel != null)
+                        {
+                            PageNumber = ConverterExcelModel.PageIndexLists.Count().ToString();
+                            result = await ConverterHelper.ExcelConvert(filename, OutputPath, GetProgress, PageIndexLists, ConverterExcelModel.Pawssword, ConverterExcelModel.excelOption);
+                        }
+                        break;
+                    case 2:
+
+                        if (ConverterPPTModel != null)
+                        {
+                            PageNumber = ConverterPPTModel.PageIndexLists.Count().ToString();
+                            result = await ConverterHelper.PPTConvert(filename, OutputPath, GetProgress, PageIndexLists, ConverterPPTModel.Pawssword);
+                        }
+                        break;
+                    case 3:
+
+                        if (ConverterRTFModel != null)
+                        {
+                            PageNumber = ConverterRTFModel.PageIndexLists.Count().ToString();
+                        }
+                        break;
+                    case 4:
+
+                        if (ConverterHTMLModel != null)
+                        {
+                            PageNumber = ConverterHTMLModel.PageIndexLists.Count().ToString();
+                        }
+                        break;
+                    case 5:
+
+                        if (ConverterTextModel != null)
+                        {
+                            PageNumber = ConverterTextModel.PageIndexLists.Count().ToString();
+                            result = await ConverterHelper.TxtConvert(filename, OutputPath, GetProgress, PageIndexLists, ConverterTextModel.Pawssword);
+                        }
+                        break;
+                    case 6:
+                        if (ConverterCSVModel != null)
+                        {
+                            PageNumber = ConverterCSVModel.PageIndexLists.Count().ToString();
+                            result = await ConverterHelper.CSVConvert(filename, OutputPath, GetProgress, ConverterCSVModel.PageIndexLists, ConverterCSVModel.Pawssword);
+                        }
+                        break;
+                    case 7:
+
+                        if (ConverterImgModel != null)
+                        {
+                            PageNumber = ConverterImgModel.PageIndexLists.Count().ToString();
+                            result = await ConverterHelper.ImgConvert(filename, OutputPath, GetProgress, PageIndexLists, ConverterImgModel.Pawssword, ConverterImgModel.Type);
+                        }
+                        break;
+                    default:
+                        break;
+                }
+                document.Release();
+                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
+                fileNamesIndex++;
+            }
+            ConverterGridIsEnabled = "True";
+        }
+        /// <summary>
+        /// 添加PDF文件
+        /// </summary>
+        private void addpicture()
+        {
+            System.Windows.Forms.OpenFileDialog dlg = new System.Windows.Forms.OpenFileDialog();
+            dlg.Multiselect = true;
+            dlg.Filter = "PDF|*.pdf;*.PDF;";
+            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
+            {
+                fileNames.AddRange(dlg.FileNames.ToList());
+                RemoveExcess(ref fileNames);
+                SetConverterGridIsEnabled = "True";
+                AddFileVisibility = Visibility.Collapsed;
+                updateListview("待确定");
+            }
+        }
+
+        /// <summary>
+        /// 删除重复的文件
+        /// </summary>
+        public void RemoveExcess(ref List<string> Filenames)
+        {
+            List<string> filenames = new List<string>();
+            foreach (var fileName in Filenames)
+            {
+                if (!filenames.Contains(fileName))
+                {
+                    filenames.Add(fileName);
+                }
+            }
+            Filenames.Clear();
+            Filenames = filenames;
+        }
+
+        /// <summary>
+        /// 添加PDF文件夹
+        /// </summary>
+        private void addpicturefiles()
+        {
+            FolderBrowserDialog dialog = new FolderBrowserDialog();
+            dialog.Description = "请选择文件路径";
+            if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
+            {
+
+                string foldPath = dialog.SelectedPath;
+                var apps = System.IO.Directory.GetFiles(foldPath);
+                foreach (string app in apps)
+                {
+                    var fi = new FileInfo(app);
+                    if (fi.Extension == ".pdf" || fi.Extension == ".PDF")
+                    {
+                        fileNames.Add(app);
+                    }
+                }
+                RemoveExcess(ref fileNames);
+                updateListview("待确定");
+                SetConverterGridIsEnabled = "True";
+                AddFileVisibility = Visibility.Collapsed;
+            }
+
+        }
+        /// <summary>
+        /// 更新listview显示
+        /// state 状态显示字符串
+        /// </summary>
+        public void updateListview(string state)
+        {
+            DataTable pdfdatatable = new DataTable();
+            pdfdatatable.Columns.Add("FileName");
+            pdfdatatable.Columns.Add("FileSize");
+            pdfdatatable.Columns.Add("FileState");
+            foreach (var fileName in fileNames)
+            {
+                string file_all = fileName;
+                FileInfo f = new FileInfo(file_all);
+                string file_size = (((float)f.Length) / 1024).ToString() + " K";
+                pdfdatatable.Rows.Add(f.Name, file_size, state);
+            }
+            PDFDataTable = pdfdatatable;
+            HomePageBatchProcessingDialogModel.FilePaths = fileNames;
+
+        }
+        /// <summary>
+        /// 逆序int类型集合
+        /// </summary>
+        public void Reverseorder(ref List<int> Numbers)
+        {
+            Numbers = Numbers.OrderBy(a => a).ToList();
+            Numbers.Reverse();
+        }
+
+        /// <summary>
+        /// 打开文件PDF
+        /// </summary>
+        public void openfiledialog()
+        {
+
+            foreach (int filenamesview in fileNamesView)
+            {
+                System.Diagnostics.Process.Start(fileNames[filenamesview]);
+            }
+        }
+
+        /// <summary>
+        /// 删除文件PDF
+        /// </summary>
+        public void removepdffile()
+        {
+            Reverseorder(ref fileNamesView);
+            foreach (int filenamesview in fileNamesView)
+            {
+                //Trace.WriteLine(filenamesview);
+                fileNames.Remove(fileNames[filenamesview]);
+            }
+            if (fileNames.Count < 1)
+            {
+                SetConverterGridIsEnabled = "False";
+                AddFileVisibility = Visibility.Visible;
+            }
+            updateListview("待确定");
+        }
+
+
+        public void PDFFileCount()
+        {
+            if (fileNames.Count == 0)
+            {
+                SetConverterGridIsEnabled = "False";
+                AddFileVisibility = Visibility.Visible;
+            }
+            else
+            {
+                SetConverterGridIsEnabled = "True";
+                AddFileVisibility = Visibility.Collapsed;
+            }
+        }
+        public void ChangeConverter(int index)
+        {
+            ConverterTypeIndex=index;
+            NavigationParameters param = new NavigationParameters();
+            param.Add(ParameterNames.ViewContentViewModel, this);
+            if (index == 0 || index == 1 || index == 6 || index == 7)
+            {
+                ConverterVisible = Visibility.Collapsed;
+                ConverterRegion.RequestNavigate(ConverterRegionName, HomePageConverterDialogModel.GetConverter[index], param);
+                ConverterVisible = Visibility.Visible;
+            }
+            else { ConverterVisible = Visibility.Collapsed; }
+
+        }
+        public void OnNavigatedTo(NavigationContext navigationContext)
+        {
+            List<string> filepath = new List<string>();
+            navigationContext.Parameters.TryGetValue<List<string>>(ParameterNames.FilePath, out filepath);
+            if (filepath != null)
+            {
+                fileNames = filepath;
+                PDFFileCount();
+                updateListview("待确定");
+                ChangeConverter(0);
+            }
+        }
+
+        public bool IsNavigationTarget(NavigationContext navigationContext)
+        {
+            return true;
+        }
+
+        public void OnNavigatedFrom(NavigationContext navigationContext)
+        {
+            ConverterHelper.Clear();
+        }
+    }
+}

+ 65 - 0
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterExcelViewModel.cs

@@ -0,0 +1,65 @@
+using ComPDFKit_Conversion.Options;
+using PDF_Office.Model;
+using PDF_Office.Model.Dialog.ConverterDialogs;
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Regions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    public class HomePageConverterExcelViewModel : BindableBase, INavigationAware
+    {
+        public ConverterExcelDialogModel ConverterExcelModel = new ConverterExcelDialogModel();
+
+        public DelegateCommand<string> RadioButtonCommand { get; set; }
+
+        public HomePageConverterDialogViewModel homePageConverterDialogViewModel { get; set; }
+
+        public HomePageConverterExcelViewModel()
+        {
+            RadioButtonCommand = new DelegateCommand<string>(radiobutton);
+        }
+        private void radiobutton(string e)
+        {
+            string radioButton = e;
+            if (radioButton != null)
+            {
+                switch (radioButton)
+                {
+                    case "ForEachPageRadioBtn":
+                        homePageConverterDialogViewModel. ConverterExcelModel.excelOption = ConverterExcelModel.ExcelOptions();
+                        break;
+                    case "ForTheDocRadioBtn":
+                        homePageConverterDialogViewModel.ConverterExcelModel.excelOption = ConverterExcelModel.ExcelOptions(WorksheetOptions.ForTheDocument);
+                        break;
+                    case "OnlyTableRadioBtn":
+                        homePageConverterDialogViewModel.ConverterExcelModel.excelOption = ConverterExcelModel.ExcelOptions(WorksheetOptions.ForEachTable, ContentOptions.OnlyTable);
+                        break;
+                    default:
+                        break;
+                }
+            }
+
+        }
+        public void OnNavigatedTo(NavigationContext navigationContext)
+        {
+            var homePageConverterVM = navigationContext.Parameters[ParameterNames.ViewContentViewModel] as HomePageConverterDialogViewModel;
+            if (homePageConverterVM != null)
+            {
+                homePageConverterDialogViewModel = homePageConverterVM;
+            }
+        }
+
+        public bool IsNavigationTarget(NavigationContext navigationContext)
+        {
+            return true;
+        }
+
+        public void OnNavigatedFrom(NavigationContext navigationContext)
+        {
+        }
+    }
+}

+ 63 - 0
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterImgViewModel.cs

@@ -0,0 +1,63 @@
+using PDF_Office.Model;
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Regions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    public class HomePageConverterImgViewModel : BindableBase, INavigationAware
+    {
+        public List<string> ImageTypeFamily { set; get; } = new List<string>();
+
+        public HomePageConverterDialogViewModel homePageConverterDialogViewModel { get; set; }
+
+        private void SetImageTypeOrigin()
+        {
+            this.ImageTypeFamily.Add("JPEG");
+            this.ImageTypeFamily.Add("JPG");
+            this.ImageTypeFamily.Add("PNG");
+            this.ImageTypeFamily.Add("GIF");
+            this.ImageTypeFamily.Add("TIFF");
+            this.ImageTypeFamily.Add("TGA");
+            this.ImageTypeFamily.Add("BMP");
+            this.ImageTypeFamily.Add("JPEG-2000");
+        }
+
+        public List<string> ImageDPIFamily { set; get; } = new List<string>();
+        private void SetImageDPIOrigin()
+        {
+            this.ImageDPIFamily.Add("50 dpi");
+            this.ImageDPIFamily.Add("72 dpi");
+            this.ImageDPIFamily.Add("96 dpi");
+            this.ImageDPIFamily.Add("150 dpi");
+            this.ImageDPIFamily.Add("300 dpi");
+            this.ImageDPIFamily.Add("600 dpi");
+        }
+
+        public HomePageConverterImgViewModel()
+        {
+            SetImageTypeOrigin();
+            SetImageDPIOrigin();
+        }
+        public void OnNavigatedTo(NavigationContext navigationContext)
+        {
+            var homePageConverterVM = navigationContext.Parameters[ParameterNames.ViewContentViewModel] as HomePageConverterDialogViewModel;
+            if (homePageConverterVM != null)
+            {
+                homePageConverterDialogViewModel = homePageConverterVM;
+            }
+        }
+
+        public bool IsNavigationTarget(NavigationContext navigationContext)
+        {
+            return true;
+        }
+
+        public void OnNavigatedFrom(NavigationContext navigationContext)
+        {
+        }
+    }
+}

+ 56 - 0
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterWordViewModel.cs

@@ -0,0 +1,56 @@
+using PDF_Office.Model;
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Regions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    public class HomePageConverterWordViewModel : BindableBase, INavigationAware
+    {
+        public DelegateCommand<string> RadioButtonCommand { get; set; }
+
+        public HomePageConverterDialogViewModel homePageConverterDialogViewModel { get; set; }
+
+        public HomePageConverterWordViewModel()
+        {
+            RadioButtonCommand = new DelegateCommand<string>(radiobutton);
+        }
+        private void radiobutton(string e)
+        {
+            string radioButton = e;
+            if (radioButton != null)
+            {
+                switch (radioButton)
+                {
+                    case "FlowingTextRadioBtn":
+                        break;
+                    case "PageLayoutRadioBtn":
+                        break;
+                    default:
+                        break;
+                }
+            }
+
+        }
+        public void OnNavigatedTo(NavigationContext navigationContext)
+        {
+            var homePageConverterVM = navigationContext.Parameters[ParameterNames.ViewContentViewModel] as HomePageConverterDialogViewModel;
+            if (homePageConverterVM != null)
+            {
+                homePageConverterDialogViewModel = homePageConverterVM;
+            }
+        }
+
+        public bool IsNavigationTarget(NavigationContext navigationContext)
+        {
+            return true;
+        }
+
+        public void OnNavigatedFrom(NavigationContext navigationContext)
+        {
+        }
+    }
+}

+ 0 - 4
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageSetPasswordDialogViewModel.cs

@@ -383,10 +383,6 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             }
             SafetyGridIsEnabled = "True";
             MessageBoxEx.Show("已完成");
-            SetSafetyGridIsEnabled = "False";
-            AddFileVisibility = Visibility.Visible;
-            fileNames.Clear();
-            HomePageBatchProcessingDialogModel.FilePaths.Clear();
         }
 
         /// <summary>

+ 9 - 0
PDF Office/ViewModels/HomePanel/HomeGuidContentViewModel.cs

@@ -107,6 +107,15 @@ namespace PDF_Office.ViewModels.HomePanel
                         securitypdf.Add(ParameterNames.FilePath, dlg.FileNames);
                         dialogs.ShowDialog(DialogNames.HomePageBatchProcessingDialog, securitypdf, e => { });
                         
+                        break;
+                    case PDFToolType.ConvertPDF:
+                        DialogParameters convertpdf = new DialogParameters();
+                        convertpdf.Add(ParameterNames.BatchProcessing_Name, "0");
+                        HomePageBatchProcessingDialogModel.FilePaths = dlg.FileNames.ToList();
+                        HomePageBatchProcessingDialogModel.BatchProcessingIndex = 1;
+                        convertpdf.Add(ParameterNames.FilePath, dlg.FileNames);
+                        dialogs.ShowDialog(DialogNames.HomePageBatchProcessingDialog, convertpdf, e => { });
+
                         break;
                 }
 

+ 16 - 6
PDF Office/ViewModels/ViewContentViewModel.cs

@@ -15,9 +15,10 @@ using PDF_Office.CustomControl;
 using PDF_Office.Model;
 using System.Windows;
 using System.Windows.Controls;
-using System.IO;
+using System.IO;
 using Prism.Events;
 using PDF_Office.EventAggregators;
+
 
 namespace PDF_Office.ViewModels
 {
@@ -83,6 +84,7 @@ namespace PDF_Office.ViewModels
                 SetProperty(ref propertyColumnWidth, value);
             }
         }
+
 
         private int gridToolRow = 1;
         /// <summary>
@@ -136,7 +138,7 @@ namespace PDF_Office.ViewModels
                 SetProperty(ref isLoading, value);
             }
         }
-
+
         private Visibility converterBarContentVisible = Visibility.Collapsed;
         /// <summary>
         /// 控制ToolsBarContent的显示
@@ -238,6 +240,7 @@ namespace PDF_Office.ViewModels
         #endregion
 
         public ViewContentViewModel(IRegionManager regionManager, IDialogService dialogService, IEventAggregator eventAggregator)
+
         {
             region = regionManager;
             dialogs = dialogService;
@@ -245,6 +248,7 @@ namespace PDF_Office.ViewModels
             LoadFile = new DelegateCommand(loadFile);
             Load = new DelegateCommand(LoadControl);
             SaveFile = new DelegateCommand(() => { saveFile(); });
+
             SaveAsFile = new DelegateCommand(() => { saveAsFile(); });
             UndoCommand = new DelegateCommand(Undo);
             RedoCommand = new DelegateCommand(Redo);
@@ -265,8 +269,8 @@ namespace PDF_Office.ViewModels
             barContentByTabItem = new Dictionary<string, string>();
             InitialregionNameByTabItem(ref regionNameByTabItem);
             InitialbarContentByTabItem(ref barContentByTabItem);
-
             eventAggregator.GetEvent<EditToolsEvent>().Subscribe(EnterEditTools);
+
         }
 
         private void InitialregionNameByTabItem(ref Dictionary<string, string> dictionary)
@@ -296,7 +300,6 @@ namespace PDF_Office.ViewModels
 
         private void UpdateShowContent(string currentBar)
         {
-
             ToolContentVisible = Visibility.Collapsed;
             ToolsBarContentVisible = Visibility.Collapsed;
             ConverterBarContentVisible = Visibility.Collapsed;
@@ -327,6 +330,7 @@ namespace PDF_Office.ViewModels
                 CanUndo = PDFViewer.UndoManager.CanUndo;
             }
             if (e.PropertyName == "CanRedo")
+
             {
                 CanRedo = PDFViewer.UndoManager.CanRedo;
             }
@@ -346,6 +350,7 @@ namespace PDF_Office.ViewModels
                 if (previousBar != currentBar)
                 {
                     if (currentBar == "TabItemPageEdit")//如果是页面编辑则进入页面编辑模式
+
                     {
                         EnterToolMode(barContentByTabItem[currentBar]);
                         isInPageEdit = true;
@@ -434,6 +439,7 @@ namespace PDF_Office.ViewModels
         private void Undo()
         {
             if (isInPageEdit)
+
             {
                 //执行页面编辑的Undo
                 PageEditUndo?.Invoke();
@@ -447,6 +453,7 @@ namespace PDF_Office.ViewModels
         private void Redo()
         {
             if (isInPageEdit)
+
             {
                 //执行页面编辑的Redo
                 PageEditRedo?.Invoke();
@@ -466,6 +473,7 @@ namespace PDF_Office.ViewModels
                 parameters.Add(ParameterNames.PDFViewer, PDFViewer);
                 parameters.Add(ParameterNames.ViewContentViewModel, this);
                 region.RequestNavigate(BOTARegionName, "BOTAContent", parameters);
+
             }
             ));
         }
@@ -670,10 +678,11 @@ namespace PDF_Office.ViewModels
         /// 显示前添加内容到Region
         /// </summary>
         /// <param name="isPageEdit"></param>
-        private void ShowContent(string currentBar, bool isToolMode = false)
+
+        private void ShowContent(string currentBar,bool isToolMode=false)
         {
             //显示页面编辑或其他工具
-            if (currentBar == "TabItemPageEdit" || isToolMode)
+            if (currentBar == "TabItemPageEdit"||isToolMode)
             {
                 if (currentBar == "TabItemPageEdit")//进入页面编辑
                 {
@@ -747,6 +756,7 @@ namespace PDF_Office.ViewModels
             }
             region.RequestNavigate(ToolContentRegionName, targetToolMode, param);
             ShowContent(currentBar, true);
+
 
             IsLoading = Visibility.Collapsed;
         }

+ 16 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterCSV.xaml

@@ -0,0 +1,16 @@
+<UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter.HomePageConverterCSV"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:prism="http://prismlibrary.com/"             
+             prism:ViewModelLocator.AutoWireViewModel="True">
+    <Grid>
+        <StackPanel Width="245">
+            <RadioButton Name="ForEachPageRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=ForEachPageRadioBtn,Path=Name}">
+                <TextBlock Text="将每个页面转换为一个单独的文档"/>
+            </RadioButton>
+            <RadioButton Margin="0,6,0,0" Name="OnlyTableRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=ForTheDocRadioBtn,Path=Name}">
+                <TextBlock Text="只提取表格"/>
+            </RadioButton>
+        </StackPanel>
+    </Grid>
+</UserControl>

+ 15 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterCSV.xaml.cs

@@ -0,0 +1,15 @@
+using System.Windows.Controls;
+
+namespace PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    /// <summary>
+    /// Interaction logic for HomePageConverterCSV
+    /// </summary>
+    public partial class HomePageConverterCSV : UserControl
+    {
+        public HomePageConverterCSV()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 136 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialog.xaml

@@ -0,0 +1,136 @@
+<UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter.HomePageConverterDialog"
+            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:prism="http://prismlibrary.com/"
+             prism:ViewModelLocator.AutoWireViewModel="True"
+             xmlns:convert="clr-namespace:PDF_Office.DataConvert"
+             d:DesignHeight="462"
+             d:DesignWidth="892"
+             mc:Ignorable="d">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <convert:UnVisivleConvert x:Key="unVisibleConvert"/>
+        </ResourceDictionary>
+    </UserControl.Resources>
+
+    <Grid IsEnabled="{Binding ConverterGridIsEnabled}">
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="632"/>
+            <ColumnDefinition Width="260"/>
+        </Grid.ColumnDefinitions>
+        <Grid Grid.Column="0">
+            <Grid.RowDefinitions>
+                <RowDefinition Height="398"/>
+                <RowDefinition Height="72"/>
+            </Grid.RowDefinitions>
+            <Button Name="BtnBlank" Grid.Row="0" Background="Green" Height="300" Width="300" Visibility="{Binding AddFileVisibility}" Command="{Binding ADDPDFCommand}" >
+            </Button>
+            <ListView x:Name="listView" DataContext="{Binding PDFDataTable,Mode=TwoWay}" Grid.Row="0" Background="White"  ItemsSource="{Binding}" SelectionChanged="listView_SelectionChanged" Visibility="{Binding ElementName=BtnBlank, Path=Visibility, Converter={StaticResource unVisibleConvert}}">
+                <ListView.ContextMenu>
+                    <ContextMenu  StaysOpen="True" >
+                        <MenuItem Header="打开文件" Name="OpenFileMenuItem"  Click="OpenFileMenuItem_Click"/>
+                        <MenuItem Header="移除" Name="RemoveFileMenuItem" Click="RemoveFileMenuItem_Click"/>
+                    </ContextMenu>
+                </ListView.ContextMenu>
+                <ListView.View>
+                    <GridView>
+                        <GridViewColumn  Header="文档名"  Width="400" DisplayMemberBinding="{Binding FileName}"/>
+                        <GridViewColumn Header="大小" Width="100" DisplayMemberBinding="{Binding FileSize}"/>
+                        <GridViewColumn Header="状态" Width="80" >
+                            <GridViewColumn.CellTemplate>
+                                <DataTemplate>
+                                    <TextBlock Text="{Binding FileState}" TextDecorations="Underline" Foreground="Black"/>
+                                </DataTemplate>
+                            </GridViewColumn.CellTemplate>
+                        </GridViewColumn>
+                    </GridView>
+                </ListView.View>
+                <ListView.ItemContainerStyle>
+                    <Style TargetType="ListViewItem">
+                        <Setter Property="Height" Value="42"/>
+                        <Style.Triggers>
+                            <Trigger Property="ListView.AlternationIndex" Value="1">
+                                <Setter Property="Background" Value="LightGray"/>
+                            </Trigger>
+                        </Style.Triggers>
+                    </Style>
+                </ListView.ItemContainerStyle>
+            </ListView>
+            <Grid Grid.Row="1">
+                <Button x:Name="MenuBtn"  Width="113"
+                    Height="40"
+                    Margin="25,0,0,0"
+                    HorizontalAlignment="Left" Click="Menu_Click">
+                    <StackPanel Orientation="Horizontal" >
+                        <Border HorizontalAlignment="Right">
+                            <TextBlock Text="添加文件" FontSize="18" Foreground="Black"></TextBlock>
+                        </Border>
+                        <Border  Margin="12,0,0,0">
+                            <Path  VerticalAlignment="Center" HorizontalAlignment="Right" Stroke="Black"  Data="M0 0L8 4 L16 0" Height="10" Stretch="Fill" />
+                        </Border>
+                    </StackPanel>
+                </Button>
+                <Popup x:Name="menuPop1" StaysOpen="False"  AllowsTransparency="True" PlacementTarget="{Binding ElementName=MenuBtn}">
+                    <Grid Height="auto" Width="auto" HorizontalAlignment="Left">
+                        <Border BorderThickness="0" CornerRadius="3" Background="White" Margin="3">
+                            <Border.Effect>
+                                <DropShadowEffect ShadowDepth="0" Color="#FFB6B6B6"/>
+                            </Border.Effect>
+                            <StackPanel Margin="0">
+                                <MenuItem x:Name="添加文件" Header="添加文件" Command="{Binding ADDPDFCommand}"></MenuItem>
+                                <MenuItem x:Name="添加文件夹" Header="添加文件夹" Command="{Binding ADDPDFFilesCommand}"></MenuItem>
+                            </StackPanel>
+                        </Border>
+                    </Grid>
+                </Popup>
+
+                <Button
+                    Width="40"
+                    Height="40"
+                    Margin="0,0,90,0"
+                    HorizontalAlignment="Right">
+
+                </Button>
+                <Button
+                    Width="40"
+                    Height="40"
+                    Margin="25,0"
+                    HorizontalAlignment="Right"
+                    IsEnabled="{Binding RemoveIsEnable}"
+                    Command="{Binding RemovePDFFileCommand}"
+                    >
+
+                </Button>
+            </Grid>
+        </Grid>
+        <Grid Grid.Column="1" Background="WhiteSmoke" IsEnabled="{Binding SetConverterGridIsEnabled}">
+            <Grid.RowDefinitions>
+                <RowDefinition Height="*"/>
+                <RowDefinition Height="72"/>
+            </Grid.RowDefinitions>
+            <StackPanel Orientation="Vertical" Margin="15,16,0,0" Grid.Row="0">
+                <StackPanel Orientation="Vertical">
+                    <TextBlock Text="转档格式"/>
+                    <ComboBox Name="ConverterTypeComboBox"  Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left" ItemsSource="{Binding ConverterTypeFamily}" SelectedIndex="0"  SelectionChanged="ConverterTypeComboBox_SelectionChanged">
+                    </ComboBox>
+                </StackPanel>
+                <ContentControl Margin="0,18,0,0" x:Name="PrintMod" prism:RegionManager.RegionName="{Binding ConverterRegionName}"   Visibility="{Binding ConverterVisible}"/>
+                <StackPanel Orientation="Vertical" Margin="0,18,0,0">
+                    <TextBlock Text="文本识别设置:" HorizontalAlignment="Left" Width="84" Height="20"/>
+                    <CheckBox Name="OCRCheckBox"  Margin="0,5,0,0">
+                        <TextBlock Text="在需要时识别文本"/>
+                    </CheckBox>
+                    <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}"  Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left">
+                    </ComboBox>
+                </StackPanel>
+            </StackPanel>
+            <Grid Grid.Row="2">
+                <Button Height="40" Width="228" Background="Black" Command="{Binding ConvertCommand}">
+                    <TextBlock Text="转档" FontSize="18" Foreground="White"/>
+                </Button>
+            </Grid>
+        </Grid>
+    </Grid>
+</UserControl>

+ 66 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialog.xaml.cs

@@ -0,0 +1,66 @@
+using PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
+using PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter;
+using Prism.Ioc;
+using Prism.Regions;
+using System.Collections;
+using System.Windows.Controls;
+
+namespace PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    /// <summary>
+    /// Interaction logic for HomePageConverterDialog
+    /// </summary>
+    public partial class HomePageConverterDialog : UserControl
+    {
+        private IContainerProvider containerProvider;
+        public HomePageConverterDialog(IContainerProvider containerProvider)
+        {
+            InitializeComponent();
+            this.containerProvider = containerProvider;
+            var regionManager = containerProvider.Resolve<IRegionManager>();
+            RegionManager.SetRegionManager(this, regionManager);
+            RegionManager.UpdateRegions();
+        }
+        private void Menu_Click(object sender, System.Windows.RoutedEventArgs e)
+        {
+            menuPop1.IsOpen = true;
+        }
+
+        private void listView_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+            IList list = listView.SelectedItems;
+            var lists = listView.Items;
+            System.Data.DataRowView a;
+            ((HomePageConverterDialogViewModel)this.DataContext).fileNamesView.Clear();
+            foreach (var item in list)
+            {
+                a = (System.Data.DataRowView)item;
+                ((HomePageConverterDialogViewModel)this.DataContext).fileNamesView.Add(lists.IndexOf(a));
+            }
+            if (((HomePageConverterDialogViewModel)this.DataContext).fileNamesView.Count > 0)
+            {
+                ((HomePageConverterDialogViewModel)this.DataContext).RemoveIsEnable = "True";
+            }
+            else
+            {
+                ((HomePageConverterDialogViewModel)this.DataContext).RemoveIsEnable = "False";
+            }
+
+        }
+
+        private void RemoveFileMenuItem_Click(object sender, System.Windows.RoutedEventArgs e)
+        {
+            ((HomePageConverterDialogViewModel)this.DataContext).removepdffile();
+        }
+
+        private void OpenFileMenuItem_Click(object sender, System.Windows.RoutedEventArgs e)
+        {
+            ((HomePageConverterDialogViewModel)this.DataContext).openfiledialog();
+        }
+
+        private void ConverterTypeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+            ((HomePageConverterDialogViewModel)this.DataContext).ChangeConverter(ConverterTypeComboBox.SelectedIndex);
+        }
+    }
+}

+ 27 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterExcel.xaml

@@ -0,0 +1,27 @@
+<UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter.HomePageConverterExcel"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:prism="http://prismlibrary.com/"             
+             prism:ViewModelLocator.AutoWireViewModel="True">
+    <Grid>
+        <StackPanel Orientation="Vertical" Width="245">
+            <TextBlock Text="Excel工作簿设置:" Height="20"/>
+            <StackPanel Orientation="Vertical" Margin="0,7,0,0">
+                <RadioButton Name="ForEachPageRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=ForEachPageRadioBtn,Path=Name}">
+                    <TextBlock Text="将每个页面转换为一个单独的工作表"/>
+                </RadioButton>
+                <RadioButton Margin="0,6,0,0" Name="ForTheDocRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=ForTheDocRadioBtn,Path=Name}">
+                    <TextBlock Text="将所有页面转换为一个工作表格式"/>
+                </RadioButton>
+                <RadioButton Margin="0,10,0,0" Name="OnlyTableRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=OnlyTableRadioBtn,Path=Name}">
+                    <TextBlock Text="只提取表格"/>
+                </RadioButton>
+                <ComboBox Name="OnlyTableComboBox" Margin="0,8,0,0" Width="228" Height="28.55" IsEnabled="{Binding ElementName=OnlyTableRadioBtn,Path=IsChecked}" SelectionChanged="OnlyTableComboBox_SelectionChanged">
+                    <ComboBoxItem Content="支持一个表格提取到单独的工作表"/>
+                    <ComboBoxItem Content="支持按页面提取表格到单独的工作表"/>
+                    <ComboBoxItem Content="支持将所有表格提取到一个工作表"/>
+                </ComboBox>
+            </StackPanel>
+        </StackPanel>
+    </Grid>
+</UserControl>

+ 36 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterExcel.xaml.cs

@@ -0,0 +1,36 @@
+using ComPDFKit_Conversion.Options;
+using PDF_Office.ViewModels.Dialog.ConverterDialogs;
+using PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter;
+using System.Windows.Controls;
+
+namespace PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    /// <summary>
+    /// Interaction logic for HomePageConverterExcel
+    /// </summary>
+    public partial class HomePageConverterExcel : UserControl
+    {
+        public HomePageConverterExcel()
+        {
+            InitializeComponent();
+        }
+
+        private void OnlyTableComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+            switch (OnlyTableComboBox.SelectedIndex)
+            {
+                case 0:
+                    ((HomePageConverterExcelViewModel)this.DataContext).homePageConverterDialogViewModel.ConverterExcelModel.excelOption = ((HomePageConverterExcelViewModel)this.DataContext).ConverterExcelModel.ExcelOptions(WorksheetOptions.ForEachTable, ContentOptions.OnlyTable);
+                    break;
+                case 1:
+                    ((HomePageConverterExcelViewModel)this.DataContext).homePageConverterDialogViewModel.ConverterExcelModel.excelOption = ((HomePageConverterExcelViewModel)this.DataContext).ConverterExcelModel.ExcelOptions(WorksheetOptions.ForEachPage, ContentOptions.OnlyTable);
+                    break;
+                case 2:
+                    ((HomePageConverterExcelViewModel)this.DataContext).homePageConverterDialogViewModel.ConverterExcelModel.excelOption = ((HomePageConverterExcelViewModel)this.DataContext).ConverterExcelModel.ExcelOptions(WorksheetOptions.ForTheDocument, ContentOptions.OnlyTable);
+                    break;
+                default:
+                    break;
+            }
+        }
+    }
+}

+ 13 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterImg.xaml

@@ -0,0 +1,13 @@
+<UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter.HomePageConverterImg"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:prism="http://prismlibrary.com/"             
+             prism:ViewModelLocator.AutoWireViewModel="True">
+    <Grid>
+        <StackPanel Width="245">
+            <TextBlock Text="文件类型" Height="20" Width="48" HorizontalAlignment="Left" />
+            <ComboBox Name="ImageTypeComboBox" Height="32" Width="228" HorizontalAlignment="Left" Margin="0,8,0,0" ItemsSource="{Binding ImageTypeFamily}" SelectedIndex="0" SelectionChanged="ImageTypeComboBox_SelectionChanged"></ComboBox>
+            <ComboBox Name="ImageDPIComboBox" Height="32" Width="228" HorizontalAlignment="Left" Margin="0,8,0,0" ItemsSource="{Binding ImageDPIFamily}" SelectedIndex="0" SelectionChanged="ImageDPIComboBox_SelectionChanged"></ComboBox>
+        </StackPanel>
+    </Grid>
+</UserControl>

+ 79 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterImg.xaml.cs

@@ -0,0 +1,79 @@
+using ComPDFKit_Conversion.Converter;
+using PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter;
+using System.Diagnostics;
+using System.Windows.Controls;
+
+namespace PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    /// <summary>
+    /// Interaction logic for HomePageConverterImg
+    /// </summary>
+    public partial class HomePageConverterImg : UserControl
+    {
+        public HomePageConverterImg()
+        {
+            InitializeComponent();
+        }
+
+        private void ImageTypeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+            if (((HomePageConverterImgViewModel)this.DataContext).homePageConverterDialogViewModel==null)
+                return;
+            switch (ImageTypeComboBox.SelectedIndex)
+            {
+                case 0:
+                    ((HomePageConverterImgViewModel)this.DataContext).homePageConverterDialogViewModel.ConverterImgModel.Type = ImgType.JPEG;
+                    break;
+                case 1:
+                    ((HomePageConverterImgViewModel)this.DataContext).homePageConverterDialogViewModel.ConverterImgModel.Type = ImgType.JPEG;
+                    break;
+                case 2:
+                    ((HomePageConverterImgViewModel)this.DataContext).homePageConverterDialogViewModel.ConverterImgModel.Type = ImgType.PNG;
+                    break;
+                case 3:
+                    ((HomePageConverterImgViewModel)this.DataContext).homePageConverterDialogViewModel.ConverterImgModel.Type = ImgType.JPEG;
+                    break;
+                case 4:
+                    ((HomePageConverterImgViewModel)this.DataContext).homePageConverterDialogViewModel.ConverterImgModel.Type = ImgType.JPEG;
+                    break;
+                case 5:
+                    ((HomePageConverterImgViewModel)this.DataContext).homePageConverterDialogViewModel.ConverterImgModel.Type = ImgType.JPEG;
+                    break;
+                case 6:
+                    ((HomePageConverterImgViewModel)this.DataContext).homePageConverterDialogViewModel.ConverterImgModel.Type = ImgType.JPEG;
+                    break;
+                case 7:
+                    ((HomePageConverterImgViewModel)this.DataContext).homePageConverterDialogViewModel.ConverterImgModel.Type = ImgType.JPEG;
+                    break;
+                default:
+                    break;
+            }
+        }
+        private void ImageDPIComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+            switch (ImageDPIComboBox.SelectedIndex)
+            {
+                case 0:
+                    Trace.WriteLine("50");
+                    break;
+                case 1:
+                    Trace.WriteLine("72");
+                    break;
+                case 2:
+                    Trace.WriteLine("96");
+                    break;
+                case 3:
+                    Trace.WriteLine("150");
+                    break;
+                case 4:
+                    Trace.WriteLine("300");
+                    break;
+                case 5:
+                    Trace.WriteLine("600");
+                    break;
+                default:
+                    break;
+            }
+        }
+    }
+}

+ 19 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterWord.xaml

@@ -0,0 +1,19 @@
+<UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter.HomePageConverterWord"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:prism="http://prismlibrary.com/"             
+             prism:ViewModelLocator.AutoWireViewModel="True">
+    <Grid>
+        <StackPanel Orientation="Vertical" Margin="0,16,0,0" HorizontalAlignment="Left" Width="245">
+            <TextBlock Text="版面设置:" Width="60" Height="20" HorizontalAlignment="Left"/>
+            <StackPanel Orientation="Vertical" Margin="0,7,0,0">
+                <RadioButton Name="FlowingTextRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=FlowingTextRadioBtn,Path=Name}">
+                    <TextBlock Text="保留流排文本"/>
+                </RadioButton>
+                <RadioButton  Margin="0,15,0,0" Name="PageLayoutRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=PageLayoutRadioBtn,Path=Name}">
+                    <TextBlock Text="保留页面布局"/>
+                </RadioButton>
+            </StackPanel>
+        </StackPanel>
+    </Grid>
+</UserControl>

+ 15 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterWord.xaml.cs

@@ -0,0 +1,15 @@
+using System.Windows.Controls;
+
+namespace PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
+{
+    /// <summary>
+    /// Interaction logic for HomePageConverterWord
+    /// </summary>
+    public partial class HomePageConverterWord : UserControl
+    {
+        public HomePageConverterWord()
+        {
+            InitializeComponent();
+        }
+    }
+}