Browse Source

其他-页面范围

liyijie 2 years ago
parent
commit
45e13496c6
32 changed files with 161 additions and 56 deletions
  1. 5 2
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundDialogViewModel.cs
  2. 5 2
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBates/HomePageBatesDialogViewModel.cs
  3. 5 2
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialogViewModel.cs
  4. 5 2
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageHeaderFooter/HomePageHeaderFooterDialogViewModel.cs
  5. 5 2
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkDialogViewModel.cs
  6. 11 0
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageExtractDialogViewModel.cs
  7. 38 27
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageSplitDialogViewModel.cs
  8. 11 0
      PDF Office/ViewModels/EditTools/Background/BackgroundCreateColorContentViewModel.cs
  9. 12 0
      PDF Office/ViewModels/EditTools/Background/BackgroundCreateFileContentViewModel.cs
  10. 11 0
      PDF Office/ViewModels/EditTools/Bates/BatesCreateContentViewModel.cs
  11. 11 0
      PDF Office/ViewModels/EditTools/HeaderFooter/HeaderFooterCreateContentViewModel.cs
  12. 11 0
      PDF Office/ViewModels/EditTools/Watermark/WatermarkCreateFileContentViewModel.cs
  13. 12 0
      PDF Office/ViewModels/EditTools/Watermark/WatermarkCreateTextContentViewModel.cs
  14. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundCreateColorContent.xaml
  15. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundCreateFileContent.xaml
  16. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundDialog.xaml
  17. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBates/HomePageBatesCreateContent.xaml
  18. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBates/HomePageBatesDialog.xaml
  19. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialog.xaml
  20. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageHeaderFooter/HomePageHeaderFooterCreateContent.xaml
  21. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageHeaderFooter/HomePageHeaderFooterDialog.xaml
  22. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkCreateFileContent.xaml
  23. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkCreateTextContent.xaml
  24. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkDialog.xaml
  25. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageExtractDialog.xaml
  26. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageSplitDialog.xaml
  27. 1 1
      PDF Office/Views/EditTools/Background/BackgroundCreateColorContent.xaml
  28. 1 1
      PDF Office/Views/EditTools/Background/BackgroundCreateFileContent.xaml
  29. 1 1
      PDF Office/Views/EditTools/Bates/BatesCreateContent.xaml
  30. 1 1
      PDF Office/Views/EditTools/HeaderFooter/HeaderFooterCreateContent.xaml
  31. 1 1
      PDF Office/Views/EditTools/Watermark/WatermarkCreateFileContent.xaml
  32. 1 1
      PDF Office/Views/EditTools/Watermark/WatermarkCreateTextContent.xaml

+ 5 - 2
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundDialogViewModel.cs

@@ -243,6 +243,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             PDFDataTable.Columns.Add("FilePageRangeText");
             PDFDataTable.Columns.Add("FilePageRangeSelectIndex");
             PDFDataTable.Columns.Add("IsEvenPageIsEnabled");
+            PDFDataTable.Columns.Add("MaxPageRange");
             PDFDataTable.Columns.Add("FileSize");
             PDFDataTable.Columns.Add("FileState");
             Unicode = App.mainWindowViewModel.SelectedItem.Unicode;
@@ -517,6 +518,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             pdfdatatable.Columns.Add("FilePageRangeText");
             pdfdatatable.Columns.Add("FilePageRangeSelectIndex");
             pdfdatatable.Columns.Add("IsEvenPageIsEnabled");
+            pdfdatatable.Columns.Add("MaxPageRange");
             pdfdatatable.Columns.Add("FileSize");
             pdfdatatable.Columns.Add("FileState");
             int datatableindex = 0;
@@ -531,11 +533,12 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
 
                     PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"] = "0";
                 }
-                if (PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"].ToString() == "3" && !CommonHelper.GetPagesInRange(ref PageIndexLists, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"].ToString(), CPDFDocument.InitWithFilePath(fileName).PageCount, new char[] { ',' }, new char[] { '-' }, true))
+                int pagecount = CPDFDocument.InitWithFilePath(fileName).PageCount;
+                if (PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"].ToString() == "3" && !CommonHelper.GetPagesInRange(ref PageIndexLists, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"].ToString(), pagecount, new char[] { ',' }, new char[] { '-' }, true))
                 {
                     PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"] = "0";
                 }
-                pdfdatatable.Rows.Add(f.Name, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"], PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"], isEvenPage(fileName), file_size, PDFCurrentDataTable.Rows[datatableindex]["FileState"]); 
+                pdfdatatable.Rows.Add(f.Name, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"], PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"], isEvenPage(fileName), pagecount, file_size, PDFCurrentDataTable.Rows[datatableindex]["FileState"]); 
                 datatableindex++;
             }
             PDFDataTable = pdfdatatable;

+ 5 - 2
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBates/HomePageBatesDialogViewModel.cs

