Browse Source

其他-修正代码命名

liyijie 2 years ago
parent
commit
6ff4d4b911
23 changed files with 647 additions and 406 deletions
  1. 198 196
      PDF Office/App.xaml.cs
  2. 80 66
      PDF Office/CustomControl/NumericUpDown.xaml.cs
  3. 10 5
      PDF Office/Model/DialogNames.cs
  4. 28 0
      PDF Office/Model/MainPageToolsDialogs/MainPageExtractDialogModel.cs
  5. 26 0
      PDF Office/Model/MainPageToolsDialogs/MainPageInsertDialogModel.cs
  6. 44 0
      PDF Office/Model/MainPageToolsDialogs/MainPageSplitDialogModel.cs
  7. 27 16
      PDF Office/PDF Office.csproj
  8. 3 3
      PDF Office/ViewModels/Dialog/MainPageToolsDialogs/MainPageExtractDialogViewModel.cs
  9. 3 3
      PDF Office/ViewModels/Dialog/MainPageToolsDialogs/MainPageInsertDialogViewModel.cs
  10. 37 0
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDialogViewModel.cs
  11. 35 34
      PDF Office/ViewModels/Dialog/MainPageToolsDialogs/MainPagePrinterDialogViewModel.cs
  12. 3 3
      PDF Office/ViewModels/Dialog/MainPageToolsDialogs/MainPageSplitDialogViewModel.cs
  13. 59 59
      PDF Office/ViewModels/HomePanel/HomeGuidContentViewModel.cs
  14. 2 2
      PDF Office/Views/Dialog/MainPageToolsDialogs/MainPageExtractDialog.xaml
  15. 3 3
      PDF Office/Views/Dialog/MainPageToolsDialogs/MainPageExtractDialog.xaml.cs
  16. 3 3
      PDF Office/Views/Dialog/MainPageToolsDialogs/MainPageInsertDialog.xaml
  17. 3 3
      PDF Office/Views/Dialog/MainPageToolsDialogs/MainPageInsertDialog.xaml.cs
  18. 3 3
      PDF Office/Views/Dialog/MainPageToolsDialogs/MainPagePrinterDialog.xaml
  19. 3 3
      PDF Office/Views/Dialog/MainPageToolsDialogs/MainPagePrinterDialog.xaml.cs
  20. 58 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterPageSetDialog.xaml
  21. 15 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterPageSetDialog.xaml.cs
  22. 1 1
      PDF Office/Views/Dialog/MainPageToolsDialogs/MainPageSplitDialog.xaml
  23. 3 3
      PDF Office/Views/Dialog/MainPageToolsDialogs/MainPageSplitDialog.xaml.cs

+ 198 - 196
PDF Office/App.xaml.cs