@@ -220,6 +220,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             PDFDataTable.Columns.Add("FilePageRangeText");
             PDFDataTable.Columns.Add("FilePageRangeSelectIndex");
             PDFDataTable.Columns.Add("IsEvenPageIsEnabled");
+            PDFDataTable.Columns.Add("MaxPageRange");
             PDFDataTable.Columns.Add("FileSize");
             PDFDataTable.Columns.Add("FileState");
             ADDPDFCommand = new DelegateCommand(addpicture);
@@ -447,6 +448,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             pdfdatatable.Columns.Add("FilePageRangeText");
             pdfdatatable.Columns.Add("FilePageRangeSelectIndex");
             pdfdatatable.Columns.Add("IsEvenPageIsEnabled");
+            pdfdatatable.Columns.Add("MaxPageRange");
             pdfdatatable.Columns.Add("FileSize");
             pdfdatatable.Columns.Add("FileState");
             int datatableindex = 0;
@@ -460,11 +462,12 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
 
                     PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"] = "0";
                 }
-                if (PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"].ToString() == "3" && !CommonHelper.GetPagesInRange(ref PageIndexLists, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"].ToString(), CPDFDocument.InitWithFilePath(fileName).PageCount, new char[] { ',' }, new char[] { '-' },true)) {
+                int pagecount = CPDFDocument.InitWithFilePath(fileName).PageCount;
+                if (PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"].ToString() == "3" && !CommonHelper.GetPagesInRange(ref PageIndexLists, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"].ToString(), pagecount, new char[] { ',' }, new char[] { '-' },true)) {
                     PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"] = "0";
 
                 }
-                pdfdatatable.Rows.Add(f.Name, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"], PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"], isEvenPage(fileName), file_size, PDFCurrentDataTable.Rows[datatableindex]["FileState"]);
+                pdfdatatable.Rows.Add(f.Name, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"], PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"], isEvenPage(fileName), pagecount, file_size, PDFCurrentDataTable.Rows[datatableindex]["FileState"]);
                 datatableindex++;
             }
             PDFDataTable = pdfdatatable;

+ 5 - 2
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialogViewModel.cs

@@ -198,6 +198,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             PDFDataTable.Columns.Add("FilePageRangeText");
             PDFDataTable.Columns.Add("FilePageRangeSelectIndex");
             PDFDataTable.Columns.Add("IsEvenPageIsEnabled");
+            PDFDataTable.Columns.Add("MaxPageRange");
             PDFDataTable.Columns.Add("FileSize");
             PDFDataTable.Columns.Add("FileState");
             ADDPDFCommand = new DelegateCommand(addpicture);
@@ -433,6 +434,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             pdfdatatable.Columns.Add("FilePageRangeText");
             pdfdatatable.Columns.Add("FilePageRangeSelectIndex");
             pdfdatatable.Columns.Add("IsEvenPageIsEnabled");
+            pdfdatatable.Columns.Add("MaxPageRange");
             pdfdatatable.Columns.Add("FileSize");
             pdfdatatable.Columns.Add("FileState");
             int datatableindex = 0;
@@ -447,11 +449,12 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
 
                     PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"] = "0";
                 }
-                if (PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"].ToString() == "3" && !CommonHelper.GetPagesInRange(ref PageIndexLists, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"].ToString(), CPDFDocument.InitWithFilePath(fileName).PageCount, new char[] { ',' }, new char[] { '-' }, true))
+                int pagecount = CPDFDocument.InitWithFilePath(fileName).PageCount;
+                if (PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"].ToString() == "3" && !CommonHelper.GetPagesInRange(ref PageIndexLists, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"].ToString(), pagecount, new char[] { ',' }, new char[] { '-' }, true))
                 {
                     PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"] = "0";
                 }
-                pdfdatatable.Rows.Add(f.Name, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"], PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"], isEvenPage(fileName), file_size, PDFCurrentDataTable.Rows[datatableindex]["FileState"]);
+                pdfdatatable.Rows.Add(f.Name, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"], PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"], isEvenPage(fileName), pagecount, file_size, PDFCurrentDataTable.Rows[datatableindex]["FileState"]);
                 datatableindex++;
             }
             PDFDataTable = pdfdatatable;

+ 5 - 2
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageHeaderFooter/HomePageHeaderFooterDialogViewModel.cs

@@ -227,6 +227,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             PDFDataTable.Columns.Add("FilePageRangeText");
             PDFDataTable.Columns.Add("FilePageRangeSelectIndex");
             PDFDataTable.Columns.Add("IsEvenPageIsEnabled");
+            PDFDataTable.Columns.Add("MaxPageRange");
             PDFDataTable.Columns.Add("FileSize");
             PDFDataTable.Columns.Add("FileState");
             ADDPDFCommand = new DelegateCommand(addpicture);
@@ -449,6 +450,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             pdfdatatable.Columns.Add("FilePageRangeText");
             pdfdatatable.Columns.Add("FilePageRangeSelectIndex");
             pdfdatatable.Columns.Add("IsEvenPageIsEnabled");
+            pdfdatatable.Columns.Add("MaxPageRange");
             pdfdatatable.Columns.Add("FileSize");
             pdfdatatable.Columns.Add("FileState");
             int datatableindex = 0;
@@ -463,11 +465,12 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
 
                     PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"] = "0";
                 }
-                if (PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"].ToString() == "3" && !CommonHelper.GetPagesInRange(ref PageIndexLists, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"].ToString(), CPDFDocument.InitWithFilePath(fileName).PageCount, new char[] { ',' }, new char[] { '-' }, true))
+                int pagecount = CPDFDocument.InitWithFilePath(fileName).PageCount;
+                if (PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"].ToString() == "3" && !CommonHelper.GetPagesInRange(ref PageIndexLists, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"].ToString(), pagecount, new char[] { ',' }, new char[] { '-' }, true))
                 {
                     PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"] = "0";
                 }
-                pdfdatatable.Rows.Add(f.Name, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"], PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"], isEvenPage(fileName), file_size, PDFCurrentDataTable.Rows[datatableindex]["FileState"]); 
+                pdfdatatable.Rows.Add(f.Name, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"], PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"], isEvenPage(fileName), pagecount, file_size, PDFCurrentDataTable.Rows[datatableindex]["FileState"]); 
                 datatableindex++;
             }
             PDFDataTable = pdfdatatable;

+ 5 - 2
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkDialogViewModel.cs

@@ -240,6 +240,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             PDFDataTable.Columns.Add("FilePageRangeText");
             PDFDataTable.Columns.Add("FilePageRangeSelectIndex");
             PDFDataTable.Columns.Add("IsEvenPageIsEnabled");
+            PDFDataTable.Columns.Add("MaxPageRange");
             PDFDataTable.Columns.Add("FileSize");
             PDFDataTable.Columns.Add("FileState");
             ADDPDFCommand = new DelegateCommand(addpicture);
@@ -522,6 +523,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             pdfdatatable.Columns.Add("FilePageRangeText");
             pdfdatatable.Columns.Add("FilePageRangeSelectIndex");
             pdfdatatable.Columns.Add("IsEvenPageIsEnabled");
+            pdfdatatable.Columns.Add("MaxPageRange");
             pdfdatatable.Columns.Add("FileSize");
             pdfdatatable.Columns.Add("FileState");
             int datatableindex = 0;
@@ -536,11 +538,12 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
 
                     PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"] = "0";
                 }
-                if (PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"].ToString() == "3" && !CommonHelper.GetPagesInRange(ref PageIndexLists, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"].ToString(), CPDFDocument.InitWithFilePath(fileName).PageCount, new char[] { ',' }, new char[] { '-' }, true))
+                int pagecount = CPDFDocument.InitWithFilePath(fileName).PageCount;
+                if (PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"].ToString() == "3" && !CommonHelper.GetPagesInRange(ref PageIndexLists, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"].ToString(), pagecount, new char[] { ',' }, new char[] { '-' }, true))
                 {
                     PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"] = "0";
                 }
-                pdfdatatable.Rows.Add(f.Name, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"], PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"], isEvenPage(fileName), file_size, PDFCurrentDataTable.Rows[datatableindex]["FileState"]);
+                pdfdatatable.Rows.Add(f.Name, PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeText"], PDFCurrentDataTable.Rows[datatableindex]["FilePageRangeSelectIndex"], isEvenPage(fileName), pagecount, file_size, PDFCurrentDataTable.Rows[datatableindex]["FileState"]);
                 datatableindex++;
             }
             PDFDataTable = pdfdatatable;

+ 11 - 0
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageExtractDialogViewModel.cs

@@ -37,6 +37,16 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
         public string PageRangeText { get; set; } = "";
 
         public string PageRangeSelectIndex { get; set; } = "0";
+
+        private int maxPageRange = 0;
+        public int MaxPageRange
+        {
+            get { return maxPageRange; }
+            set
+            {
+                SetProperty(ref maxPageRange, value);
+            }
+        }
         #endregion
 
         #region 委托声明
@@ -231,6 +241,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
             if (viewer != null && viewer.Document != null)
             {
                 currentViewer = viewer;
+                MaxPageRange = viewer.Document.PageCount;
                 savefilepath = filepath.Replace(currentViewer.Document.FileName + ".pdf", "");
                 document = currentViewer.Document;
             }

+ 38 - 27
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageSplitDialogViewModel.cs

@@ -101,7 +101,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
             get { return filePathName; }
             set
             {
-                value = value+".pdf";
+                value = value + ".pdf";
                 SetProperty(ref filePathName, value);
             }
         }
@@ -137,6 +137,16 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
                 SetProperty(ref fileNameDeimiterIsEnabled, value);
             }
         }