@@ -1,196 +1,198 @@
-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.MainPageToolsDialogs ;
-using PDF_Office.ViewModels.Dialog.MainPageToolsDialogs;
-
-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.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<MainPageExtractDialog>(DialogNames.MainPageExtractDialog);
-            containerRegistry.RegisterDialog<MainPageInsertDialog>(DialogNames.MainPageInsertDialog);
-            containerRegistry.RegisterDialog<MainPageSplitDialog>(DialogNames.MainPageSplitDialog);
-            containerRegistry.RegisterDialog<MainPagePrinterDialog>(DialogNames.MainPagePrinterDialog);
-
-        }
-
-        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);
-        }
-
-        private static bool LicenseVerify()
-        {
-            bool result = false;
-            try
-            {
-                result = CPDFSDKVerifier.LoadNativeLibrary();
-                if (!result)
-                    return false;
-            }
-            catch{ }
-            string devKey = "";
-            string devSecret = "";
-#if DEBUG
-            devKey = "sTHSivIW4YnZQavIYDLVw4vaFcN5DQTUtRGrVyv5p9aeaHX3GirG/MBxl6Wy9TJbNOwR4CU6LPjHmGe3Po3OtBCPqIRheam9+LomScw3AvoUTHFlG1134e2J4enF43WJQ6PyOnjwZqsG1kUdlBPNztkoPzDAE2pQKgZWf6V2i34=";
-            devSecret = "mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4gQurxTxGuBlGAhs0P1mD3X3bHT+AHfcLiymaqE4DY7kTFHoPs9I3tl5ErS+BHdzHRhrp9sGpqfp0B228KI+IMTu4aGVjtYuk+Uxs/kosIBw1367/WkJ00tM7U7tttD6cfaiHpW8pgW2aur3AxuQIBBLuJD5gcmNxTYW3KA32JLG8alfyXjKFVS3gka9bngvwfZ7GuNXybjKlmz1tnN6iVHpnbSj+xOHhWEperY4HHrSg==";
-#endif
-
-            string userKey = "iBPRM/Tz8b6Z1G2GQt52X7hiNCGfVYXztnPjalgrgARvqfKV6lFNH8QeScTzBRYI8GGFpwelfgh790Kd9JmL7V4adI1jCiFHUT2DLT7QucxY5Nkgys2aJItQS482Ck2G2Xf8gNgojxYxRt65o/MEzkj93foj8qIdfHagXsSorSs=";
-            string userSecret = "mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4ivEHOmPIqbfhpDnKKj+7Ymj2rXQvfZRmke06HMV+3tt064G64WjPW8+EbGCNZaAh1hrp9sGpqfp0B228KI+IMTu4aGVjtYuk+Uxs/kosIBw1FKJi6HYB+DuugQyaqI2prfej861QnJrU4s2T/npZK/";
-
-            try
-            {
-                CPDFSDKVerifier.LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(devKey, devSecret, userKey, userSecret);
-                if (verifyResult != CPDFSDKVerifier.LicenseErrorCode.LICENSE_ERR_SUCCESS)
-                    return false;
-            }
-            catch{ }
-
-
-
-            string ConverterDevKey = "mDDCTNY5rV2+FUj2JESUBruJ0643Tv7rNuxACu6g3L/0guIw1r8zZB+o3aw3rs4rrOThmxBXpEDcItvyGx096mF/3Ixg7aD6QZk5HvBEScIPerdM3KnhgwMwCjE0DYOSMCRwAhbA2xjXfXgT5VVo7JZroKOGQB5Qmf2kLl5nQuU=";
-            string ConverterDevSecret = "mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4g3S5AixMY+3TX1FpQaugG9sTsnCq4QxIEDzyAI3s3dWjNe3wDsMrmFq51HtjPa2tSFAoV6NtcUJC8skonXVk7kMv7C2jvq4o0q6sQtN3jR42k0n/LkN5UfbQ5Lfel4OfZrk7dh2/DUR87Ps4vBX1hrYkwcNWVMyYvggPV2rTFvfawopGIC034QzjthmhwwX90=";
-            string ConverterUserkey = "WLUHzXhndQKyrTJVzvZ+dvPXDQDZeJpcSvklX3GJwRX4+urd8eQskYgbeCf0NXLZ/qJkS/k10x+qGad34i4v5rI/ASFIx901c/Nw5C0YJMH7X87dib141tdAmSmQhnKLO5TBi4FiAidboyvnLFLrYGMmS2kLQOXFPwPj5zQUv5A=";
-            string ConverterUserSecret = "mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4iK16EcneqBPRe2eKQLuJXpA79IONX9GVI/Ap3uWzMcNWaitc2UB6gDeexJXFPVaXOFAoV6NtcUJC8skonXVk7k/oKTJGcYKLPGdXenrzHolQ==";
-
-            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, ConverterUserkey, ConverterUserSecret);
-                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);
-        }
-    }
-}
+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;
+
+
+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.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);
+            containerRegistry.RegisterDialog<HomePagePrinterDialog>(DialogNames.HomePagePrinterDialog);
+            containerRegistry.RegisterDialog<HomePagePrinterPageSetDialog>(DialogNames.HomePagePrinterPageSetDialog);
+
+        }
+
+        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);
+        }
+
+        private static bool LicenseVerify()
+        {
+            bool result = false;
+            try
+            {
+                result = CPDFSDKVerifier.LoadNativeLibrary();
+                if (!result)
+                    return false;
+            }
+            catch{ }
+            string devKey = "";
+            string devSecret = "";
+#if DEBUG
+            devKey = "sTHSivIW4YnZQavIYDLVw4vaFcN5DQTUtRGrVyv5p9aeaHX3GirG/MBxl6Wy9TJbNOwR4CU6LPjHmGe3Po3OtBCPqIRheam9+LomScw3AvoUTHFlG1134e2J4enF43WJQ6PyOnjwZqsG1kUdlBPNztkoPzDAE2pQKgZWf6V2i34=";
+            devSecret = "mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4gQurxTxGuBlGAhs0P1mD3X3bHT+AHfcLiymaqE4DY7kTFHoPs9I3tl5ErS+BHdzHRhrp9sGpqfp0B228KI+IMTu4aGVjtYuk+Uxs/kosIBw1367/WkJ00tM7U7tttD6cfaiHpW8pgW2aur3AxuQIBBLuJD5gcmNxTYW3KA32JLG8alfyXjKFVS3gka9bngvwfZ7GuNXybjKlmz1tnN6iVHpnbSj+xOHhWEperY4HHrSg==";
+#endif
+
+            string userKey = "iBPRM/Tz8b6Z1G2GQt52X7hiNCGfVYXztnPjalgrgARvqfKV6lFNH8QeScTzBRYI8GGFpwelfgh790Kd9JmL7V4adI1jCiFHUT2DLT7QucxY5Nkgys2aJItQS482Ck2G2Xf8gNgojxYxRt65o/MEzkj93foj8qIdfHagXsSorSs=";
+            string userSecret = "mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4ivEHOmPIqbfhpDnKKj+7Ymj2rXQvfZRmke06HMV+3tt064G64WjPW8+EbGCNZaAh1hrp9sGpqfp0B228KI+IMTu4aGVjtYuk+Uxs/kosIBw1FKJi6HYB+DuugQyaqI2prfej861QnJrU4s2T/npZK/";
+
+            try
+            {
+                CPDFSDKVerifier.LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(devKey, devSecret, userKey, userSecret);
+                if (verifyResult != CPDFSDKVerifier.LicenseErrorCode.LICENSE_ERR_SUCCESS)
+                    return false;
+            }
+            catch{ }
+
+
+
+            string ConverterDevKey = "mDDCTNY5rV2+FUj2JESUBruJ0643Tv7rNuxACu6g3L/0guIw1r8zZB+o3aw3rs4rrOThmxBXpEDcItvyGx096mF/3Ixg7aD6QZk5HvBEScIPerdM3KnhgwMwCjE0DYOSMCRwAhbA2xjXfXgT5VVo7JZroKOGQB5Qmf2kLl5nQuU=";
+            string ConverterDevSecret = "mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4g3S5AixMY+3TX1FpQaugG9sTsnCq4QxIEDzyAI3s3dWjNe3wDsMrmFq51HtjPa2tSFAoV6NtcUJC8skonXVk7kMv7C2jvq4o0q6sQtN3jR42k0n/LkN5UfbQ5Lfel4OfZrk7dh2/DUR87Ps4vBX1hrYkwcNWVMyYvggPV2rTFvfawopGIC034QzjthmhwwX90=";
+            string ConverterUserkey = "WLUHzXhndQKyrTJVzvZ+dvPXDQDZeJpcSvklX3GJwRX4+urd8eQskYgbeCf0NXLZ/qJkS/k10x+qGad34i4v5rI/ASFIx901c/Nw5C0YJMH7X87dib141tdAmSmQhnKLO5TBi4FiAidboyvnLFLrYGMmS2kLQOXFPwPj5zQUv5A=";
+            string ConverterUserSecret = "mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4iK16EcneqBPRe2eKQLuJXpA79IONX9GVI/Ap3uWzMcNWaitc2UB6gDeexJXFPVaXOFAoV6NtcUJC8skonXVk7k/oKTJGcYKLPGdXenrzHolQ==";
+
+            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, ConverterUserkey, ConverterUserSecret);
+                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);
+        }
+    }
+}