+
+        private int maxPageRange = 0;
+        public int MaxPageRange
+        {
+            get { return maxPageRange; }
+            set
+            {
+                SetProperty(ref maxPageRange, value);
+            }
+        }
         #endregion
 
         #region 委托声明
@@ -498,39 +508,40 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
                 }
             }
         }
-    
-    #endregion
 
-    #region 构架行为
-    public string Title => "";
+        #endregion
 
-    public event Action<IDialogResult> RequestClose;
+        #region 构架行为
+        public string Title => "";
 
-    public bool CanCloseDialog()
-    {
-        return true;
-    }
+        public event Action<IDialogResult> RequestClose;
 
-    public void OnDialogClosed()
-    {
+        public bool CanCloseDialog()
+        {
+            return true;
+        }
 
-    }
+        public void OnDialogClosed()
+        {
 
-    public void OnDialogOpened(IDialogParameters parameters)
-    {
-        CPDFViewer viewer = null;
-        string filepath = "";
-        parameters.TryGetValue<CPDFViewer>(ParameterNames.PDFViewer, out viewer);
-        parameters.TryGetValue<string>(ParameterNames.FilePath, out filepath);
-        if (viewer != null && viewer.Document != null)
+        }
+
+        public void OnDialogOpened(IDialogParameters parameters)
         {
-            currentViewer = viewer;
-            document = viewer.Document;
-            savefilename = currentViewer.Document.FileName;
-            FilePathName = savefilename + "-" + "part" ;
-            savefilepath = filepath.Replace(savefilename + ".pdf", "");
+            CPDFViewer viewer = null;
+            string filepath = "";
+            parameters.TryGetValue<CPDFViewer>(ParameterNames.PDFViewer, out viewer);
+            parameters.TryGetValue<string>(ParameterNames.FilePath, out filepath);
+            if (viewer != null && viewer.Document != null)
+            {
+                currentViewer = viewer;
+                MaxPageRange = viewer.Document.PageCount;
+                document = viewer.Document;
+                savefilename = currentViewer.Document.FileName;
+                FilePathName = savefilename + "-" + "part";
+                savefilepath = filepath.Replace(savefilename + ".pdf", "");
+            }
         }
+        #endregion
     }
-    #endregion
-}
 }

+ 11 - 0
PDF Office/ViewModels/EditTools/Background/BackgroundCreateColorContentViewModel.cs

@@ -192,6 +192,16 @@ namespace PDF_Office.ViewModels.EditTools.Background
             }
         }
 