+ 80 - 66
PDF Office/CustomControl/NumericUpDown.xaml.cs

@@ -1,66 +1,80 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace PDF_Office.CustomControl
-{
-    /// <summary>
-    /// NumericUpDown.xaml 的交互逻辑
-    /// </summary>
-    public partial class NumericUpDown : UserControl
-    {
-        public int Num
-        {
-            get
-            {
-                int value = 0;
-                this.Dispatcher.Invoke(new Action(() =>
-                    value = Convert.ToInt32(this.TextBox_Num.Text.Trim())
-                ));
-                return value;
-            }
-            set
-            {
-                this.Dispatcher.Invoke(new Action(() =>
-                {
-                    this.TextBox_Num.Text = value.ToString();
-                }));
-            }
-        }
-        public NumericUpDown()
-        {
-            InitializeComponent();
-        }
-
-        private void Button_Add_Click(object sender, RoutedEventArgs e)
-        {
-            int num = int.Parse(this.TextBox_Num.Text.Trim());
-            if (num > 0)
-            {
-                this.TextBox_Num.Text = (num + 1).ToString();
-            }
-        }
-
-        private void Button_Sub_Click(object sender, RoutedEventArgs e)
-        {
-            int num = int.Parse(this.TextBox_Num.Text.Trim());
-            if (num > 0)
-            {
-                if ((num - 1) == 0)
-                    return;
-                this.TextBox_Num.Text = (num - 1).ToString();
-            }
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PDF_Office.CustomControl
+{
+    /// <summary>
+    /// NumericUpDown.xaml 的交互逻辑
+    /// </summary>
+    public partial class NumericUpDown : UserControl
+    {
+        public int Num
+        {
+            get
+            {
+                int value = 0;
+                this.Dispatcher.Invoke(new Action(() =>
+                    value = Convert.ToInt32(this.TextBox_Num.Text.Trim())
+                ));
+                return value;
+            }
+            set
+            {
+                this.Dispatcher.Invoke(new Action(() =>
+                {
+                    this.TextBox_Num.Text = value.ToString();
+                }));
+            }
+        }
+        public NumericUpDown()
+        {
+            InitializeComponent();
+        }
+
+        private void Button_Add_Click(object sender, RoutedEventArgs e)
+        {
+            int num = int.Parse(this.TextBox_Num.Text.Trim());
+            if (num > 0)
+            {
+                this.TextBox_Num.Text = (num + 1).ToString();
+            }
+        }
+
+        private void Button_Sub_Click(object sender, RoutedEventArgs e)
+        {
+            int num = int.Parse(this.TextBox_Num.Text.Trim());
+            if (num > 0)
+            {
+                if ((num - 1) == 0)
+                    return;
+                this.TextBox_Num.Text = (num - 1).ToString();
+            }
+        }
+        
+        
+
+        public int MyProperty
+        {
+            get { return (int)GetValue(MyPropertyProperty); }
+            set { SetValue(MyPropertyProperty, value); }
+        }
+
+        // Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty MyPropertyProperty =
+            DependencyProperty.Register("MyProperty", typeof(int), typeof(NumericUpDown), new PropertyMetadata(0));
+
+
+    }
+}

+ 10 - 5
PDF Office/Model/DialogNames.cs

@@ -63,22 +63,27 @@ namespace PDF_Office.Model
         ///<summary>
         ///主页工具-提取弹窗
         /// </summary>
-        public static string MainPageExtractDialog = "MainPageExtractDialog";
+        public static string HomePageExtractDialog = "HomePageExtractDialog";
 
         ///<summary>
         ///主页工具-插入弹窗
         /// </summary
-        public static string MainPageInsertDialog = "MainPageInsertDialog";
+        public static string HomePageInsertDialog = "HomePageInsertDialog";
 
         ///<summary>
         ///主页工具-拆分弹窗
         /// </summary>
-        public static string MainPageSplitDialog = "MainPageSplitDialog";
+        public static string HomePageSplitDialog = "HomePageSplitDialog";
 
         ///<summary>
         ///主页工具-打印弹窗
         /// </summary>
-        public static string MainPagePrinterDialog = "MainPagePrinterDialog";
-        
+        public static string HomePagePrinterDialog = "HomePagePrinterDialog";
+
+        ///<summary>
+        ///打印弹窗-打印页面设置
+        /// </summary>
+        public static string HomePagePrinterPageSetDialog = "HomePagePrinterPageSetDialog";
+
     }
 }

+ 28 - 0
PDF Office/Model/MainPageToolsDialogs/MainPageExtractDialogModel.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.Model.MainPageToolsDialogs
+{
+    internal class MainPageExtractDialogModel
+    {
+        /// <summary>
+        /// 页码 存入页码范围;
+        /// </summary>
+        public List<int> PageParm;
+        /// <summary>
+        /// 自定模式下 把文本内容传过去
+        /// </summary>
+        public string PageName = "";
+        /// <summary>
+        /// 是否拆分为单文件
+        /// </summary>
+        public bool ExtractToSingleFile;
+        /// <summary>
+        /// 提取后删除页面
+        /// </summary>
+        public bool DeleteAfterExtract;
+    }
+}

+ 26 - 0
PDF Office/Model/MainPageToolsDialogs/MainPageInsertDialogModel.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.Model.MainPageToolsDialogs
+{
+    internal class MainPageInsertDialogModel
+    {
+        public class InsertEventClass : EventArgs
+        {
+            public InsertType Type;
+            public string filePath;
+            public string pageRange;
+            public int InsertIndex;
+            public string Password;
+        }
+
+        public enum InsertType
+        {
+            BlankPages,
+            FromOtherPdf
+        }
+    }
+}

+ 44 - 0
PDF Office/Model/MainPageToolsDialogs/MainPageSplitDialogModel.cs

@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.Model.MainPageToolsDialogs
+{
+    internal class MainPageSplitDialogModel
+    {
+        public class SplitEventClass : EventArgs
+        {
+            /// <summary>
+            /// 拆分模式
+            /// </summary>
+            public SplitMode Mode;
+            /// <summary>
+            /// 文件名
+            /// </summary>
+            public string FileName;
+            /// <summary>
+            /// 页面信息
+            /// </summary>
+            public string PageRange;
+
+        }
+
+        public enum SplitMode
+        {
+            /// <summary>
+            /// 按页平均拆分
+            /// </summary>
+            AveragePages,
+            /// <summary>
+            /// 按文件平均拆分
+            /// </summary>
+            AverageFiles,
+            /// <summary>
+            /// 自定义页码范围拆分
+            /// </summary>
+            CustomPageRange
+        }
+    }
+}

+ 27 - 16
PDF Office/PDF Office.csproj

@@ -182,6 +182,9 @@
     <Compile Include="Model\Dialog\ToolsDialogs\SaftyDialogs\CheckPasswordDialogModel.cs" />
     <Compile Include="Model\Dialog\ToolsDialogs\SaftyDialogs\DeleteSafetySettintgsModel.cs" />
     <Compile Include="Model\Dialog\ToolsDialogs\SaftyDialogs\SetPasswordDialogModel.cs" />
+    <Compile Include="Model\MainPageToolsDialogs\MainPageExtractDialogModel.cs" />
+    <Compile Include="Model\MainPageToolsDialogs\MainPageInsertDialogModel.cs" />
+    <Compile Include="Model\MainPageToolsDialogs\MainPageSplitDialogModel.cs" />
     <Compile Include="Model\PageEdit\ExtractModel.cs" />
     <Compile Include="Model\PageEdit\PageEditItem.cs" />
     <Compile Include="Model\ParameterNames.cs" />
@@ -198,11 +201,12 @@
     <Compile Include="ViewModels\BottomToolContentViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ExtractDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\FullScreenWindowViewModel.cs" />
-    <Compile Include="ViewModels\Dialog\MainPageToolsDialogs\MainPageSplitDialogViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterPageSetDialogViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePageSplitDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\PageEditDialogs\ExtractDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\PageEditDialogs\InsertDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\PageEditDialogs\SplitDialogViewModel.cs" />
-    <Compile Include="ViewModels\Dialog\MainPageToolsDialogs\MainPagePrinterDialogViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ToolsDialogs\CompressDialogs\CompressDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ToolsDialogs\CompressDialogs\CompressProgressBarDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ToolsDialogs\SaftyDialogs\DeleteSafetySettingsDialogViewModel.cs" />
@@ -213,8 +217,8 @@
     <Compile Include="ViewModels\HomePanel\HomeGuidContentViewModel.cs" />
     <Compile Include="ViewModels\HomePanel\HomeToolsContentViewModel.cs" />
     <Compile Include="ViewModels\MainContentViewModel.cs" />
-    <Compile Include="ViewModels\Dialog\MainPageToolsDialogs\MainPageExtractDialogViewModel.cs" />
-    <Compile Include="ViewModels\Dialog\MainPageToolsDialogs\MainPageInsertDialogViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePageExtractDialogViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePageInsertDialogViewModel.cs" />
     <Compile Include="ViewModels\PageEdit\PageEditContentViewModel.cs" />
     <Compile Include="ViewModels\Tools\ToolsBarContentViewModel.cs" />
     <Compile Include="Views\BOTA\BOTAContent.xaml.cs">
@@ -226,14 +230,17 @@
     <Compile Include="Views\Dialog\FullScreenWindow.xaml.cs">
       <DependentUpon>FullScreenWindow.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\Dialog\MainPageToolsDialogs\MainPageExtractDialog.xaml.cs">
-      <DependentUpon>MainPageExtractDialog.xaml</DependentUpon>
+    <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePageExtractDialog.xaml.cs">
+      <DependentUpon>HomePageExtractDialog.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\Dialog\MainPageToolsDialogs\MainPageInsertDialog.xaml.cs">
-      <DependentUpon>MainPageInsertDialog.xaml</DependentUpon>
+    <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePageInsertDialog.xaml.cs">
+      <DependentUpon>HomePageInsertDialog.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\Dialog\MainPageToolsDialogs\MainPageSplitDialog.xaml.cs">
-      <DependentUpon>MainPageSplitDialog.xaml</DependentUpon>
+    <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterPageSetDialog.xaml.cs">
+      <DependentUpon>HomePagePrinterPageSetDialog.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePageSplitDialog.xaml.cs">
+      <DependentUpon>HomePageSplitDialog.xaml</DependentUpon>
     </Compile>
     <Compile Include="Views\Dialog\PageEditDialogs\ExtractDialog.xaml.cs">
       <DependentUpon>ExtractDialog.xaml</DependentUpon>
@@ -244,8 +251,8 @@
     <Compile Include="Views\Dialog\PageEditDialogs\SplitDialog.xaml.cs">
       <DependentUpon>SplitDialog.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\Dialog\MainPageToolsDialogs\MainPagePrinterDialog.xaml.cs">
-      <DependentUpon>MainPagePrinterDialog.xaml</DependentUpon>
+    <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterDialog.xaml.cs">
+      <DependentUpon>HomePagePrinterDialog.xaml</DependentUpon>
     </Compile>
     <Compile Include="Views\Dialog\ToolsDialogs\CompressDialogs\CompressDialog.xaml.cs">
       <DependentUpon>CompressDialog.xaml</DependentUpon>
@@ -386,15 +393,19 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\Dialog\MainPageToolsDialogs\MainPageExtractDialog.xaml">
+    <Page Include="Views\Dialog\HomePageToolsDialogs\HomePageExtractDialog.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\Dialog\HomePageToolsDialogs\HomePageInsertDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\Dialog\MainPageToolsDialogs\MainPageInsertDialog.xaml">
+    <Page Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterPageSetDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\Dialog\MainPageToolsDialogs\MainPageSplitDialog.xaml">
+    <Page Include="Views\Dialog\HomePageToolsDialogs\HomePageSplitDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
@@ -410,7 +421,7 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
-    <Page Include="Views\Dialog\MainPageToolsDialogs\MainPagePrinterDialog.xaml">
+    <Page Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>

+ 3 - 3
PDF Office/ViewModels/Dialog/MainPageToolsDialogs/MainPageExtractDialogViewModel.cs

@@ -5,11 +5,11 @@ using System;
 using System.Collections.Generic;
 using System.Linq;
 
-namespace PDF_Office.ViewModels.Dialog.MainPageToolsDialogs
+namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
 {
-    public class MainPageExtractDialogViewModel : BindableBase,IDialogAware
+    public class HomePageExtractDialogViewModel : BindableBase,IDialogAware
     {
-        public MainPageExtractDialogViewModel()
+        public HomePageExtractDialogViewModel()
         {
 
         }

+ 3 - 3
PDF Office/ViewModels/Dialog/MainPageToolsDialogs/MainPageInsertDialogViewModel.cs

@@ -5,11 +5,11 @@ using System;
 using System.Collections.Generic;
 using System.Linq;
 
-namespace PDF_Office.ViewModels.Dialog.MainPageToolsDialogs
+namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
 {
-    public class MainPageInsertDialogViewModel : BindableBase,IDialogAware
+    public class HomePageInsertDialogViewModel : BindableBase,IDialogAware
     {
-        public MainPageInsertDialogViewModel()
+        public HomePageInsertDialogViewModel()
         {
 
         }

+ 37 - 0
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDialogViewModel.cs

@@ -0,0 +1,37 @@
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
+{
+    public class HomePagePrinterDialogViewModel : BindableBase,IDialogAware
+    {
+
+        public IDialogService dialogs;
+
+        public HomePagePrinterDialogViewModel(IDialogService dialogService)
+        {
+            dialogs = dialogService;
+        }
+
+        public string Title => "";
+
+        public event Action<IDialogResult> RequestClose;
+
+        public bool CanCloseDialog()
+        {
+            return true;
+        }
+
+        public void OnDialogClosed()
+        {
+        }
+
+        public void OnDialogOpened(IDialogParameters parameters)
+        {
+        }
+    }
+}

+ 35 - 34
PDF Office/ViewModels/Dialog/MainPageToolsDialogs/MainPagePrinterDialogViewModel.cs

@@ -1,34 +1,35 @@
-using Prism.Commands;
-using Prism.Mvvm;
-using Prism.Services.Dialogs;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace PDF_Office.ViewModels.Dialog.MainPageToolsDialogs
-{
-    public class MainPagePrinterDialogViewModel : BindableBase,IDialogAware
-    {
-        public MainPagePrinterDialogViewModel()
-        {
-
-        }
-
-        public string Title => "";
-
-        public event Action<IDialogResult> RequestClose;
-
-        public bool CanCloseDialog()
-        {
-            return true;
-        }
-
-        public void OnDialogClosed()
-        {
-        }
-
-        public void OnDialogOpened(IDialogParameters parameters)
-        {
-        }
-    }
-}
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
+{
+    public class HomePagePrinterPageSetDialogViewModel : BindableBase, IDialogAware
+    {
+        public HomePagePrinterPageSetDialogViewModel()
+        {
+
+        }
+
+        public string Title => "";
+
+        public event Action<IDialogResult> RequestClose;
+
+        public bool CanCloseDialog()
+        {
+            return true;
+        }
+
+        public void OnDialogClosed()
+        {
+        }
+
+        public void OnDialogOpened(IDialogParameters parameters)
+        {
+            
+        }
+    }
+}

+ 3 - 3
PDF Office/ViewModels/Dialog/MainPageToolsDialogs/MainPageSplitDialogViewModel.cs

@@ -5,11 +5,11 @@ using System;
 using System.Collections.Generic;
 using System.Linq;
 
-namespace PDF_Office.ViewModels.Dialog.MainPageToolsDialogs
+namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
 {
-    public class MainPageSplitDialogViewModel : BindableBase,IDialogAware
+    public class HomePageSplitDialogViewModel : BindableBase,IDialogAware
     {
-        public MainPageSplitDialogViewModel()
+        public HomePageSplitDialogViewModel()
         {
         }
 

+ 59 - 59
PDF Office/ViewModels/HomePanel/HomeGuidContentViewModel.cs

@@ -1,68 +1,68 @@
 using ComPDFKitViewer.PdfViewer;
 using PDF_Office.Model;
-using PDF_Office.Model.PDFTool;
-using PDF_Office.Views.HomePanel.PDFTools;
-using Prism.Commands;
-using Prism.Mvvm;
+using PDF_Office.Model.PDFTool;
+using PDF_Office.Views.HomePanel.PDFTools;
+using Prism.Commands;
+using Prism.Mvvm;
 using Prism.Services.Dialogs;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace PDF_Office.ViewModels.HomePanel
-{
-    public class HomeGuidContentViewModel:BindableBase
-    {
-        public IDialogService dialogs;
-        public DelegateCommand<ToolItem> QuickToolsCommand { get; set; }
-        public HomeGuidContentViewModel(IDialogService dialogService)
-        {
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.ViewModels.HomePanel
+{
+    public class HomeGuidContentViewModel:BindableBase
+    {
+        public IDialogService dialogs;
+        public DelegateCommand<ToolItem> QuickToolsCommand { get; set; }
+        public HomeGuidContentViewModel(IDialogService dialogService)
+        {
             QuickToolsCommand = new DelegateCommand<ToolItem>(QuickTools_Click);
             dialogs = dialogService;
-        }
-
-        public void QuickTools_Click(ToolItem toolItem)
-        {
-            switch (toolItem.Tag)
-            {
-                case PDFToolType.Split:
-                    Split_Click();
+        }
+
+        public void QuickTools_Click(ToolItem toolItem)
+        {
+            switch (toolItem.Tag)
+            {
+                case PDFToolType.Split:
+                    Split_Click();
                     DialogParameters splitvalue = new DialogParameters();
-                    dialogs.ShowDialog(DialogNames.MainPageSplitDialog, splitvalue, e => { });
-                    break;
-
-                case PDFToolType.Extract:
+                    dialogs.ShowDialog(DialogNames.HomePageSplitDialog, splitvalue, e => { });
+                    break;
+
+                case PDFToolType.Extract:
                     DialogParameters extractvalue = new DialogParameters();
-                    dialogs.ShowDialog(DialogNames.MainPageExtractDialog, extractvalue, e => { });
-                    break;
-
-                case PDFToolType.Insert:
+                    dialogs.ShowDialog(DialogNames.HomePageExtractDialog, extractvalue, e => { });
+                    break;
+
+                case PDFToolType.Insert:
                     DialogParameters insertvalue = new DialogParameters();
-                    dialogs.ShowDialog(DialogNames.MainPageInsertDialog, insertvalue, e => { });
-                    break;
-
-                case PDFToolType.Compress:
-                    break;
-
-                case PDFToolType.Merge:
-                    break;
-
-                case PDFToolType.Print:
+                    dialogs.ShowDialog(DialogNames.HomePageInsertDialog, insertvalue, e => { });
+                    break;
+
+                case PDFToolType.Compress:
+                    break;
+
+                case PDFToolType.Merge:
+                    break;
+
+                case PDFToolType.Print:
                     DialogParameters printvalue = new DialogParameters();
-                    dialogs.ShowDialog(DialogNames.MainPagePrinterDialog, printvalue, e => { });
-                    break;
-
-                case PDFToolType.Security:
-                    break;
-            }
-        }
-
-        private void Split_Click()
-        {
-
-        }
-
-    }
-}
+                    dialogs.ShowDialog(DialogNames.HomePagePrinterDialog, printvalue, e => { });
+                    break;
+
+                case PDFToolType.Security:
+                    break;
+            }
+        }
+
+        private void Split_Click()
+        {
+
+        }
+
+    }
+}

+ 2 - 2
PDF Office/Views/Dialog/MainPageToolsDialogs/MainPageExtractDialog.xaml

@@ -1,4 +1,4 @@
-<UserControl x:Class="PDF_Office.Views.Dialog.MainPageToolsDialogs.MainPageExtractDialog"
+<UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageExtractDialog"
            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"
@@ -7,7 +7,7 @@
              xmlns:prism="http://prismlibrary.com/"             
              prism:ViewModelLocator.AutoWireViewModel="True"
               d:DesignHeight="404"
-             d:DesignWidth="480"
+             d:DesignWidth="490"
              mc:Ignorable="d">
     <Grid>
         <Grid.RowDefinitions>

+ 3 - 3
PDF Office/Views/Dialog/MainPageToolsDialogs/MainPageExtractDialog.xaml.cs

@@ -13,14 +13,14 @@ using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
 
-namespace PDF_Office.Views.Dialog.MainPageToolsDialogs
+namespace PDF_Office.Views.Dialog.HomePageToolsDialogs
 {
     /// <summary>
     /// MainPageExtractDialog.xaml 的交互逻辑
     /// </summary>
-    public partial class MainPageExtractDialog : UserControl
+    public partial class HomePageExtractDialog : UserControl
     {
-        public MainPageExtractDialog()
+        public HomePageExtractDialog()
         {
             InitializeComponent();
         }

+ 3 - 3
PDF Office/Views/Dialog/MainPageToolsDialogs/MainPageInsertDialog.xaml

@@ -1,4 +1,4 @@
-<UserControl x:Class="PDF_Office.Views.Dialog.MainPageToolsDialogs.MainPageInsertDialog"
+<UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageInsertDialog"
      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"
@@ -6,7 +6,7 @@
              xmlns:prism="http://prismlibrary.com/"             
              prism:ViewModelLocator.AutoWireViewModel="True"
              d:DesignHeight="441"
-             d:DesignWidth="480"
+             d:DesignWidth="600"
              mc:Ignorable="d">
     <Grid>
         <Grid.RowDefinitions>
@@ -22,7 +22,7 @@
                     <ColumnDefinition Width="4*"/>
                 </Grid.ColumnDefinitions>
                 <Grid Grid.Column="0">
-                    <Border  Margin="10,40,10,40" Background="LightGray">
+                    <Border  Margin="10,40,10,40" Background="LightGray" Width="200">
                         <Viewbox>
                             <Image Name="Image"></Image>
                         </Viewbox>

+ 3 - 3
PDF Office/Views/Dialog/MainPageToolsDialogs/MainPageInsertDialog.xaml.cs

@@ -13,14 +13,14 @@ using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
 
-namespace PDF_Office.Views.Dialog.MainPageToolsDialogs
+namespace PDF_Office.Views.Dialog.HomePageToolsDialogs
 {
     /// <summary>
     /// MainPageInsertDialog.xaml 的交互逻辑
     /// </summary>
-    public partial class MainPageInsertDialog : UserControl
+    public partial class HomePageInsertDialog : UserControl
     {
-        public MainPageInsertDialog()
+        public HomePageInsertDialog()
         {
             InitializeComponent();
         }

+ 3 - 3
PDF Office/Views/Dialog/MainPageToolsDialogs/MainPagePrinterDialog.xaml

@@ -1,4 +1,4 @@
-<UserControl x:Class="PDF_Office.Views.Dialog.MainPageToolsDialogs.MainPagePrinterDialog"
+<UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter.HomePagePrinterDialog"
            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"
@@ -7,7 +7,7 @@
              xmlns:prism="http://prismlibrary.com/"             
              prism:ViewModelLocator.AutoWireViewModel="True" 
               d:DesignHeight="650"
-             d:DesignWidth="893"
+             d:DesignWidth="903"
              mc:Ignorable="d">
     <Grid>
         <Grid.RowDefinitions>
@@ -62,7 +62,7 @@
                                 </StackPanel>
                                 <StackPanel Orientation="Horizontal" Margin="28,0,0,0">
                                     <TextBlock Height="20" Width="42" Text="份数: "></TextBlock>
-                                    <cus:NumericUpDown Height="32" Width="76" Margin="15,0,0,0"></cus:NumericUpDown>
+                                    <cus:NumericUpDown Height="32" Width="76" Margin="15,0,0,0" ></cus:NumericUpDown>
                                 </StackPanel>
                                 <CheckBox VerticalAlignment="Center" Margin="27,0,0,0">
                                     <TextBlock Text="黑白色"/>

+ 3 - 3
PDF Office/Views/Dialog/MainPageToolsDialogs/MainPagePrinterDialog.xaml.cs

@@ -1,13 +1,13 @@
 using System.Windows.Controls;
 
-namespace PDF_Office.Views.Dialog.MainPageToolsDialogs
+namespace PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter
 {
     /// <summary>
     /// Interaction logic for PrinterDialog
     /// </summary>
-    public partial class MainPagePrinterDialog : UserControl
+    public partial class HomePagePrinterDialog : UserControl
     {
-        public MainPagePrinterDialog()
+        public HomePagePrinterDialog()
         {
             InitializeComponent();
         }

+ 58 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterPageSetDialog.xaml

@@ -0,0 +1,58 @@
+<UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter.HomePagePrinterPageSetDialog"
+             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:cus="clr-namespace:PDF_Office.CustomControl"
+             xmlns:prism="http://prismlibrary.com/"             
+             prism:ViewModelLocator.AutoWireViewModel="True"
+             d:DesignHeight="347"
+             d:DesignWidth="371"
+             mc:Ignorable="d">
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="48"></RowDefinition>
+            <RowDefinition Height="*"></RowDefinition>
+            <RowDefinition Height="64"></RowDefinition>
+        </Grid.RowDefinitions>
+        <TextBlock Grid.Row="0" Text="提取" FontSize="20" FontWeight="ExtraBlack" VerticalAlignment="Center" HorizontalAlignment="Left"  Margin="20,0,0,0" Height="28" Width="120"/>
+        <Border Grid.Row="1" BorderBrush="Gray" BorderThickness="0,1,0,1" VerticalAlignment="Center" Height="235">
+            <Grid>
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="1*"></RowDefinition>
+                    <RowDefinition Height="2*"></RowDefinition>
+                </Grid.RowDefinitions>
+                <StackPanel Grid.Row="0">
+                    <TextBlock Text="纸张" FontWeight="ExtraBlack" Width="56" Height="22" HorizontalAlignment="Left"/>
+                    <StackPanel Orientation="Horizontal">
+                        <TextBlock Text="大小: " VerticalAlignment="Center"></TextBlock>
+                        <ComboBox Width="281" Height="32" Margin="16,0,0,0"></ComboBox>
+                    </StackPanel>
+                </StackPanel>
+                <StackPanel Grid.Row="1" Margin="0,20,0,0">
+                    <TextBlock Text="页边距" FontWeight="ExtraBlack" Width="56" Height="22" HorizontalAlignment="Left"/>
+                    <StackPanel Orientation="Horizontal">
+                        <StackPanel Orientation="Horizontal">
+                            <TextBlock Text="上: " VerticalAlignment="Center"></TextBlock>
+                            <cus:NumericUpDown Margin="30,0,0,0"></cus:NumericUpDown>
+                        </StackPanel>
+                        <StackPanel Orientation="Horizontal" Margin="71,0,0,0">
+                            <TextBlock Text="下: " VerticalAlignment="Center" ></TextBlock>
+                            <cus:NumericUpDown Margin="30,0,0,0"></cus:NumericUpDown>
+                        </StackPanel>
+                    </StackPanel>
+                    <StackPanel Orientation="Horizontal">
+                        <StackPanel Orientation="Horizontal">
+                            <TextBlock Text="左: " VerticalAlignment="Center"></TextBlock>
+                            <cus:NumericUpDown Margin="30,0,0,0"></cus:NumericUpDown>
+                        </StackPanel>
+                        <StackPanel Orientation="Horizontal" Margin="71,0,0,0">
+                            <TextBlock Text="右: " VerticalAlignment="Center"></TextBlock>
+                            <cus:NumericUpDown Margin="30,0,0,0"></cus:NumericUpDown>
+                        </StackPanel>
+                    </StackPanel>
+                </StackPanel>
+            </Grid>
+        </Border>
+    </Grid>
+</UserControl>

+ 15 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterPageSetDialog.xaml.cs

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

+ 1 - 1
PDF Office/Views/Dialog/MainPageToolsDialogs/MainPageSplitDialog.xaml

@@ -1,4 +1,4 @@
-<UserControl x:Class="PDF_Office.Views.Dialog.MainPageToolsDialogs.MainPageSplitDialog"
+<UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageSplitDialog"
    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"

+ 3 - 3
PDF Office/Views/Dialog/MainPageToolsDialogs/MainPageSplitDialog.xaml.cs

@@ -13,14 +13,14 @@ using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
 
-namespace PDF_Office.Views.Dialog.MainPageToolsDialogs
+namespace PDF_Office.Views.Dialog.HomePageToolsDialogs
 {
     /// <summary>
     /// MainPageSplitDialog.xaml 的交互逻辑
     /// </summary>
-    public partial class MainPageSplitDialog : UserControl
+    public partial class HomePageSplitDialog : UserControl
     {
-        public MainPageSplitDialog()
+        public HomePageSplitDialog()
         {
             InitializeComponent();
         }