+        private int maxPageRange = 0;
+        public int MaxPageRange
+        {
+            get { return maxPageRange; }
+            set
+            {
+                SetProperty(ref maxPageRange, value);
+            }
+        }
+
         private string _pageRangeText { get; set; } = "0";
         public string PageRangeText
         {
@@ -597,6 +607,7 @@ namespace PDF_Office.ViewModels.EditTools.Background
         {
 
             navigationContext.Parameters.TryGetValue<CPDFViewer>(ParameterNames.PDFViewer, out PDFViewer);
+            MaxPageRange = PDFViewer.Document.PageCount;
             EditToolsHelper.GetPageRange(PageRangeSelectIndex, PDFViewer.Document, ref BackgroundInfo.PageRange, PageRangeText);
             if (navigationContext.Parameters.TryGetValue<BackgroundItem>("BackgroundItem", out TemplateBackgroundItem))
             {

+ 12 - 0
PDF Office/ViewModels/EditTools/Background/BackgroundCreateFileContentViewModel.cs

@@ -261,6 +261,16 @@ namespace PDF_Office.ViewModels.EditTools.Background
             }
         }
 
+        private int maxPageRange = 0;
+        public int MaxPageRange
+        {
+            get { return maxPageRange; }
+            set
+            {
+                SetProperty(ref maxPageRange, value);
+            }
+        }
+
         private int _pageRangeSelectIndex = 0;
         public int PageRangeSelectIndex
         {
@@ -613,6 +623,8 @@ namespace PDF_Office.ViewModels.EditTools.Background
         public void OnNavigatedTo(NavigationContext navigationContext)
         {
             navigationContext.Parameters.TryGetValue<CPDFViewer>(ParameterNames.PDFViewer, out PDFViewer);
+            MaxPageRange = PDFViewer.Document.PageCount;
+            EditToolsHelper.GetPageRange(PageRangeSelectIndex, PDFViewer.Document, ref BackgroundInfo.PageRange, PageRangeText);
             navigationContext.Parameters.TryGetValue<string>("UniCode", out unicode);
             if (navigationContext.Parameters.TryGetValue<BackgroundItem>("BackgroundItem", out TemplateBackgroundItem))
             {

+ 11 - 0
PDF Office/ViewModels/EditTools/Bates/BatesCreateContentViewModel.cs

@@ -247,6 +247,16 @@ namespace PDF_Office.ViewModels.EditTools.Bates
             set => SetProperty(ref _createBaseVisible, value);
         }
 
+        private int maxPageRange = 0;
+        public int MaxPageRange
+        {
+            get { return maxPageRange; }
+            set
+            {
+                SetProperty(ref maxPageRange, value);
+            }
+        }
+
         private Visibility _editBaseVisible;
         public Visibility EditBaseVisible
         {
@@ -748,6 +758,7 @@ namespace PDF_Office.ViewModels.EditTools.Bates
         {
 
             navigationContext.Parameters.TryGetValue<CPDFViewer>(ParameterNames.PDFViewer, out PDFViewer);
+            MaxPageRange = PDFViewer.Document.PageCount;
             EditToolsHelper.GetPageRange(PageRangeSelectIndex, PDFViewer.Document, ref BatesInfo.PageRange, PageRangeText);
 
             if (navigationContext.Parameters.TryGetValue<BatesHeaderFooterItem>("BatesItem", out TemplateBatesItem))

+ 11 - 0
PDF Office/ViewModels/EditTools/HeaderFooter/HeaderFooterCreateContentViewModel.cs

@@ -233,6 +233,16 @@ namespace PDF_Office.ViewModels.EditTools.HeaderFooter
             }
         }
 
+        private int maxPageRange = 0;
+        public int MaxPageRange
+        {
+            get { return maxPageRange; }
+            set
+            {
+                SetProperty(ref maxPageRange, value);
+            }
+        }
+
         public string _pageRangeText = "0";
         public string PageRangeText
         {
@@ -773,6 +783,7 @@ namespace PDF_Office.ViewModels.EditTools.HeaderFooter
         public void OnNavigatedTo(NavigationContext navigationContext)
         {
             navigationContext.Parameters.TryGetValue<CPDFViewer>(ParameterNames.PDFViewer, out PDFViewer);
+            MaxPageRange = PDFViewer.Document.PageCount;
             EditToolsHelper.GetPageRange(PageRangeSelectIndex, PDFViewer.Document, ref HeaderFooterInfo.PageRange, PageRangeText);
             if (navigationContext.Parameters.TryGetValue<BatesHeaderFooterItem>("HeaderFooterItem", out TemplateHeaderFooterItem))
             {

+ 11 - 0
PDF Office/ViewModels/EditTools/Watermark/WatermarkCreateFileContentViewModel.cs

@@ -256,6 +256,16 @@ namespace PDF_Office.ViewModels.EditTools.Watermark
             }
         }
 
+        private int maxPageRange = 0;
+        public int MaxPageRange
+        {
+            get { return maxPageRange; }
+            set
+            {
+                SetProperty(ref maxPageRange, value);
+            }
+        }
+
         public string _pageRangeText = "0";
         public string PageRangeText
         {
@@ -775,6 +785,7 @@ namespace PDF_Office.ViewModels.EditTools.Watermark
         public void OnNavigatedTo(NavigationContext navigationContext)
         {
             navigationContext.Parameters.TryGetValue<CPDFViewer>(ParameterNames.PDFViewer, out PDFViewer);
+            MaxPageRange = PDFViewer.Document.PageCount;
             EditToolsHelper.GetPageRange(PageRangeSelectIndex, PDFViewer.Document, ref WatermarkInfo.PageRange, PageRangeText);
             if (navigationContext.Parameters.TryGetValue<WatermarkItem>("WatermarkItem", out TemplateWatermarkItem))
             {

+ 12 - 0
PDF Office/ViewModels/EditTools/Watermark/WatermarkCreateTextContentViewModel.cs

@@ -418,6 +418,17 @@ namespace PDF_Office.ViewModels.EditTools.Watermark
                 });
             }
         }
+
+        private int maxPageRange = 0;
+        public int MaxPageRange
+        {
+            get { return maxPageRange; }
+            set
+            {
+                SetProperty(ref maxPageRange, value);
+            }
+        }
+
         public string _pageRangeText = "0";
         public string PageRangeText
         {
@@ -867,6 +878,7 @@ namespace PDF_Office.ViewModels.EditTools.Watermark
         public void OnNavigatedTo(NavigationContext navigationContext)
         {
             navigationContext.Parameters.TryGetValue<CPDFViewer>(ParameterNames.PDFViewer, out PDFViewer);
+            MaxPageRange = PDFViewer.Document.PageCount;
             EditToolsHelper.GetPageRange(PageRangeSelectIndex, PDFViewer.Document, ref WatermarkInfo.PageRange, PageRangeText);
             if (navigationContext.Parameters.TryGetValue<WatermarkItem>("WatermarkItem", out TemplateWatermarkItem))
             {

+ 1 - 1
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundCreateColorContent.xaml

@@ -128,7 +128,7 @@
         <Grid Grid.Row="3" Margin="0,16,0,0">
             <StackPanel Orientation="Vertical">
                 <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="48" HorizontalAlignment="Left"></TextBlock>
-                <cus:WritableComboBox  Height="32" Width="228" Margin="0,8,0,0" HorizontalAlignment="Left" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}"></cus:WritableComboBox>
+                <cus:WritableComboBox  Height="32" Width="228" Margin="0,8,0,0" HorizontalAlignment="Left" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" MaxPageRange="99999"></cus:WritableComboBox>
             </StackPanel>
         </Grid>
         <Grid Grid.Row="4">

+ 1 - 1
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundCreateFileContent.xaml

@@ -99,7 +99,7 @@
             <Grid Grid.Row="2" Margin="0,16,0,0" VerticalAlignment="Bottom">
                 <StackPanel Orientation="Vertical">
                     <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="48" HorizontalAlignment="Left"></TextBlock>
-                    <cus:WritableComboBox  Height="32" Width="228" Margin="0,8,0,0" HorizontalAlignment="Left" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}"></cus:WritableComboBox>
+                    <cus:WritableComboBox  Height="32" Width="228" Margin="0,8,0,0" HorizontalAlignment="Left" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" MaxPageRange="99999"></cus:WritableComboBox>
                 </StackPanel>
             </Grid>
         </Grid>

+ 1 - 1
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundDialog.xaml

@@ -48,7 +48,7 @@
                             <GridViewColumn Header="页面范围" Width="156" >
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
-                                        <cus:WritableComboBox Height="24" Width="140" Margin="0,8,0,0" Text="{Binding FilePageRangeText,Mode=TwoWay}" SelectedIndex="{Binding FilePageRangeSelectIndex,Mode=TwoWay}" EvenPageIsEnabled="{Binding IsEvenPageIsEnabled,Mode=TwoWay}" LostFocus="PageRangeWritableComboBox_LostFocus"></cus:WritableComboBox>
+                                        <cus:WritableComboBox Height="24" Width="140" Margin="0,8,0,0" Text="{Binding FilePageRangeText,Mode=TwoWay}" SelectedIndex="{Binding FilePageRangeSelectIndex,Mode=TwoWay}" EvenPageIsEnabled="{Binding IsEvenPageIsEnabled,Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange,Mode=TwoWay}" LostFocus="PageRangeWritableComboBox_LostFocus"></cus:WritableComboBox>
                                     </DataTemplate>
                                 </GridViewColumn.CellTemplate>
                             </GridViewColumn>

+ 1 - 1
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBates/HomePageBatesCreateContent.xaml

@@ -179,7 +179,7 @@
                 <Grid Grid.Row="4" Margin="0,16,0,0" Width="228">
                     <StackPanel>
                         <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="48" HorizontalAlignment="Left"></TextBlock>
-                        <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}"></cus:WritableComboBox>
+                        <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" MaxPageRange="99999"></cus:WritableComboBox>
                     </StackPanel>
                 </Grid>
             </Grid>

+ 1 - 1
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBates/HomePageBatesDialog.xaml

@@ -48,7 +48,7 @@
                             <GridViewColumn Header="页面范围" Width="156" >
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
-                                        <cus:WritableComboBox x:Name="PageRangeWritableComboBox" Height="24" Width="140" Margin="0,8,0,0" Text="{Binding FilePageRangeText,Mode=TwoWay}" SelectedIndex="{Binding FilePageRangeSelectIndex,Mode=TwoWay}"  EvenPageIsEnabled="{Binding IsEvenPageIsEnabled,Mode=TwoWay}" LostFocus="PageRangeWritableComboBox_LostFocus"></cus:WritableComboBox>
+                                        <cus:WritableComboBox x:Name="PageRangeWritableComboBox" Height="24" Width="140" Margin="0,8,0,0" Text="{Binding FilePageRangeText,Mode=TwoWay}" SelectedIndex="{Binding FilePageRangeSelectIndex,Mode=TwoWay}"  EvenPageIsEnabled="{Binding IsEvenPageIsEnabled,Mode=TwoWay}"  MaxPageRange="{Binding MaxPageRange,Mode=TwoWay}" LostFocus="PageRangeWritableComboBox_LostFocus"></cus:WritableComboBox>
                                     </DataTemplate>
                                 </GridViewColumn.CellTemplate>
                             </GridViewColumn>

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

@@ -48,7 +48,7 @@
                             <GridViewColumn Header="页面范围" Width="156" >
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
-                                        <cus:WritableComboBox Height="24" Width="140" Margin="0,8,0,0" Text="{Binding FilePageRangeText,Mode=TwoWay}" SelectedIndex="{Binding FilePageRangeSelectIndex,Mode=TwoWay}" EvenPageIsEnabled="{Binding IsEvenPageIsEnabled,Mode=TwoWay}" LostFocus="PageRangeWritableComboBox_LostFocus"></cus:WritableComboBox>
+                                        <cus:WritableComboBox Height="24" Width="140" Margin="0,8,0,0" Text="{Binding FilePageRangeText,Mode=TwoWay}" SelectedIndex="{Binding FilePageRangeSelectIndex,Mode=TwoWay}" EvenPageIsEnabled="{Binding IsEvenPageIsEnabled,Mode=TwoWay}" LostFocus="PageRangeWritableComboBox_LostFocus"  MaxPageRange="{Binding MaxPageRange,Mode=TwoWay}" ></cus:WritableComboBox>
                                     </DataTemplate>
                                 </GridViewColumn.CellTemplate>
                             </GridViewColumn>

+ 1 - 1
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageHeaderFooter/HomePageHeaderFooterCreateContent.xaml

@@ -167,7 +167,7 @@
                 <Grid Grid.Row="4" Margin="0,16,0,0" Width="228">
                     <StackPanel>
                         <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="48" HorizontalAlignment="Left"></TextBlock>
-                        <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}"></cus:WritableComboBox>
+                        <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" MaxPageRange="99999"></cus:WritableComboBox>
                     </StackPanel>
                 </Grid>
             </Grid>

+ 1 - 1
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageHeaderFooter/HomePageHeaderFooterDialog.xaml

@@ -48,7 +48,7 @@
                             <GridViewColumn Header="页面范围" Width="156" >
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
-                                        <cus:WritableComboBox Height="24" Width="140" Margin="0,8,0,0" Text="{Binding FilePageRangeText,Mode=TwoWay}" SelectedIndex="{Binding FilePageRangeSelectIndex,Mode=TwoWay}" EvenPageIsEnabled="{Binding IsEvenPageIsEnabled,Mode=TwoWay}" LostFocus="PageRangeWritableComboBox_LostFocus"></cus:WritableComboBox>
+                                        <cus:WritableComboBox Height="24" Width="140" Margin="0,8,0,0" Text="{Binding FilePageRangeText,Mode=TwoWay}" SelectedIndex="{Binding FilePageRangeSelectIndex,Mode=TwoWay}" EvenPageIsEnabled="{Binding IsEvenPageIsEnabled,Mode=TwoWay}" LostFocus="PageRangeWritableComboBox_LostFocus"  MaxPageRange="{Binding MaxPageRange,Mode=TwoWay}" ></cus:WritableComboBox>
                                     </DataTemplate>
                                 </GridViewColumn.CellTemplate>
                             </GridViewColumn>

+ 1 - 1
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkCreateFileContent.xaml

@@ -107,7 +107,7 @@
             <Grid Width="228" Grid.Row="2"  Margin="16,10,16,4" Grid.RowSpan="2">
                 <StackPanel Orientation="Vertical">
                     <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="48" HorizontalAlignment="Left"></TextBlock>
-                    <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}"></cus:WritableComboBox>
+                    <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" MaxPageRange="99999"></cus:WritableComboBox>
                 </StackPanel>
             </Grid>
         </Grid>

+ 1 - 1
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkCreateTextContent.xaml

@@ -125,7 +125,7 @@
         <Grid Width="228" Grid.Row="4"  Margin="0,8,0,4">
             <StackPanel Orientation="Vertical">
                 <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
-                <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}"></cus:WritableComboBox>
+                <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" MaxPageRange="99999"></cus:WritableComboBox>
             </StackPanel>
         </Grid>
     </Grid>

+ 1 - 1
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkDialog.xaml

@@ -48,7 +48,7 @@
                             <GridViewColumn Header="页面范围" Width="156" >
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
-                                        <cus:WritableComboBox Height="24" Width="140" Margin="0,8,0,0" Text="{Binding FilePageRangeText,Mode=TwoWay}" SelectedIndex="{Binding FilePageRangeSelectIndex,Mode=TwoWay}" EvenPageIsEnabled="{Binding IsEvenPageIsEnabled,Mode=TwoWay}" LostFocus="PageRangeWritableComboBox_LostFocus"></cus:WritableComboBox>
+                                        <cus:WritableComboBox Height="24" Width="140" Margin="0,8,0,0" Text="{Binding FilePageRangeText,Mode=TwoWay}" SelectedIndex="{Binding FilePageRangeSelectIndex,Mode=TwoWay}" EvenPageIsEnabled="{Binding IsEvenPageIsEnabled,Mode=TwoWay}" LostFocus="PageRangeWritableComboBox_LostFocus"  MaxPageRange="{Binding MaxPageRange,Mode=TwoWay}" ></cus:WritableComboBox>
                                     </DataTemplate>
                                 </GridViewColumn.CellTemplate>
                             </GridViewColumn>

+ 1 - 1
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageExtractDialog.xaml

@@ -34,7 +34,7 @@
                     <Grid Grid.Row="0">
                         <StackPanel Orientation="Vertical" Margin="0,40,0,0">
                             <TextBlock Text="页面范围" FontWeight="ExtraBlack" Width="56" Height="22" HorizontalAlignment="Left"/>
-                            <cus:WritableComboBox x:Name="PageRangeComboBox" Width="208" Height="32" HorizontalAlignment="Left" Margin="0,20,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" >
+                            <cus:WritableComboBox x:Name="PageRangeComboBox" Width="208" Height="32" HorizontalAlignment="Left" Margin="0,20,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange,Mode=TwoWay}">
                                 <i:Interaction.Triggers>
                                     <i:EventTrigger EventName="SelectionChanged">
                                         <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=ExtractPreview}" />

+ 1 - 1
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageSplitDialog.xaml

@@ -50,7 +50,7 @@
                                 <StackPanel Orientation="Horizontal">
                                     <RadioButton VerticalAlignment="Center" IsChecked="{Binding CustomPageRangeIsCheck}" Command="{Binding CustomPageRangeCommand}"></RadioButton>
                                     <TextBlock Text="按特定页面拆分" VerticalAlignment="Center"></TextBlock>
-                                    <cus:WritableComboBox x:Name="PageRangeComboBox"  Height="32" Width="183" Text="{Binding PageRangeText, Mode=TwoWay}" IsEnabled="{Binding CustomPageRangeIsEnabled}" SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}">
+                                    <cus:WritableComboBox x:Name="PageRangeComboBox"  Height="32" Width="183" Text="{Binding PageRangeText, Mode=TwoWay}" IsEnabled="{Binding CustomPageRangeIsEnabled}" SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange,Mode=TwoWay}">
                                         <i:Interaction.Triggers>
                                             <i:EventTrigger EventName="SelectionChanged">
                                                 <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=SplitPreview}" />

+ 1 - 1
PDF Office/Views/EditTools/Background/BackgroundCreateColorContent.xaml

@@ -128,7 +128,7 @@
         <Grid Grid.Row="3" Margin="0,16,0,0">
             <StackPanel Orientation="Vertical">
                 <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="48" HorizontalAlignment="Left"></TextBlock>
-                <cus:WritableComboBox  Height="32" Width="228" Margin="0,8,0,0" HorizontalAlignment="Left" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}"></cus:WritableComboBox>
+                <cus:WritableComboBox  Height="32" Width="228" Margin="0,8,0,0" HorizontalAlignment="Left" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange}"></cus:WritableComboBox>
             </StackPanel>
         </Grid>
         <Grid Grid.Row="4">

+ 1 - 1
PDF Office/Views/EditTools/Background/BackgroundCreateFileContent.xaml

@@ -99,7 +99,7 @@
             <Grid Grid.Row="2" Margin="0,16,0,0" VerticalAlignment="Bottom">
                 <StackPanel Orientation="Vertical">
                     <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="48" HorizontalAlignment="Left"></TextBlock>
-                    <cus:WritableComboBox  Height="32" Width="228" Margin="0,8,0,0" HorizontalAlignment="Left" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}"></cus:WritableComboBox>
+                    <cus:WritableComboBox  Height="32" Width="228" Margin="0,8,0,0" HorizontalAlignment="Left" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange}"></cus:WritableComboBox>
                 </StackPanel>
             </Grid>
         </Grid>

+ 1 - 1
PDF Office/Views/EditTools/Bates/BatesCreateContent.xaml

@@ -170,7 +170,7 @@
             <Grid Grid.Row="4" Margin="0,16,0,0" Width="228">
                 <StackPanel>
                     <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="48" HorizontalAlignment="Left"></TextBlock>
-                    <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}"></cus:WritableComboBox>
+                    <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange}"></cus:WritableComboBox>
                 </StackPanel>
             </Grid>
         </Grid>

+ 1 - 1
PDF Office/Views/EditTools/HeaderFooter/HeaderFooterCreateContent.xaml

@@ -162,7 +162,7 @@
             <Grid Grid.Row="4" Margin="0,16,0,0" Width="228">
                 <StackPanel>
                     <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="48" HorizontalAlignment="Left"></TextBlock>
-                    <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}"></cus:WritableComboBox>
+                    <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange}" ></cus:WritableComboBox>
                 </StackPanel>
             </Grid>
         </Grid>

+ 1 - 1
PDF Office/Views/EditTools/Watermark/WatermarkCreateFileContent.xaml

@@ -107,7 +107,7 @@
             <Grid Width="228" Grid.Row="2"  Margin="16,10,16,4" Grid.RowSpan="2">
                 <StackPanel Orientation="Vertical">
                     <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="48" HorizontalAlignment="Left"></TextBlock>
-                    <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}"></cus:WritableComboBox>
+                    <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange}"></cus:WritableComboBox>
                 </StackPanel>
             </Grid>
         </Grid>

+ 1 - 1
PDF Office/Views/EditTools/Watermark/WatermarkCreateTextContent.xaml

@@ -125,7 +125,7 @@
         <Grid Width="228" Grid.Row="4"  Margin="0,8,0,4">
             <StackPanel Orientation="Vertical">
                 <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
-                <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}"></cus:WritableComboBox>
+                <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange}"></cus:WritableComboBox>
             </StackPanel>
         </Grid>
     </Grid>