liyijie 2 lat temu
rodzic
commit
3444b5f47f
43 zmienionych plików z 644 dodań i 437 usunięć
  1. 2 1
      PDF Office/CustomControl/WritableComboBox.xaml
  2. 2 2
      PDF Office/CustomControl/WritableComboBox.xaml.cs
  3. 23 0
      PDF Office/Helper/HomePageEditHelper.cs
  4. 9 2
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundCreateColorContentViewModel.cs
  5. 8 2
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundCreateFileContentViewModel.cs
  6. 3 1
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundDialogViewModel.cs
  7. 5 2
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundTemplateListColorContentViewModel.cs
  8. 5 2
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundTemplateListFileContentViewModel.cs
  9. 8 0
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBatchProcessingDialogViewModel.cs
  10. 14 1
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBates/HomePageBatesCreateContentViewModel.cs
  11. 11 3
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBates/HomePageBatesDialogViewModel.cs
  12. 5 1
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBates/HomePageBatesTemplateListContentViewModel.cs
  13. 12 3
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialogViewModel.cs
  14. 9 1
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageHeaderFooter/HomePageHeaderFooterCreateContentViewModel.cs
  15. 3 1
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageHeaderFooter/HomePageHeaderFooterDialogViewModel.cs
  16. 3 1
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageHeaderFooter/HomePageHeaderFooterTemplateListContentViewModel.cs
  17. 9 1
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkCreateFileContentViewModel.cs
  18. 7 2
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkCreateTextContentViewModel.cs
  19. 3 1
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkDialogViewModel.cs
  20. 2 1
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkTemplateListFileContentViewModel.cs
  21. 4 2
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkTemplateListTextContentViewModel.cs
  22. 15 4
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePictureToPDFDialogViewModel.cs
  23. 45 1
      PDF Office/ViewModels/HomePanel/PDFTools/QuickToolsContentViewModel.cs
  24. 29 21
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundCreateBaseContent.xaml
  25. 13 16
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundDialog.xaml
  26. 1 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundTemplateListColorContent.xaml
  27. 1 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundTemplateListFileContent.xaml
  28. 117 111
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBates/HomePageBatesCreateContent.xaml
  29. 19 20
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBates/HomePageBatesDialog.xaml
  30. 2 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBates/HomePageBatesTemplateListContent.xaml
  31. 12 15
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageCompressDialog.xaml
  32. 13 17
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialog.xaml
  33. 110 104
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageHeaderFooter/HomePageHeaderFooterCreateContent.xaml
  34. 14 17
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageHeaderFooter/HomePageHeaderFooterDialog.xaml
  35. 1 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageHeaderFooter/HomePageHeaderFooterTemplateListContent.xaml
  36. 13 16
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageRemoveDialog.xaml
  37. 11 15
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageSetPasswordDialog.xaml
  38. 27 20
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkCreateBaseContent.xaml
  39. 13 16
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkDialog.xaml
  40. 1 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkTemplateListFileContent.xaml
  41. 1 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkTemplateListTextContent.xaml
  42. 13 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePictureToPDFDialog.xaml
  43. 26 12
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePictureToPDFDialog.xaml.cs

+ 2 - 1
PDF Office/CustomControl/WritableComboBox.xaml

@@ -33,7 +33,8 @@
             HorizontalAlignment="Left"
             VerticalContentAlignment="Center"
             TextChanged="writableTextBox_TextChange"
-            Visibility="Hidden" 
+            Visibility="Hidden"
+            Panel.ZIndex="1"
             />
     </Grid>
 </UserControl>

+ 2 - 2
PDF Office/CustomControl/WritableComboBox.xaml.cs

@@ -134,10 +134,10 @@ namespace PDF_Office.CustomControl
 
         private void writableComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
         {
-            if (this.writableComboBox.ActualWidth == 0) { return; }
+            
             if (this.writableComboBox.SelectedIndex == this.writableComboBox.Items.Count - 1)
             {
-                
+                if (this.writableComboBox.ActualWidth == 0) { this.writableTextBox.Width = 210; this.writableTextBox.Visibility = Visibility.Visible; return; }
                 this.writableTextBox.Width = this.writableComboBox.ActualWidth - 18;
                 Trace.WriteLine(this.writableComboBox.ActualWidth);
                 this.writableTextBox.Visibility = Visibility.Visible;

+ 23 - 0
PDF Office/Helper/HomePageEditHelper.cs

@@ -9,6 +9,7 @@ using System.Threading.Tasks;
 using System.Windows.Documents;
 using static System.Windows.Forms.VisualStyles.VisualStyleElement;
 using ComPDFKit.PDFDocument;
+using PDF_Office.Model.EditTools.Bates;
 
 namespace PDF_Office.Helper
 {
@@ -150,6 +151,28 @@ namespace PDF_Office.Helper
             }
         }
 
+        public static string UpDataPageRange(int pagecount,string pagerange) {
+
+            List<int> PageIndexLists = new List<int>();
+            string str = "";
+            if(CommonHelper.GetPagesInRange(ref PageIndexLists, pagerange, 9999, new char[] { ',' }, new char[] { '-' }))
+            {
+                
+                foreach (var PageIndex in PageIndexLists) {
+                   int pageindex = PageIndex + 1;
+                    if (pageindex<= pagecount)
+                    {
+                        str = str + pageindex.ToString();
+                        str = str + ",";
+                    }
+                }
+                if(str=="")
+                    return str;
+                return str.Remove(str.LastIndexOf(","),1);
+            }
+            return str;
+        }
+
         public static string ReverseDate(string str,CPDFDocument Document)
         {
             string yyyy = DateTime.Now.ToString("yyyy");

+ 9 - 2
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundCreateColorContentViewModel.cs

@@ -15,6 +15,7 @@ using System.Collections.Generic;
 using System.IO;
 using System.Linq;
 using System.Windows.Media;
+using PDF_Office.Model.EditTools.Bates;
 
 namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageBackground
 {
@@ -166,9 +167,15 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             get { return _pageRangeText; }
             set
             {
+                List<int> PageIndexLists = new List<int>();
                 _pageRangeText = value;
-                BackgroundInfo.PageRange=EditToolsHelper.ParseRange(PageRangeText);
-                
+                BackgroundInfo.PageRange = PageRangeText;
+                if (PageRangeSelectIndex == 3 && !CommonHelper.GetPagesInRange(ref PageIndexLists, PageRangeText, 99999, new char[] { ',' }, new char[] { '-' }))
+                {
+                    BackgroundInfo.PageRangeIndex = 0;
+                }
+                BackgroundInfo.PageRangeIndex = 3;
+
             }
         }
 

+ 8 - 2
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundCreateFileContentViewModel.cs

@@ -230,9 +230,15 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             get { return _pageRangeText; }
             set
             {
+                List<int> PageIndexLists = new List<int>();
                 _pageRangeText = value;
-                BackgroundInfo.PageRange = EditToolsHelper.ParseRange(PageRangeText);
-                // EditToolsHelper.GetPageRange(PageRangeSelectIndex, PDFViewer.Document, ref BackgroundInfo.PageRange, PageRangeText);
+                BackgroundInfo.PageRange = PageRangeText;
+                if (PageRangeSelectIndex == 3 && !CommonHelper.GetPagesInRange(ref PageIndexLists, PageRangeText, 99999, new char[] { ',' }, new char[] { '-' }))
+                {
+                    BackgroundInfo.PageRangeIndex = 0;
+                }
+                BackgroundInfo.PageRangeIndex = 3;
+
 
             }
         }

+ 3 - 1
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundDialogViewModel.cs

@@ -340,7 +340,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 char[] rangeSeparator = new char[] { '-' };
                 List<int> PageIndexLists = new List<int>();
                 CPDFDocument document = CPDFDocument.InitWithFilePath(filename);
-                if (document == null)
+                if (document == null || document.IsEncrypted)
                 {
                     PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
                     continue;
@@ -663,6 +663,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 fileNames = filepath;
                 PDFFileCount();
                 updateListview("待确定");
+                CreateGridSpan = "1";
+                CreateGridSpanVisibility = Visibility.Visible;
                 EnterSelectedContent(TemplateListBaseName);
             }
         }

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

@@ -1,4 +1,7 @@
-using PDF_Office.EventAggregators;
+using ComPDFKit.PDFDocument;
+using PDF_Office.EventAggregators;
+using PDF_Office.Helper;
+using PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
 using PDF_Office.Model.EditTools.Background;
 using PDF_Office.Properties;
 using PDFSettings;
@@ -212,7 +215,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 homePageBackgroundDialogViewModel.BackgroundInfo = BackgroundInfo;
                 for (int i = 0; homePageBackgroundDialogViewModel.PDFDataTable.Rows.Count > i; i++)
                 {
-                    homePageBackgroundDialogViewModel.PDFCurrentDataTable.Rows[i]["FilePageRangeText"] = BackgroundInfo.PageRange;
+                    homePageBackgroundDialogViewModel.PDFCurrentDataTable.Rows[i]["FilePageRangeText"] = HomePageEditHelper.UpDataPageRange(CPDFDocument.InitWithFilePath(HomePageBatchProcessingDialogModel.FilePaths[i]).PageCount, BackgroundInfo.PageRange);
                     homePageBackgroundDialogViewModel.PDFCurrentDataTable.Rows[i]["FilePageRangeSelectIndex"] = BackgroundInfo.PageRangeIndex.ToString();
                     homePageBackgroundDialogViewModel.updateListview("待确定");
                 }

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

@@ -1,5 +1,8 @@
-using Microsoft.Office.Interop.Word;
+using ComPDFKit.PDFDocument;
+using Microsoft.Office.Interop.Word;
 using PDF_Office.EventAggregators;
+using PDF_Office.Helper;
+using PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
 using PDF_Office.Model.EditTools.Background;
 using PDF_Office.Model.EditTools.Bates;
 using PDF_Office.Properties;
@@ -225,7 +228,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 homePageBackgroundDialogViewModel.BackgroundInfo = BackgroundInfo;
                 for (int i = 0; homePageBackgroundDialogViewModel.PDFDataTable.Rows.Count > i; i++)
                 {
-                    homePageBackgroundDialogViewModel.PDFCurrentDataTable.Rows[i]["FilePageRangeText"] = BackgroundInfo.PageRange;
+                    homePageBackgroundDialogViewModel.PDFCurrentDataTable.Rows[i]["FilePageRangeText"] = HomePageEditHelper.UpDataPageRange(CPDFDocument.InitWithFilePath(HomePageBatchProcessingDialogModel.FilePaths[i]).PageCount, BackgroundInfo.PageRange);
                     homePageBackgroundDialogViewModel.PDFCurrentDataTable.Rows[i]["FilePageRangeSelectIndex"] = BackgroundInfo.PageRangeIndex.ToString();
                     homePageBackgroundDialogViewModel.updateListview("待确定");
                 }

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

@@ -22,6 +22,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
 
         public IRegionManager BatchProcessingRegion;
 
+        int convertertypeindex = 0;
+
         private string batchProcessingRegionName;
         public string BatchProcessingRegionName
         {
@@ -58,6 +60,9 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             NavigationParameters param = new NavigationParameters();
             param.Add(ParameterNames.FilePath, HomePageBatchProcessingDialogModel.FilePaths);
             BatchProcessingVisible = Visibility.Collapsed;
+            if (index =="0") {
+                param.Add("ConverterTypeIndex", convertertypeindex);
+            }
             BatchProcessingRegion.RequestNavigate(BatchProcessingRegionName, HomePageBatchProcessingDialogModel.GetBatchProcessing[int.Parse(index)], param);
             BatchProcessingVisible = Visibility.Visible;
         }
@@ -83,10 +88,13 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
         {
             string batchprocessingname = "";
             string[] filepath = null;
+            int convertertypeindex=0;
             parameters.TryGetValue<string>(ParameterNames.BatchProcessing_Name, out batchprocessingname);
             parameters.TryGetValue<string[]>(ParameterNames.FilePath, out filepath);
+            parameters.TryGetValue<int>("ConverterTypeIndex", out convertertypeindex);
             if (batchprocessingname != null || filepath != null) {
                 fileNames = filepath.ToList();
+                this.convertertypeindex = convertertypeindex;
                 ChangeBatchProcessing(batchprocessingname);
             }
         }

+ 14 - 1
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBates/HomePageBatesCreateContentViewModel.cs

@@ -16,6 +16,10 @@ using System.Linq;
 using System.Windows.Media;
 using System.Windows;
 using ComPDFKit.PDFDocument;
+using ComPDFKitViewer;
+using Microsoft.Office.Interop.Word;
+using PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
+using System.Diagnostics;
 
 namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageBates
 {
@@ -141,8 +145,17 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             get { return _pageRangeText; }
             set
             {
+                List<int> PageIndexLists = new List<int>();
                 _pageRangeText = value;
-                BatesInfo.PageRange = EditToolsHelper.ParseRange(PageRangeText);
+                BatesInfo.PageRange =PageRangeText;
+                if (PageRangeSelectIndex == 3 && !CommonHelper.GetPagesInRange(ref PageIndexLists, PageRangeText, 99999, new char[] { ',' }, new char[] { '-' })) {
+                    BatesInfo.PageRangeIndex = 0;
+                }
+                BatesInfo.PageRangeIndex = 3;
+                //CommonHelper.GetPagesInRange(ref PageIndexLists, PageRangeText, 99999, new char[] { ',' }, new char[] { '-' });
+                //foreach (var a in PageIndexLists) {
+                //    Trace.WriteLine("页面范围:" + a);
+                //}
                 //CommonHelper.GetPagesInRange(ref PageIndexLists, BatesInfo.PageRange, , new char[] { ',' }, new char[] { '-' }, true))
                 //EditToolsHelper.GetPageRange(PageRangeSelectIndex, PDFViewer.Document, ref BatesInfo.PageRange, PageRangeText);
 

+ 11 - 3
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBates/HomePageBatesDialogViewModel.cs

@@ -22,6 +22,7 @@ using ImTools;
 using PDF_Office.Model.EditTools.Watermark;
 using PDF_Office.Model.EditTools.Bates;
 using PDF_Office.Model.EditTools.Background;
+using MessageBox = System.Windows.MessageBox;
 
 namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageBates
 {
@@ -277,11 +278,13 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 char[] rangeSeparator = new char[] { '-' };
                 List<int> PageIndexLists = new List<int>();
                 CPDFDocument document = CPDFDocument.InitWithFilePath(filename);
-                if (document == null)
+                if (document == null||document.IsEncrypted)
                 {
                     PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                    continue;
+                    fileNamesIndex++;
+                    continue; 
                 }
+               // MessageBox.Show(filename);
                 CreateBates(document);
                 document.WriteToFilePath(filename + "_Bates.pdf");
                 //if (!CommonHelper.GetPagesInRange(ref PageIndexLists, "1-" + document.PageCount.ToString(), document.PageCount, enumerationSeparator, rangeSeparator))
@@ -307,7 +310,10 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             if (BatesInfo != null)
             {
                 if (bates != null) { bates.Release(); }
-                bates = document.GetBates();
+                
+                    bates = document.GetBates();
+                
+                
                 for (int i = 0; i < 6; i++)
                 {
                     bates.SetText(i, BatesInfo.TextData[i].text);
@@ -589,6 +595,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             if (filepath != null)
             {
                 fileNames = filepath;
+                CreateGridSpan = "1";
+                CreateGridSpanVisibility = Visibility.Visible;
                 PDFFileCount();
                 updateListview("待确定");
                 EnterSelectedContent(TemplateListName);

+ 5 - 1
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBates/HomePageBatesTemplateListContentViewModel.cs

@@ -16,6 +16,9 @@ using System.Linq;
 using System.Windows.Controls;
 using System.Windows;
 using Prism.Common;
+using PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
+using ComPDFKit.PDFDocument;
+using Microsoft.Office.Interop.Word;
 
 namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageBates
 {
@@ -172,7 +175,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 ConvertItemToInfo(template, ref BatesInfo);
                 homePageBatesDialogViewModel.BatesInfo = BatesInfo;
                 for(int i =0; homePageBatesDialogViewModel.PDFDataTable.Rows.Count> i;i++) {
-                    homePageBatesDialogViewModel.PDFCurrentDataTable.Rows[i]["FilePageRangeText"] = BatesInfo.PageRange;
+
+                    homePageBatesDialogViewModel.PDFCurrentDataTable.Rows[i]["FilePageRangeText"] = HomePageEditHelper.UpDataPageRange(CPDFDocument.InitWithFilePath(HomePageBatchProcessingDialogModel.FilePaths[i]).PageCount, BatesInfo.PageRange);
                     homePageBatesDialogViewModel.PDFCurrentDataTable.Rows[i]["FilePageRangeSelectIndex"] = BatesInfo.PageRangeIndex.ToString();
                     homePageBatesDialogViewModel.updateListview("待确定");
                 }

+ 12 - 3
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialogViewModel.cs

@@ -44,8 +44,6 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
 
         public IRegionManager ConverterRegion;
 
-        public int ConverterTypeIndex=0;
-
         public List<int> fileNamesView = new List<int>();
 
         private int fileNamesIndex = 0;
@@ -132,6 +130,15 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             }
         }
 
+        private int converterTypeIndex = 0;
+        public int ConverterTypeIndex
+        {
+            get { return converterTypeIndex; }
+            set
+            {
+                SetProperty(ref converterTypeIndex, value);
+            }
+        }
         private string converterRegionName;
         public string ConverterRegionName
         {
@@ -574,13 +581,15 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
         public void OnNavigatedTo(NavigationContext navigationContext)
         {
             List<string> filepath = new List<string>();
+            int convertertypeindex=0;
             navigationContext.Parameters.TryGetValue<List<string>>(ParameterNames.FilePath, out filepath);
+            navigationContext.Parameters.TryGetValue<int>("ConverterTypeIndex", out convertertypeindex);
             if (filepath != null)
             {
                 fileNames = filepath;
                 PDFFileCount();
                 updateListview("待确定");
-                ChangeConverter(0);
+                ChangeConverter(ConverterTypeIndex);
             }
         }
        

+ 9 - 1
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageHeaderFooter/HomePageHeaderFooterCreateContentViewModel.cs

@@ -16,6 +16,7 @@ using System.Linq;
 using System.Windows.Media;
 using System.Windows;
 using PDF_Office.Model.EditTools.Bates;
+using PDF_Office.Model.EditTools.Background;
 
 namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageHeaderFooter
 {
@@ -220,8 +221,15 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             get { return _pageRangeText; }
             set
             {
+               
+                List<int> PageIndexLists = new List<int>();
                 _pageRangeText = value;
-                HeaderFooterInfo.PageRange = EditToolsHelper.ParseRange(PageRangeText);
+                HeaderFooterInfo.PageRange = PageRangeText;
+                if (PageRangeSelectIndex == 3 && !CommonHelper.GetPagesInRange(ref PageIndexLists, PageRangeText, 99999, new char[] { ',' }, new char[] { '-' }))
+                {
+                    HeaderFooterInfo.PageRangeIndex = 0;
+                }
+                HeaderFooterInfo.PageRangeIndex = 3;
                 //EditToolsHelper.GetPageRange(PageRangeSelectIndex, PDFViewer.Document, ref HeaderFooterInfo.PageRange, PageRangeText);
 
             }

+ 3 - 1
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageHeaderFooter/HomePageHeaderFooterDialogViewModel.cs

@@ -287,7 +287,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 char[] rangeSeparator = new char[] { '-' };
                 List<int> PageIndexLists = new List<int>();
                 CPDFDocument document = CPDFDocument.InitWithFilePath(filename);
-                if (document == null)
+                if (document == null || document.IsEncrypted)
                 {
                     PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
                     continue;
@@ -597,6 +597,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             {
                 fileNames = filepath;
                 PDFFileCount();
+                CreateGridSpan = "1";
+                CreateGridSpanVisibility = Visibility.Visible;
                 updateListview("待确定");
                 EnterSelectedContent(TemplateListName);
             }

+ 3 - 1
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageHeaderFooter/HomePageHeaderFooterTemplateListContentViewModel.cs

@@ -17,6 +17,8 @@ using System.Windows.Controls;
 using System.Windows;
 using PDF_Office.Model.EditTools.Bates;
 using PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageBates;
+using ComPDFKit.PDFDocument;
+using PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
 
 namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageHeaderFooter
 {
@@ -173,7 +175,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 homePageHeaderFooterDialogViewModel.HeaderFooterInfo = HeaderFooterInfo;
                 for (int i = 0; homePageHeaderFooterDialogViewModel.PDFDataTable.Rows.Count > i; i++)
                 {
-                    homePageHeaderFooterDialogViewModel.PDFCurrentDataTable.Rows[i]["FilePageRangeText"] = HeaderFooterInfo.PageRange;
+                    homePageHeaderFooterDialogViewModel.PDFCurrentDataTable.Rows[i]["FilePageRangeText"] = HomePageEditHelper.UpDataPageRange(CPDFDocument.InitWithFilePath(HomePageBatchProcessingDialogModel.FilePaths[i]).PageCount, HeaderFooterInfo.PageRange);
                     homePageHeaderFooterDialogViewModel.PDFCurrentDataTable.Rows[i]["FilePageRangeSelectIndex"] = HeaderFooterInfo.PageRangeIndex.ToString();
                     homePageHeaderFooterDialogViewModel.updateListview("待确定");
                 }

+ 9 - 1
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkCreateFileContentViewModel.cs

@@ -21,6 +21,7 @@ using System.Linq;
 using System.Windows;
 using System.Threading.Tasks;
 using PDF_Office.Model.EditTools.Background;
+using PDF_Office.Model.EditTools.HeaderFooter;
 
 namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageWatermark
 {
@@ -231,8 +232,15 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             get { return _pageRangeText; }
             set
             {
+                
+                List<int> PageIndexLists = new List<int>();
                 _pageRangeText = value;
-                WatermarkInfo.PageRange = EditToolsHelper.ParseRange(PageRangeText);
+                WatermarkInfo.PageRange = PageRangeText;
+                if (PageRangeSelectIndex == 3 && !CommonHelper.GetPagesInRange(ref PageIndexLists, PageRangeText, 99999, new char[] { ',' }, new char[] { '-' }))
+                {
+                    WatermarkInfo.PageRangeIndex = 0;
+                }
+                WatermarkInfo.PageRangeIndex = 3;
                 //EditToolsHelper.GetPageRange(PageRangeSelectIndex, PDFViewer.Document, ref WatermarkInfo.PageRange, PageRangeText);
 
             }

+ 7 - 2
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkCreateTextContentViewModel.cs

@@ -370,9 +370,14 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             get { return _pageRangeText; }
             set
             {
+                List<int> PageIndexLists = new List<int>();
                 _pageRangeText = value;
-                WatermarkInfo.PageRange = EditToolsHelper.ParseRange(PageRangeText);
-                //EditToolsHelper.GetPageRange(PageRangeSelectIndex, PDFViewer.Document, ref WatermarkInfo.PageRange, PageRangeText);
+                WatermarkInfo.PageRange = PageRangeText;
+                if (PageRangeSelectIndex == 3 && !CommonHelper.GetPagesInRange(ref PageIndexLists, PageRangeText, 99999, new char[] { ',' }, new char[] { '-' }))
+                {
+                    WatermarkInfo.PageRangeIndex = 0;
+                }
+                WatermarkInfo.PageRangeIndex = 3;
 
             }
         }

+ 3 - 1
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkDialogViewModel.cs

@@ -343,7 +343,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 char[] rangeSeparator = new char[] { '-' };
                 List<int> PageIndexLists = new List<int>();
                 CPDFDocument document = CPDFDocument.InitWithFilePath(filename);
-                if (document == null)
+                if (document == null || document.IsEncrypted)
                 {
                     PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
                     continue;
@@ -668,6 +668,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             navigationContext.Parameters.TryGetValue<List<string>>(ParameterNames.FilePath, out filepath);
             if (filepath != null)
             {
+                CreateGridSpan = "1";
+                CreateGridSpanVisibility = Visibility.Visible;
                 EnterSelectedContent(TemplateListName);
                 fileNames = filepath;
                 PDFFileCount();

+ 2 - 1
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkTemplateListFileContentViewModel.cs

@@ -4,6 +4,7 @@ using ComPDFKitViewer.PdfViewer;
 using PDF_Office.CustomControl;
 using PDF_Office.EventAggregators;
 using PDF_Office.Helper;
+using PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
 using PDF_Office.Model.EditTools.Watermark;
 using PDF_Office.Properties;
 using PDFSettings;
@@ -296,7 +297,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 homePageWatermarkDialogViewModel.WatermarkInfo = WatermarkInfo;
                 for (int i = 0; homePageWatermarkDialogViewModel.PDFDataTable.Rows.Count > i; i++)
                 {
-                    homePageWatermarkDialogViewModel.PDFCurrentDataTable.Rows[i]["FilePageRangeText"] = WatermarkInfo.PageRange;
+                    homePageWatermarkDialogViewModel.PDFCurrentDataTable.Rows[i]["FilePageRangeText"] = HomePageEditHelper.UpDataPageRange(CPDFDocument.InitWithFilePath(HomePageBatchProcessingDialogModel.FilePaths[i]).PageCount, WatermarkInfo.PageRange);
                     homePageWatermarkDialogViewModel.PDFCurrentDataTable.Rows[i]["FilePageRangeSelectIndex"] = WatermarkInfo.PageRangeIndex.ToString();
                     homePageWatermarkDialogViewModel.updateListview("待确定");
                 }

+ 4 - 2
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkTemplateListTextContentViewModel.cs

@@ -1,7 +1,9 @@
-using ComPDFKitViewer.PdfViewer;
+using ComPDFKit.PDFDocument;
+using ComPDFKitViewer.PdfViewer;
 using PDF_Office.CustomControl;
 using PDF_Office.EventAggregators;
 using PDF_Office.Helper;
+using PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
 using PDF_Office.Model.EditTools.Background;
 using PDF_Office.Model.EditTools.Watermark;
 using PDF_Office.Properties;
@@ -256,7 +258,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 homePageWatermarkDialogViewModel.WatermarkInfo = WatermarkInfo;
                 for (int i = 0; homePageWatermarkDialogViewModel.PDFDataTable.Rows.Count > i; i++)
                 {
-                    homePageWatermarkDialogViewModel.PDFCurrentDataTable.Rows[i]["FilePageRangeText"] = WatermarkInfo.PageRange;
+                    homePageWatermarkDialogViewModel.PDFCurrentDataTable.Rows[i]["FilePageRangeText"] = HomePageEditHelper.UpDataPageRange(CPDFDocument.InitWithFilePath(HomePageBatchProcessingDialogModel.FilePaths[i]).PageCount, WatermarkInfo.PageRange);
                     homePageWatermarkDialogViewModel.PDFCurrentDataTable.Rows[i]["FilePageRangeSelectIndex"] = WatermarkInfo.PageRangeIndex.ToString();
                     homePageWatermarkDialogViewModel.updateListview("待确定");
                 }

+ 15 - 4
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePictureToPDFDialogViewModel.cs

@@ -300,12 +300,23 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
             }
             updateListview("待确定");
         }
+        public void removepdffile(int index)
+        {
+            fileNames.Remove(fileNames[index]);
 
+            if (fileNames.Count < 1)
+            {
+                SetPictureToPDFGridIsEnabled = "False";
+                AddFileVisibility = Visibility.Visible;
+            }
 
-            /// <summary>
-            /// 打开文件图片
-            /// </summary>
-            public void openfiledialog(){
+            updateListview("待确定");
+        }
+
+        /// <summary>
+        /// 打开文件图片
+        /// </summary>
+        public void openfiledialog(){
 
             foreach (int filenamesview in fileNamesView)
             {

+ 45 - 1
PDF Office/ViewModels/HomePanel/PDFTools/QuickToolsContentViewModel.cs

@@ -188,7 +188,7 @@ namespace PDF_Office.ViewModels.HomePanel.PDFTools
                         break;
                     case PDFFnType.HeaderFooter:
                         DialogParameters headerFooterpdf = new DialogParameters();
-                        headerFooterpdf.Add(ParameterNames.BatchProcessing_Name, "6");
+                        headerFooterpdf.Add(ParameterNames.BatchProcessing_Name, "5");
                         HomePageBatchProcessingDialogModel.FilePaths = dlg.FileNames.ToList();
                         HomePageBatchProcessingDialogModel.BatchProcessingIndex = 5;
                         headerFooterpdf.Add(ParameterNames.FilePath, dlg.FileNames);
@@ -218,6 +218,50 @@ namespace PDF_Office.ViewModels.HomePanel.PDFTools
                         watermarkpdf.Add(ParameterNames.FilePath, dlg.FileNames);
                         dialogs.ShowDialog(DialogNames.HomePageBatchProcessingDialog, watermarkpdf, e => { });
                         break;
+                    case PDFFnType.PDFToImage:
+                        DialogParameters convertpdftoimage = new DialogParameters();
+                        convertpdftoimage.Add(ParameterNames.BatchProcessing_Name, "0");
+                        convertpdftoimage.Add("ConverterTypeIndex", 7);
+                        HomePageBatchProcessingDialogModel.FilePaths = dlg.FileNames.ToList();
+                        HomePageBatchProcessingDialogModel.BatchProcessingIndex = 0;
+                        convertpdftoimage.Add(ParameterNames.FilePath, dlg.FileNames);
+                        dialogs.ShowDialog(DialogNames.HomePageBatchProcessingDialog, convertpdftoimage, e => { });
+                        break;
+                    case PDFFnType.PDFToExcel:
+                        DialogParameters convertpdftoexcel = new DialogParameters();
+                        convertpdftoexcel.Add(ParameterNames.BatchProcessing_Name, "0");
+                        convertpdftoexcel.Add("ConverterTypeIndex", 1);
+                        HomePageBatchProcessingDialogModel.FilePaths = dlg.FileNames.ToList();
+                        HomePageBatchProcessingDialogModel.BatchProcessingIndex = 0;
+                        convertpdftoexcel.Add(ParameterNames.FilePath, dlg.FileNames);
+                        dialogs.ShowDialog(DialogNames.HomePageBatchProcessingDialog, convertpdftoexcel, e => { });
+                        break;
+                    case PDFFnType.PDFToPPT:
+                        DialogParameters convertpdftoppt = new DialogParameters();
+                        convertpdftoppt.Add(ParameterNames.BatchProcessing_Name, "0");
+                        convertpdftoppt.Add("ConverterTypeIndex", 2);
+                        HomePageBatchProcessingDialogModel.FilePaths = dlg.FileNames.ToList();
+                        HomePageBatchProcessingDialogModel.BatchProcessingIndex = 0;
+                        convertpdftoppt.Add(ParameterNames.FilePath, dlg.FileNames);
+                        dialogs.ShowDialog(DialogNames.HomePageBatchProcessingDialog, convertpdftoppt, e => { });
+                        break;
+                    case PDFFnType.PDFToWord:
+                        DialogParameters convertpdftoword = new DialogParameters();
+                        convertpdftoword.Add(ParameterNames.BatchProcessing_Name, "0");
+                        convertpdftoword.Add("ConverterTypeIndex", 0);
+                        HomePageBatchProcessingDialogModel.FilePaths = dlg.FileNames.ToList();
+                        HomePageBatchProcessingDialogModel.BatchProcessingIndex = 0;
+                        convertpdftoword.Add(ParameterNames.FilePath, dlg.FileNames);
+                        dialogs.ShowDialog(DialogNames.HomePageBatchProcessingDialog, convertpdftoword, e => { });
+                        break;
+                    case PDFFnType.Batch:
+                        DialogParameters batcpdf = new DialogParameters();
+                        batcpdf.Add(ParameterNames.BatchProcessing_Name, "0");
+                        HomePageBatchProcessingDialogModel.FilePaths = dlg.FileNames.ToList();
+                        HomePageBatchProcessingDialogModel.BatchProcessingIndex = 0;
+                        batcpdf.Add(ParameterNames.FilePath, dlg.FileNames);
+                        dialogs.ShowDialog(DialogNames.HomePageBatchProcessingDialog, batcpdf, e => { });
+                        break;
                 }
 
             }

+ 29 - 21
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundCreateBaseContent.xaml

@@ -10,8 +10,7 @@
              d:DesignWidth="260" >
     <Grid>
         <Grid.RowDefinitions>
-            <RowDefinition Height="40"></RowDefinition>
-            <RowDefinition Height="48"></RowDefinition>
+            <RowDefinition Height="50"></RowDefinition>
             <RowDefinition></RowDefinition>
         </Grid.RowDefinitions>
         <Grid Grid.Row="0" Visibility="{Binding CreateBaseVisible, Mode=TwoWay}">
@@ -28,6 +27,7 @@
                 </StackPanel>
             </Button>
         </Grid>
+        
         <Grid Grid.Row="0" Visibility="{Binding EditBaseVisible, Mode=TwoWay}">
             <Button  Height="24" Width="90" HorizontalAlignment="Left" Margin="16,0,0,0"  Command="{Binding EnterTemplateListCommand}">
                 <StackPanel Orientation="Horizontal">
@@ -42,24 +42,32 @@
                 </StackPanel>
             </Button>
         </Grid>
-        <Grid Grid.Row="1" Margin="16,0,16,0">
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition></ColumnDefinition>
-                <ColumnDefinition></ColumnDefinition>
-            </Grid.ColumnDefinitions>
-            <Button Name="HomePageBackgroundCreateColorContent" Grid.Column="0" Command="{Binding ChangeCreateModCommand}" CommandParameter="{Binding ElementName=HomePageBackgroundCreateColorContent}">
-                <StackPanel Orientation="Vertical"  >
-                    <TextBlock Text="颜色" FontSize="18"></TextBlock>
-                </StackPanel>
-            </Button>
-            <Button Name="HomePageBackgroundCreateFileContent" Grid.Column="1" Command="{Binding ChangeCreateModCommand}" CommandParameter="{Binding ElementName=HomePageBackgroundCreateFileContent}">
-                <StackPanel Orientation="Vertical"  >
-                    <TextBlock Text="文件" FontSize="18" VerticalAlignment="Center"></TextBlock>
-                </StackPanel>
-            </Button>
-        </Grid>
-        <Grid Grid.Row="2">
-            <ContentControl prism:RegionManager.RegionName="{Binding BackgroundCreateRegionName}" Visibility="{Binding BackgroundCreateVisible}"></ContentControl>
-        </Grid>
+        <ScrollViewer Grid.Row="1">
+            <Grid Grid.Row="1">
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="32"></RowDefinition>
+                    <RowDefinition></RowDefinition>
+                </Grid.RowDefinitions>
+                <Grid Grid.Row="0" Margin="16,0,16,0">
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition></ColumnDefinition>
+                        <ColumnDefinition></ColumnDefinition>
+                    </Grid.ColumnDefinitions>
+                    <Button Name="HomePageBackgroundCreateColorContent" Grid.Column="0" Command="{Binding ChangeCreateModCommand}" CommandParameter="{Binding ElementName=HomePageBackgroundCreateColorContent}">
+                        <StackPanel Orientation="Vertical"  >
+                            <TextBlock Text="颜色" FontSize="18"></TextBlock>
+                        </StackPanel>
+                    </Button>
+                    <Button Name="HomePageBackgroundCreateFileContent" Grid.Column="1" Command="{Binding ChangeCreateModCommand}" CommandParameter="{Binding ElementName=HomePageBackgroundCreateFileContent}">
+                        <StackPanel Orientation="Vertical"  >
+                            <TextBlock Text="文件" FontSize="18" VerticalAlignment="Center"></TextBlock>
+                        </StackPanel>
+                    </Button>
+                </Grid>
+                <Grid Grid.Row="2">
+                    <ContentControl prism:RegionManager.RegionName="{Binding BackgroundCreateRegionName}" Visibility="{Binding BackgroundCreateVisible}"></ContentControl>
+                </Grid>
+            </Grid>
+        </ScrollViewer>
     </Grid>
 </UserControl>

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

@@ -19,7 +19,7 @@
     <Grid IsEnabled="{Binding BackgroundGridIsEnabled}">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="558*"/>
-            <ColumnDefinition Width="260*"/>
+            <ColumnDefinition Width="260*" MaxWidth="260"/>
         </Grid.ColumnDefinitions>
         <Grid Grid.Column="0">
             <Grid.RowDefinitions>
@@ -44,27 +44,23 @@
                     </ListView.ContextMenu>
                     <ListView.View>
                         <GridView>
-                            <GridViewColumn  Header="文档名"  Width="400" DisplayMemberBinding="{Binding FileName}"/>
-                            <GridViewColumn Header="页面范围" Width="170" >
+                            <GridViewColumn  Header="文档名"  Width="234" DisplayMemberBinding="{Binding FileName}"/>
+                            <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>
                                     </DataTemplate>
                                 </GridViewColumn.CellTemplate>
                             </GridViewColumn>
-                            <GridViewColumn Header="大小" Width="100" DisplayMemberBinding="{Binding FileSize}"/>
+                            <GridViewColumn Header="大小" Width="68" DisplayMemberBinding="{Binding FileSize}"/>
                             <GridViewColumn Header="状态" Width="80" >
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
-                                        <TextBlock Text="{Binding FileState}" TextDecorations="Underline" Foreground="Black"/>
-                                    </DataTemplate>
-                                </GridViewColumn.CellTemplate>
-                            </GridViewColumn>
-                            <GridViewColumn Header=""  Width="100">
-                                <GridViewColumn.CellTemplate>
-                                    <DataTemplate >
-                                        <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" Click="DeleteTemplateBtn_Click">
-                                        </Button>
+                                        <StackPanel Orientation="Horizontal">
+                                            <TextBlock Text="{Binding FileState}" Width="14" Height="14" TextDecorations="Underline" Foreground="Black"/>
+                                            <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" VerticalAlignment="Center" Margin="38,0,0,0" Click="DeleteTemplateBtn_Click">
+                                            </Button>
+                                        </StackPanel>
                                         <DataTemplate.Triggers>
                                             <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="True">
                                                 <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Visible"/>
@@ -139,14 +135,15 @@
         </Grid>
         <Grid Grid.Column="1" Background="WhiteSmoke" IsEnabled="{Binding SetBackgroundGridIsEnabled}">
             <Grid.RowDefinitions>
-                <RowDefinition Height="*"/>
-                <RowDefinition Height="72"/>
+
+                <RowDefinition Height="536"/>
+                <RowDefinition Height="64"/>
             </Grid.RowDefinitions>
             <Grid Grid.Row="0" Grid.RowSpan="{Binding CreateGridSpan}" Background="#F3F3F3" >
                 <ContentControl prism:RegionManager.RegionName="{Binding BackgroundSettingsRegionName}" Visibility="{Binding BackgroundSettingsVisible}"></ContentControl>
             </Grid>
             <Grid Grid.Row="1" Visibility="{Binding CreateGridSpanVisibility}">
-                <Button Height="40" Width="228" Background="Black" Command="{Binding CreateCommand}">
+                <Button Height="32" Width="228" Background="Black" Command="{Binding CreateCommand}">
                     <TextBlock Text="Apply" FontSize="18" Foreground="White"/>
                 </Button>
             </Grid>

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

@@ -27,6 +27,7 @@
 
     <Grid Background="#F3F3F3">
         <ListBox           Width="240" 
+                           
                                 BorderThickness="0"
                                 ScrollViewer.CanContentScroll="True"
                                 ScrollViewer.HorizontalScrollBarVisibility="Disabled"

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

@@ -28,6 +28,7 @@
     <Grid Background="#F3F3F3">
         <ListBox
                                 Width="240" 
+            
                                 BorderThickness="0"
                                 ScrollViewer.CanContentScroll="True"
                                 ScrollViewer.HorizontalScrollBarVisibility="Disabled"

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

@@ -9,7 +9,7 @@
              xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
              xmlns:CompositeControl="clr-namespace:PDF_Office.CustomControl.CompositeControl"
              mc:Ignorable="d"
-             d:DesignHeight="720"
+             d:DesignHeight="751"
              d:DesignWidth="260" >
     <UserControl.Resources>
         <ResourceDictionary >
@@ -20,7 +20,7 @@
     </UserControl.Resources>
     <Grid>
         <Grid.RowDefinitions>
-            <RowDefinition Height="40"></RowDefinition>
+            <RowDefinition Height="50"></RowDefinition>
             <RowDefinition></RowDefinition>
         </Grid.RowDefinitions>
         <Grid Grid.Row="0" Visibility="{Binding CreateBaseVisible, Mode=TwoWay}">
@@ -51,132 +51,138 @@
                 </StackPanel>
             </Button>
         </Grid>
-        <Grid Grid.Row="1">
-            <Grid.RowDefinitions>
-                <RowDefinition Height="116"></RowDefinition>
-                <RowDefinition Height="116"></RowDefinition>
-                <RowDefinition Height="189"></RowDefinition>
-                <RowDefinition Height="172"></RowDefinition>
-                <RowDefinition></RowDefinition>
-            </Grid.RowDefinitions>
-            <Grid Grid.Row="0" Margin="0,16,0,0" Width="228">
-                <StackPanel>
-                    <TextBlock Text="外观" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
-                    <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
-                        <ComboBox Width="154" Height="32"  ItemsSource="{Binding FontNameList}" SelectedIndex="{Binding FontNameSelectedIndex}"></ComboBox>
-                        <ComboBox Width="66" Height="32" Margin="8,0,0,0" ItemsSource="{Binding FontSizeList}" SelectedIndex="{Binding FontSizeSelectedIndex}"></ComboBox>
+        <ScrollViewer  Grid.Row="1" >
+            <Grid Grid.Row="1">
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="104"></RowDefinition>
+                    <RowDefinition Height="120"></RowDefinition>
+                    <RowDefinition Height="200"></RowDefinition>
+                    <RowDefinition Height="173"></RowDefinition>
+                    <RowDefinition ></RowDefinition>
+                </Grid.RowDefinitions>
+                <Grid Grid.Row="0"  Width="228">
+                    <StackPanel>
+                        <TextBlock Text="外观" FontFamily="Segoe UI" FontStyle="Normal" FontSize="12" Height="20" Width="228" HorizontalAlignment="Left" Foreground="#616469"></TextBlock>
+                        <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
+                            <ComboBox Width="228" Height="32"  ItemsSource="{Binding FontNameList}" SelectedIndex="{Binding FontNameSelectedIndex}"></ComboBox>
+
+                        </StackPanel>
+                        <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
+                            <ComboBox Width="164" Height="32" HorizontalAlignment="Left" ItemsSource="{Binding FontSizeList}" SelectedIndex="{Binding FontSizeSelectedIndex}"></ComboBox>
+                            <CompositeControl:ColorContent x:Name="cusColor" Height="32" Width="56"  Margin="8,0,0,0"  HorizontalAlignment="Left">
+                            </CompositeControl:ColorContent>
+                        </StackPanel>
                     </StackPanel>
-                    <CompositeControl:ColorContent x:Name="cusColor" Height="32" Width="66"  Margin="0,8,0,0"  HorizontalAlignment="Left">
-                    </CompositeControl:ColorContent>
-                </StackPanel>
-            </Grid>
-            <Grid Grid.Row="1" Margin="0,16,0,0" Width="228">
-                <StackPanel>
-                    <TextBlock Text="页边距" FontSize="12" Foreground="#666666" Height="20" Width="36" HorizontalAlignment="Left"></TextBlock>
-                    <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
-                        <StackPanel Orientation="Vertical" Margin="0,0,0,0">
-                            <StackPanel Orientation="Horizontal">
-                                <TextBlock Text="上"  Width="14" Height="20" VerticalAlignment="Center"/>
-                                <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0" Text="{Binding MarginTopValue,Mode=TwoWay}"></cus:NumericUpDown>
+                </Grid>
+                <Grid Grid.Row="1" Margin="0,18,0,0" Width="228">
+                    <StackPanel>
+                        <TextBlock Text="页边距" FontFamily="Segoe UI" FontStyle="Normal" FontSize="12" Height="20" Width="228" HorizontalAlignment="Left" Foreground="#616469"></TextBlock>
+                        <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
+                            <StackPanel Orientation="Vertical" Margin="0,0,0,0">
+                                <StackPanel Orientation="Horizontal">
+                                    <TextBlock Text="上"  Width="14" Height="20" VerticalAlignment="Center"/>
+                                    <cus:NumericUpDown Width="90" Height="32" Margin="4,0,0,0" Text="{Binding MarginTopValue,Mode=TwoWay}"></cus:NumericUpDown>
+                                </StackPanel>
+                                <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
+                                    <TextBlock Text="左" Width="14" Height="20" VerticalAlignment="Center"/>
+                                    <cus:NumericUpDown Width="90" Height="32" Margin="4,0,0,0"  Text="{Binding MarginLeftValue,Mode=TwoWay}"></cus:NumericUpDown>
+                                </StackPanel>
                             </StackPanel>
-                            <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
-                                <TextBlock Text="左" Width="14" Height="20" VerticalAlignment="Center"/>
-                                <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0"  Text="{Binding MarginLeftValue,Mode=TwoWay}"></cus:NumericUpDown>
+                            <StackPanel Orientation="Vertical" Margin="8,0,0,0">
+                                <StackPanel Orientation="Horizontal">
+                                    <TextBlock Text="下"  Width="14" Height="20" VerticalAlignment="Center"/>
+                                    <cus:NumericUpDown Width="90" Height="32" Margin="4,0,0,0"  Text="{Binding MarginDownValue,Mode=TwoWay}"></cus:NumericUpDown>
+                                </StackPanel>
+                                <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
+                                    <TextBlock Text="右" Width="14" Height="20" VerticalAlignment="Center"/>
+                                    <cus:NumericUpDown Width="90" Height="32" Margin="4,0,0,0"  Text="{Binding MarginRightValue,Mode=TwoWay}"></cus:NumericUpDown>
+                                </StackPanel>
                             </StackPanel>
                         </StackPanel>
-                        <StackPanel Orientation="Vertical" Margin="51,0,0,0">
+                    </StackPanel>
+                </Grid>
+                <Grid Grid.Row="2" Margin="0,18,0,0" Width="228">
+                    <StackPanel>
+                        <TextBlock Text="Page Number &amp; Date Format" Height="20" Width="228" FontFamily="Segoe UI" FontStyle="Normal" FontSize="12" Foreground="#616469"></TextBlock>
+                        <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
+                            <TextBlock Text="前缀" FontSize="12" Foreground="#666666" Height="22" Width="38" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
+                            <TextBox Name="PrefixTextValueTextBox" Height="32" Width="180" Margin="10,0,0,0">
+                                <i:Interaction.Triggers>
+                                    <i:EventTrigger EventName="TextChanged">
+                                        <i:InvokeCommandAction Command="{Binding TextValueChangedCommand}" CommandParameter="{Binding ElementName=PrefixTextValueTextBox}" />
+                                    </i:EventTrigger>
+                                </i:Interaction.Triggers>
+                            </TextBox>
+                        </StackPanel>
+                        <StackPanel Margin="0,8,0,0" Orientation="Horizontal">
+                            <TextBlock Text="后缀" FontSize="12" Foreground="#666666" Height="22" Width="38" VerticalAlignment="Center" HorizontalAlignment="Left"></TextBlock>
+                            <TextBox Name="SuffixTextValueTextBox" Width="180" Height="32" Margin="10,0,0,0">
+                                <i:Interaction.Triggers>
+                                    <i:EventTrigger EventName="TextChanged">
+                                        <i:InvokeCommandAction Command="{Binding TextValueChangedCommand}" CommandParameter="{Binding ElementName=SuffixTextValueTextBox}" />
+                                    </i:EventTrigger>
+                                </i:Interaction.Triggers>
+                            </TextBox>
+                        </StackPanel>
+                        <StackPanel Orientation="Vertical" Margin="0,8,0,0">
                             <StackPanel Orientation="Horizontal">
-                                <TextBlock Text="下"  Width="14" Height="20" VerticalAlignment="Center"/>
-                                <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0"  Text="{Binding MarginDownValue,Mode=TwoWay}"></cus:NumericUpDown>
+                                <TextBlock Text="位数" FontSize="12" Foreground="#666666" Height="22" Width="116" HorizontalAlignment="Left"></TextBlock>
+                                <cus:NumericUpDown Height="32" Width="102" Margin="10,0,0,0" Text="{Binding DigitNumberValue,Mode=TwoWay}"></cus:NumericUpDown>
                             </StackPanel>
-                            <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
-                                <TextBlock Text="右" Width="14" Height="20" VerticalAlignment="Center"/>
-                                <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0"  Text="{Binding MarginRightValue,Mode=TwoWay}"></cus:NumericUpDown>
+                            <StackPanel Margin="0,8,0,0" Orientation="Horizontal">
+                                <TextBlock Text="起始页" FontSize="12" Foreground="#666666" Height="22" Width="66" HorizontalAlignment="Left"></TextBlock>
+                                <ComboBox Height="32" Width="152" Margin="10,0,0,0" ItemsSource="{Binding StarPagetNumberList}" SelectedIndex="{Binding StarPagetNumberIndex}"></ComboBox>
                             </StackPanel>
                         </StackPanel>
                     </StackPanel>
-                </StackPanel>
-            </Grid>
-            <Grid Grid.Row="2" Margin="0,16,0,0" Width="228">
-                <StackPanel>
+                </Grid>
+                <Grid Grid.Row="3" Margin="0,18,0,0" Width="228">
                     <StackPanel>
-                        <TextBlock Text="前缀" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
-                        <TextBox Name="PrefixTextValueTextBox" Height="32">
-                            <i:Interaction.Triggers>
-                                <i:EventTrigger EventName="TextChanged">
-                                    <i:InvokeCommandAction Command="{Binding TextValueChangedCommand}" CommandParameter="{Binding ElementName=PrefixTextValueTextBox}" />
-                                </i:EventTrigger>
-                            </i:Interaction.Triggers>
-                        </TextBox>
-                    </StackPanel>
-                    <StackPanel Margin="0,8,0,0">
-                        <TextBlock Text="后缀" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
-                        <TextBox Name="SuffixTextValueTextBox" Height="32">
+                        <StackPanel Orientation="Horizontal">
+                            <TextBlock Text="布局&amp;内容"  FontFamily="Segoe UI" FontStyle="Normal" FontSize="12" Height="20" Width="198" Foreground="#616469"></TextBlock>
+                            <Button Width="22" Height="22" Margin="8,0,0,0" Click="Button_Click" >
+                                <TextBlock Text="+" FontSize="19" HorizontalAlignment="Center" VerticalAlignment="Center"  Block.TextAlignment="Center" ></TextBlock>
+                                <Button.ContextMenu>
+                                    <ContextMenu Name="contextMenu">
+                                        <MenuItem Name="ADDPages" Header="插入Bates" Click="ADDBates_Click" >
+                                        </MenuItem>
+                                    </ContextMenu>
+                                </Button.ContextMenu>
+                            </Button>
+                        </StackPanel>
+                        <Grid Width="228" Height="46" Margin="0,6,0,0">
+                            <Grid.ColumnDefinitions>
+                                <ColumnDefinition Width="76"></ColumnDefinition>
+                                <ColumnDefinition Width="76"></ColumnDefinition>
+                                <ColumnDefinition Width="76"></ColumnDefinition>
+                            </Grid.ColumnDefinitions>
+                            <Grid.RowDefinitions>
+                                <RowDefinition Height="23"></RowDefinition>
+                                <RowDefinition Height="23"></RowDefinition>
+                            </Grid.RowDefinitions>
+                            <RadioButton Grid.Column="0" Grid.Row="0" Tag="0" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" ></RadioButton>
+                            <RadioButton Grid.Column="1" Grid.Row="0" Tag="1" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" ></RadioButton>
+                            <RadioButton Grid.Column="2" Grid.Row="0" Tag="2" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" ></RadioButton>
+                            <RadioButton Grid.Column="0" Grid.Row="1" Tag="3" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"></RadioButton>
+                            <RadioButton Grid.Column="1" Grid.Row="1" Tag="4" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"  ></RadioButton>
+                            <RadioButton Grid.Column="2" Grid.Row="1" Tag="5" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"></RadioButton>
+                        </Grid>
+                        <TextBox Name="TextValueTextBox" Height="72" Margin="0,8,0,0" Text="{Binding TextValue}"  Foreground="{Binding SolidColorBrush}" FontSize="14"  AcceptsReturn="True" FontFamily="Segoe UI">
                             <i:Interaction.Triggers>
                                 <i:EventTrigger EventName="TextChanged">
-                                    <i:InvokeCommandAction Command="{Binding TextValueChangedCommand}" CommandParameter="{Binding ElementName=SuffixTextValueTextBox}" />
+                                    <i:InvokeCommandAction Command="{Binding TextValueChangedCommand}" CommandParameter="{Binding ElementName=TextValueTextBox}" />
                                 </i:EventTrigger>
                             </i:Interaction.Triggers>
                         </TextBox>
                     </StackPanel>
-                    <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
-                        <StackPanel>
-                            <TextBlock Text="位数" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
-                            <cus:NumericUpDown Height="32" Width="110" Text="{Binding DigitNumberValue,Mode=TwoWay}"></cus:NumericUpDown>
-                        </StackPanel>
-                        <StackPanel Margin="8,0,0,0">
-                            <TextBlock Text="起始页" FontSize="12" Foreground="#666666" Height="20" Width="36" HorizontalAlignment="Left"></TextBlock>
-                            <ComboBox Height="32" Width="110" ItemsSource="{Binding StarPagetNumberList}" SelectedIndex="{Binding StarPagetNumberIndex}"></ComboBox>
-                        </StackPanel>
-                    </StackPanel>
-                </StackPanel>
-            </Grid>
-            <Grid Grid.Row="3" Margin="0,16,0,0" Width="228">
-                <StackPanel>
-                    <StackPanel Orientation="Horizontal">
-                        <TextBlock Text="布局&amp;内容" FontSize="12" Foreground="#666666" Height="20" Width="60"></TextBlock>
-                        <Button Width="22" Height="22" Margin="146,0,0,0" Click="Button_Click" >
-                            <TextBlock Text="+" FontSize="19" HorizontalAlignment="Center" VerticalAlignment="Center"  Block.TextAlignment="Center" ></TextBlock>
-                            <Button.ContextMenu>
-                                <ContextMenu Name="contextMenu">
-                                    <MenuItem Name="ADDPages" Header="插入Bates" Click="ADDBates_Click" >
-                                    </MenuItem>
-                                </ContextMenu>
-                            </Button.ContextMenu>
-                        </Button>
+                </Grid>
+                <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>
                     </StackPanel>
-                    <Grid Width="228" Height="46" Margin="0,6,0,0">
-                        <Grid.ColumnDefinitions>
-                            <ColumnDefinition Width="76"></ColumnDefinition>
-                            <ColumnDefinition Width="76"></ColumnDefinition>
-                            <ColumnDefinition Width="76"></ColumnDefinition>
-                        </Grid.ColumnDefinitions>
-                        <Grid.RowDefinitions>
-                            <RowDefinition Height="23"></RowDefinition>
-                            <RowDefinition Height="23"></RowDefinition>
-                        </Grid.RowDefinitions>
-                        <RadioButton Grid.Column="0" Grid.Row="0" Tag="0" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" ></RadioButton>
-                        <RadioButton Grid.Column="1" Grid.Row="0" Tag="1" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" ></RadioButton>
-                        <RadioButton Grid.Column="2" Grid.Row="0" Tag="2" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" ></RadioButton>
-                        <RadioButton Grid.Column="0" Grid.Row="1" Tag="3" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"></RadioButton>
-                        <RadioButton Grid.Column="1" Grid.Row="1" Tag="4" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"  ></RadioButton>
-                        <RadioButton Grid.Column="2" Grid.Row="1" Tag="5" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"></RadioButton>
-                    </Grid>
-                    <TextBox Name="TextValueTextBox" Height="72" Margin="0,8,0,0" Text="{Binding TextValue}"  Foreground="{Binding SolidColorBrush}" FontSize="14"  AcceptsReturn="True">
-                        <i:Interaction.Triggers>
-                            <i:EventTrigger EventName="TextChanged">
-                                <i:InvokeCommandAction Command="{Binding TextValueChangedCommand}" CommandParameter="{Binding ElementName=TextValueTextBox}" />
-                            </i:EventTrigger>
-                        </i:Interaction.Triggers>
-                    </TextBox>
-                </StackPanel>
+                </Grid>
             </Grid>
-            <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>
-                </StackPanel>
-            </Grid>
-        </Grid>
+        </ScrollViewer>
     </Grid>
 </UserControl>

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

@@ -19,12 +19,12 @@
     <Grid IsEnabled="{Binding BatesGridIsEnabled}">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="558*"/>
-            <ColumnDefinition Width="260*"/>
+            <ColumnDefinition Width="260*" MaxWidth="260"/>
         </Grid.ColumnDefinitions>
-        <Grid Grid.Column="0">
+        <Grid Grid.Column="0" >
             <Grid.RowDefinitions>
                 <RowDefinition Height="556*"/>
-                <RowDefinition Height="64*"/>
+                <RowDefinition Height="64*" />
             </Grid.RowDefinitions>
             <Grid  Grid.Row="0" AllowDrop="True"
                   Drop="Grid_Drop"
@@ -44,31 +44,27 @@
                     </ListView.ContextMenu>
                     <ListView.View>
                         <GridView>
-                            <GridViewColumn  Header="文档名"  Width="230" DisplayMemberBinding="{Binding FileName}"/>
-                            <GridViewColumn Header="页面范围" Width="170" >
+                            <GridViewColumn  Header="文档名"  Width="234" DisplayMemberBinding="{Binding FileName}"/>
+                            <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>
                                     </DataTemplate>
                                 </GridViewColumn.CellTemplate>
                             </GridViewColumn>
-                            <GridViewColumn Header="大小" Width="100" DisplayMemberBinding="{Binding FileSize}"/>
+                            <GridViewColumn Header="大小" Width="68" DisplayMemberBinding="{Binding FileSize}"/>
                             <GridViewColumn Header="状态" Width="80" >
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
-                                        <TextBlock Text="{Binding FileState}" TextDecorations="Underline" Foreground="Black"/>
-                                    </DataTemplate>
-                                </GridViewColumn.CellTemplate>
-                            </GridViewColumn>
-                            <GridViewColumn Header=""  Width="100">
-                                <GridViewColumn.CellTemplate>
-                                    <DataTemplate >
-                                        <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" Click="DeleteTemplateBtn_Click">
-                                        </Button>
+                                        <StackPanel Orientation="Horizontal">
+                                            <TextBlock Text="{Binding FileState}" Width="14" Height="14" TextDecorations="Underline" Foreground="Black"/>
+                                            <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" VerticalAlignment="Center" Margin="38,0,0,0" Click="DeleteTemplateBtn_Click">
+                                            </Button>
+                                        </StackPanel>
                                         <DataTemplate.Triggers>
                                             <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="True">
-                                                    <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Visible"/>
-                                                </DataTrigger>
+                                                <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Visible"/>
+                                            </DataTrigger>
                                             <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="False">
                                                 <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Hidden"/>
                                             </DataTrigger>
@@ -139,14 +135,17 @@
         </Grid>
         <Grid Grid.Column="1" Background="WhiteSmoke" IsEnabled="{Binding SetBatesGridIsEnabled}">
             <Grid.RowDefinitions>
-                <RowDefinition Height="*"/>
-                <RowDefinition Height="72"/>
+                <RowDefinition Height="536"/>
+                <RowDefinition Height="64"/>
             </Grid.RowDefinitions>
+
             <Grid Grid.Row="0" Grid.RowSpan="{Binding CreateGridSpan}" Background="#F3F3F3">
+
                 <ContentControl prism:RegionManager.RegionName="{Binding BatesSettingsRegionName}" Visibility="{Binding BatesSettingsVisible}" ></ContentControl>
+
             </Grid>
             <Grid Grid.Row="1" Visibility="{Binding CreateGridSpanVisibility}">
-                <Button Height="40" Width="228" Background="Black" Command="{Binding CreateCommand}">
+                <Button Height="32" Width="228" Background="#1770F4" Command="{Binding CreateCommand}">
                     <TextBlock Text="Apply" FontSize="18" Foreground="White"/>
                 </Button>
             </Grid>

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

@@ -26,7 +26,7 @@
     </UserControl.Resources>
     <Grid>
         <Grid.RowDefinitions>
-            <RowDefinition Height="40"></RowDefinition>
+            <RowDefinition Height="50"></RowDefinition>
             <RowDefinition></RowDefinition>
         </Grid.RowDefinitions>
         <Grid Grid.Row="0">
@@ -39,6 +39,7 @@
         <Grid Background="#F3F3F3" Grid.Row="1">
             <ListBox
                                 Width="260" 
+                
                                 BorderThickness="0"
                                 ScrollViewer.CanContentScroll="True"
                                 ScrollViewer.HorizontalScrollBarVisibility="Disabled"

+ 12 - 15
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageCompressDialog.xaml

@@ -18,7 +18,7 @@
     <Grid IsEnabled="{Binding CompressGridIsEnabled}">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="558*"/>
-            <ColumnDefinition Width="260*"/>
+            <ColumnDefinition Width="260*" MaxWidth="260"/>
         </Grid.ColumnDefinitions>
         <Grid Grid.Column="0">
             <Grid.RowDefinitions>
@@ -43,20 +43,16 @@
                     </ListView.ContextMenu>
                     <ListView.View>
                         <GridView>
-                            <GridViewColumn  Header="文档名"  Width="400" DisplayMemberBinding="{Binding FileName}"/>
-                            <GridViewColumn Header="大小" Width="100" DisplayMemberBinding="{Binding FileSize}"/>
+                            <GridViewColumn  Header="文档名"  Width="390" DisplayMemberBinding="{Binding FileName}"/>
+                            <GridViewColumn Header="大小" Width="68" DisplayMemberBinding="{Binding FileSize}"/>
                             <GridViewColumn Header="状态" Width="80" >
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
-                                        <TextBlock Text="{Binding FileState}" TextDecorations="Underline" Foreground="Black"/>
-                                    </DataTemplate>
-                                </GridViewColumn.CellTemplate>
-                            </GridViewColumn>
-                            <GridViewColumn Header=""  Width="100">
-                                <GridViewColumn.CellTemplate>
-                                    <DataTemplate >
-                                        <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" Click="DeleteTemplateBtn_Click">
-                                        </Button>
+                                        <StackPanel Orientation="Horizontal">
+                                            <TextBlock Text="{Binding FileState}" Width="14" Height="14" TextDecorations="Underline" Foreground="Black"/>
+                                            <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" VerticalAlignment="Center" Margin="38,0,0,0" Click="DeleteTemplateBtn_Click">
+                                            </Button>
+                                        </StackPanel>
                                         <DataTemplate.Triggers>
                                             <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="True">
                                                 <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Visible"/>
@@ -68,6 +64,7 @@
                                     </DataTemplate>
                                 </GridViewColumn.CellTemplate>
                             </GridViewColumn>
+                            
                         </GridView>
                     </ListView.View>
                     <ListView.ItemContainerStyle>
@@ -131,8 +128,8 @@
         </Grid>
         <Grid Grid.Column="1" Background="WhiteSmoke" IsEnabled="{Binding SetCompressGridIsEnabled}">
             <Grid.RowDefinitions>
-                <RowDefinition Height="*"/>
-                <RowDefinition Height="72"/>
+                <RowDefinition Height="536*"/>
+                <RowDefinition Height="64*" MaxHeight="64"/>
             </Grid.RowDefinitions>
             <StackPanel Orientation="Vertical" Margin="16,14,0,0" Grid.Row="0">
                 <TextBlock Text="优化选项" FontSize="14" Width="228" Height=" 22" FontFamily="Segoe UI" TextBlock.Foreground="#252629"  HorizontalAlignment="Left"/>
@@ -151,7 +148,7 @@
                 </RadioButton>
             </StackPanel>
             <Grid Grid.Row="2">
-                <Button Height="40" Width="228" Background="Black" Command="{Binding CompressCommand}">
+                <Button Height="32" Width="228" Background="Black" Command="{Binding CompressCommand}">
                     <TextBlock Text="压缩" FontSize="18" Foreground="White"/>
                 </Button>
             </Grid>

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

@@ -19,7 +19,7 @@
     <Grid IsEnabled="{Binding ConverterGridIsEnabled}">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="558*"/>
-            <ColumnDefinition Width="260*"/>
+            <ColumnDefinition Width="260*" MaxWidth="260"/>
         </Grid.ColumnDefinitions>
         <Grid Grid.Column="0">
             <Grid.RowDefinitions>
@@ -44,27 +44,23 @@
                     </ListView.ContextMenu>
                     <ListView.View>
                         <GridView>
-                            <GridViewColumn  Header="文档名"  Width="400" DisplayMemberBinding="{Binding FileName}"/>
-                            <GridViewColumn Header="页面范围" Width="170" >
+                            <GridViewColumn  Header="文档名"  Width="234" DisplayMemberBinding="{Binding FileName}"/>
+                            <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>
                                     </DataTemplate>
                                 </GridViewColumn.CellTemplate>
                             </GridViewColumn>
-                            <GridViewColumn Header="大小" Width="100" DisplayMemberBinding="{Binding FileSize}"/>
+                            <GridViewColumn Header="大小" Width="68" DisplayMemberBinding="{Binding FileSize}"/>
                             <GridViewColumn Header="状态" Width="80" >
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
-                                        <TextBlock Text="{Binding FileState}" TextDecorations="Underline" Foreground="Black"/>
-                                    </DataTemplate>
-                                </GridViewColumn.CellTemplate>
-                            </GridViewColumn>
-                            <GridViewColumn Header=""  Width="100">
-                                <GridViewColumn.CellTemplate>
-                                    <DataTemplate >
-                                        <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" Click="DeleteTemplateBtn_Click">
-                                        </Button>
+                                        <StackPanel Orientation="Horizontal">
+                                            <TextBlock Text="{Binding FileState}" Width="14" Height="14" TextDecorations="Underline" Foreground="Black"/>
+                                            <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" VerticalAlignment="Center" Margin="38,0,0,0" Click="DeleteTemplateBtn_Click">
+                                            </Button>
+                                        </StackPanel>
                                         <DataTemplate.Triggers>
                                             <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="True">
                                                 <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Visible"/>
@@ -139,13 +135,13 @@
         </Grid>
         <Grid Grid.Column="1" Background="WhiteSmoke" IsEnabled="{Binding SetConverterGridIsEnabled}">
             <Grid.RowDefinitions>
-                <RowDefinition Height="*"/>
-                <RowDefinition Height="72"/>
+                <RowDefinition Height="536*"/>
+                <RowDefinition Height="64*"  MaxHeight="64"/>
             </Grid.RowDefinitions>
             <StackPanel Orientation="Vertical" Margin="15,16,0,0" Grid.Row="0">
                 <StackPanel Orientation="Vertical">
                     <TextBlock Text="转档格式"/>
-                    <ComboBox Name="ConverterTypeComboBox"  Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left" ItemsSource="{Binding ConverterTypeFamily}" SelectedIndex="0"  SelectionChanged="ConverterTypeComboBox_SelectionChanged">
+                    <ComboBox Name="ConverterTypeComboBox"  Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left" ItemsSource="{Binding ConverterTypeFamily}" SelectedIndex="{Binding ConverterTypeIndex}"  SelectionChanged="ConverterTypeComboBox_SelectionChanged">
                     </ComboBox>
                 </StackPanel>
                 <ContentControl Margin="0,18,0,0" x:Name="PrintMod" prism:RegionManager.RegionName="{Binding ConverterRegionName}"   Visibility="{Binding ConverterVisible}"/>
@@ -159,7 +155,7 @@
                 </StackPanel>
             </StackPanel>
             <Grid Grid.Row="2">
-                <Button Height="40" Width="228" Background="Black" Command="{Binding ConvertCommand}">
+                <Button Height="32" Width="228" Background="Black" Command="{Binding ConvertCommand}">
                     <TextBlock Text="转档" FontSize="18" Foreground="White"/>
                 </Button>
             </Grid>

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

@@ -9,7 +9,7 @@
              xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
              xmlns:CompositeControl="clr-namespace:PDF_Office.CustomControl.CompositeControl"
              mc:Ignorable="d"
-             d:DesignHeight="720"
+             d:DesignHeight="711"
              d:DesignWidth="260" >
     <UserControl.Resources>
         <ResourceDictionary >
@@ -20,7 +20,7 @@
     </UserControl.Resources>
     <Grid>
         <Grid.RowDefinitions>
-            <RowDefinition Height="40"></RowDefinition>
+            <RowDefinition Height="50"></RowDefinition>
             <RowDefinition></RowDefinition>
         </Grid.RowDefinitions>
         <Grid Grid.Row="0" Visibility="{Binding CreateBaseVisible, Mode=TwoWay}">
@@ -51,120 +51,126 @@
                 </StackPanel>
             </Button>
         </Grid>
-        <Grid Grid.Row="1">
-            <Grid.RowDefinitions>
-                <RowDefinition Height="116"></RowDefinition>
-                <RowDefinition Height="116"></RowDefinition>
-                <RowDefinition Height="128"></RowDefinition>
-                <RowDefinition Height="172"></RowDefinition>
-                <RowDefinition></RowDefinition>
-            </Grid.RowDefinitions>
-            <Grid Grid.Row="0" Margin="0,16,0,0" Width="228">
-                <StackPanel>
-                    <TextBlock Text="外观" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
-                    <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
-                        <ComboBox Width="154" Height="32" ItemsSource="{Binding FontNameList}" SelectedIndex="{Binding FontNameSelectedIndex}"></ComboBox>
-                        <ComboBox Width="66" Height="32" Margin="8,0,0,0" ItemsSource="{Binding FontSizeList}" SelectedIndex="{Binding FontSizeSelectedIndex}"></ComboBox>
-                    </StackPanel>
-                    <CompositeControl:ColorContent x:Name="cusColor" Height="32" Width="66"  Margin="0,8,0,0"  HorizontalAlignment="Left">
-                    </CompositeControl:ColorContent>
-                </StackPanel>
-            </Grid>
-            <Grid Grid.Row="1" Margin="0,16,0,0" Width="228">
-                <StackPanel>
-                    <TextBlock Text="页边距" FontSize="12" Foreground="#666666" Height="20" Width="36" HorizontalAlignment="Left"></TextBlock>
-                    <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
-                        <StackPanel Orientation="Vertical" Margin="0,0,0,0">
-                            <StackPanel Orientation="Horizontal">
-                                <TextBlock Text="上"  Width="14" Height="20" VerticalAlignment="Center"/>
-                                <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0" Text="{Binding MarginTopValue,Mode=TwoWay}"></cus:NumericUpDown>
-                            </StackPanel>
-                            <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
-                                <TextBlock Text="左" Width="14" Height="20" VerticalAlignment="Center"/>
-                                <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0"  Text="{Binding MarginLeftValue,Mode=TwoWay}"></cus:NumericUpDown>
-                            </StackPanel>
+        <ScrollViewer  Grid.Row="1" >
+            <Grid Grid.Row="1">
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="104"></RowDefinition>
+                    <RowDefinition Height="120"></RowDefinition>
+                    <RowDefinition Height="160"></RowDefinition>
+                    <RowDefinition Height="173"></RowDefinition>
+                    <RowDefinition></RowDefinition>
+                </Grid.RowDefinitions>
+                <Grid Grid.Row="0"  Width="228">
+                    <StackPanel>
+                        <TextBlock Text="外观"  FontFamily="Segoe UI" FontStyle="Normal" FontSize="12" Height="20" Width="228" HorizontalAlignment="Left" Foreground="#616469"></TextBlock>
+                        <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
+                            <ComboBox Width="228" Height="32" ItemsSource="{Binding FontNameList}" SelectedIndex="{Binding FontNameSelectedIndex}"></ComboBox>
+
+                        </StackPanel>
+                        <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
+                            <ComboBox Width="164" Height="32" Margin="0,0,0,0" ItemsSource="{Binding FontSizeList}" SelectedIndex="{Binding FontSizeSelectedIndex}"></ComboBox>
+                            <CompositeControl:ColorContent x:Name="cusColor" Height="32" Width="56"  Margin="8,0,0,0"  HorizontalAlignment="Left">
+                            </CompositeControl:ColorContent>
                         </StackPanel>
-                        <StackPanel Orientation="Vertical" Margin="51,0,0,0">
-                            <StackPanel Orientation="Horizontal">
-                                <TextBlock Text="下"  Width="14" Height="20" VerticalAlignment="Center"/>
-                                <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0"  Text="{Binding MarginDownValue,Mode=TwoWay}"></cus:NumericUpDown>
+
+                    </StackPanel>
+                </Grid>
+                <Grid Grid.Row="1" Margin="0,16,0,0" Width="228">
+                    <StackPanel>
+                        <TextBlock Text="页边距" FontFamily="Segoe UI" FontStyle="Normal" FontSize="12" Height="20" Width="228" HorizontalAlignment="Left" Foreground="#616469"></TextBlock>
+                        <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
+                            <StackPanel Orientation="Vertical" Margin="0,0,0,0">
+                                <StackPanel Orientation="Horizontal">
+                                    <TextBlock Text="上"  Width="14" Height="20" VerticalAlignment="Center"/>
+                                    <cus:NumericUpDown Width="90" Height="32" Margin="4,0,0,0" Text="{Binding MarginTopValue,Mode=TwoWay}"></cus:NumericUpDown>
+                                </StackPanel>
+                                <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
+                                    <TextBlock Text="左" Width="14" Height="20" VerticalAlignment="Center"/>
+                                    <cus:NumericUpDown Width="90" Height="32" Margin="4,0,0,0"  Text="{Binding MarginLeftValue,Mode=TwoWay}"></cus:NumericUpDown>
+                                </StackPanel>
                             </StackPanel>
-                            <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
-                                <TextBlock Text="右" Width="14" Height="20" VerticalAlignment="Center"/>
-                                <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0"  Text="{Binding MarginRightValue,Mode=TwoWay}"></cus:NumericUpDown>
+                            <StackPanel Orientation="Vertical" Margin="8,0,0,0">
+                                <StackPanel Orientation="Horizontal">
+                                    <TextBlock Text="下"  Width="14" Height="20" VerticalAlignment="Center"/>
+                                    <cus:NumericUpDown Width="90" Height="32" Margin="4,0,0,0"  Text="{Binding MarginDownValue,Mode=TwoWay}"></cus:NumericUpDown>
+                                </StackPanel>
+                                <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
+                                    <TextBlock Text="右" Width="14" Height="20" VerticalAlignment="Center"/>
+                                    <cus:NumericUpDown Width="90" Height="32" Margin="4,0,0,0"  Text="{Binding MarginRightValue,Mode=TwoWay}"></cus:NumericUpDown>
+                                </StackPanel>
                             </StackPanel>
                         </StackPanel>
                     </StackPanel>
-                </StackPanel>
-            </Grid>
-            <Grid Grid.Row="2" Margin="0,16,0,0" Width="228">
-                <StackPanel>
+                </Grid>
+                <Grid Grid.Row="2" Margin="0,16,0,0" Width="228">
                     <StackPanel>
-                        <TextBlock Text="日期" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
-                        <ComboBox  Height="32" ItemsSource="{Binding DateTimeFormatList}" SelectedIndex="{Binding DateTimeFormatIndex}"></ComboBox>
-                    </StackPanel>
-                    <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
-                        <StackPanel>
-                            <TextBlock Text="页面" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
-                            <ComboBox Height="32" Width="110" ItemsSource="{Binding PageNumberFormatList}" SelectedIndex="{Binding PageNumberFormatIndex}"></ComboBox>
+                        <TextBlock Text="Page Number &amp; Date Format" Height="20" Width="228" FontFamily="Segoe UI" FontStyle="Normal" FontSize="12" Foreground="#616469"></TextBlock>
+                        <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
+                            <TextBlock Text="日期" FontSize="14" Foreground="#252629" Height="22" Width="33" HorizontalAlignment="Left" FontFamily="Segoe UI"></TextBlock>
+                            <ComboBox  Height="32" Width="185" ItemsSource="{Binding DateTimeFormatList}" SelectedIndex="{Binding DateTimeFormatIndex}" Margin="10,0,0,0"></ComboBox>
+                        </StackPanel>
+                        <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
+                            <TextBlock Text="页面" FontSize="14" Foreground="#252629" Height="22" Width="34" HorizontalAlignment="Left" FontFamily="Segoe UI"></TextBlock>
+                            <ComboBox Height="32" Width="184" ItemsSource="{Binding PageNumberFormatList}" SelectedIndex="{Binding PageNumberFormatIndex}" Margin="10,0,0,0"></ComboBox>
                         </StackPanel>
-                        <StackPanel Margin="8,0,0,0">
-                            <TextBlock Text="起始页" FontSize="12" Foreground="#666666" Height="20" Width="36" HorizontalAlignment="Left"></TextBlock>
-                            <ComboBox Height="32" Width="110" ItemsSource="{Binding StarPagetNumberList}" SelectedIndex="{Binding StarPagetNumberIndex}"></ComboBox>
+                        <StackPanel Margin="0,8,0,0" Orientation="Horizontal">
+                            <TextBlock Text="起始页" FontSize="14" Foreground="#252629" Height="22" Width="66" HorizontalAlignment="Left" FontFamily="Segoe UI"></TextBlock>
+                            <ComboBox Height="32" Width="152" ItemsSource="{Binding StarPagetNumberList}" SelectedIndex="{Binding StarPagetNumberIndex}" Margin="10,0,0,0"></ComboBox>
                         </StackPanel>
+
                     </StackPanel>
-                </StackPanel>
-            </Grid>
-            <Grid Grid.Row="3" Margin="0,16,0,0" Width="228">
-                <StackPanel>
-                    <StackPanel Orientation="Horizontal">
-                        <TextBlock Text="布局&amp;内容" FontSize="12" Foreground="#666666" Height="20" Width="60"></TextBlock>
-                        <Button Width="22" Height="22" Margin="146,0,0,0"  Click="Button_Click">
-                            <TextBlock Text="+" FontSize="19" HorizontalAlignment="Center" VerticalAlignment="Center"  Block.TextAlignment="Center" ></TextBlock>
-                            <Button.ContextMenu>
-                                <ContextMenu Name="contextMenu">
-                                    <MenuItem Name="ADDPages" Header="插入页码"  Click="ADDPages_Click" >
+                </Grid>
+                <Grid Grid.Row="3" Margin="0,16,0,0" Width="228">
+                    <StackPanel>
+                        <StackPanel Orientation="Horizontal">
+                            <TextBlock Text="布局&amp;内容" FontFamily="Segoe UI" FontStyle="Normal" FontSize="12" Height="20" Width="198" HorizontalAlignment="Left" Foreground="#616469"></TextBlock>
+                            <Button Width="22" Height="22" Margin="8,0,0,0"  Click="Button_Click">
+                                <TextBlock Text="+" FontSize="19" HorizontalAlignment="Center" VerticalAlignment="Center"  Block.TextAlignment="Center" ></TextBlock>
+                                <Button.ContextMenu>
+                                    <ContextMenu Name="contextMenu">
+                                        <MenuItem Name="ADDPages" Header="插入页码"  Click="ADDPages_Click" >
 
-                                    </MenuItem>
-                                    <MenuItem Name="ADDDate" Header="插入日期"  Click="ADDDate_Click">
+                                        </MenuItem>
+                                        <MenuItem Name="ADDDate" Header="插入日期"  Click="ADDDate_Click">
 
-                                    </MenuItem>
-                                </ContextMenu>
-                            </Button.ContextMenu>
-                        </Button>
+                                        </MenuItem>
+                                    </ContextMenu>
+                                </Button.ContextMenu>
+                            </Button>
+                        </StackPanel>
+                        <Grid Width="228" Height="46" Margin="0,6,0,0">
+                            <Grid.ColumnDefinitions>
+                                <ColumnDefinition Width="76"></ColumnDefinition>
+                                <ColumnDefinition Width="76"></ColumnDefinition>
+                                <ColumnDefinition Width="76"></ColumnDefinition>
+                            </Grid.ColumnDefinitions>
+                            <Grid.RowDefinitions>
+                                <RowDefinition Height="23"></RowDefinition>
+                                <RowDefinition Height="23"></RowDefinition>
+                            </Grid.RowDefinitions>
+                            <RadioButton Grid.Column="0" Grid.Row="0" Tag="0" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" ></RadioButton>
+                            <RadioButton Grid.Column="1" Grid.Row="0" Tag="1" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" ></RadioButton>
+                            <RadioButton Grid.Column="2" Grid.Row="0" Tag="2" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" ></RadioButton>
+                            <RadioButton Grid.Column="0" Grid.Row="1" Tag="3" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"></RadioButton>
+                            <RadioButton Grid.Column="1" Grid.Row="1" Tag="4" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"  ></RadioButton>
+                            <RadioButton Grid.Column="2" Grid.Row="1" Tag="5" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"></RadioButton>
+                        </Grid>
+                        <TextBox Name="TextValueTextBox" Height="72" Margin="0,8,0,0" Text="{Binding TextValue}"  Foreground="{Binding SolidColorBrush}" FontSize="14"  AcceptsReturn="True">
+                            <i:Interaction.Triggers>
+                                <i:EventTrigger EventName="TextChanged">
+                                    <i:InvokeCommandAction Command="{Binding TextValueChangedCommand}" CommandParameter="{Binding ElementName=TextValueTextBox}" />
+                                </i:EventTrigger>
+                            </i:Interaction.Triggers>
+                        </TextBox>
                     </StackPanel>
-                    <Grid Width="228" Height="46" Margin="0,6,0,0">
-                        <Grid.ColumnDefinitions>
-                            <ColumnDefinition Width="76"></ColumnDefinition>
-                            <ColumnDefinition Width="76"></ColumnDefinition>
-                            <ColumnDefinition Width="76"></ColumnDefinition>
-                        </Grid.ColumnDefinitions>
-                        <Grid.RowDefinitions>
-                            <RowDefinition Height="23"></RowDefinition>
-                            <RowDefinition Height="23"></RowDefinition>
-                        </Grid.RowDefinitions>
-                        <RadioButton Grid.Column="0" Grid.Row="0" Tag="0" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" ></RadioButton>
-                        <RadioButton Grid.Column="1" Grid.Row="0" Tag="1" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" ></RadioButton>
-                        <RadioButton Grid.Column="2" Grid.Row="0" Tag="2" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" ></RadioButton>
-                        <RadioButton Grid.Column="0" Grid.Row="1" Tag="3" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"></RadioButton>
-                        <RadioButton Grid.Column="1" Grid.Row="1" Tag="4" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"  ></RadioButton>
-                        <RadioButton Grid.Column="2" Grid.Row="1" Tag="5" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"></RadioButton>
-                    </Grid>
-                    <TextBox Name="TextValueTextBox" Height="72" Margin="0,8,0,0" Text="{Binding TextValue}"  Foreground="{Binding SolidColorBrush}" FontSize="14"  AcceptsReturn="True">
-                        <i:Interaction.Triggers>
-                            <i:EventTrigger EventName="TextChanged">
-                                <i:InvokeCommandAction Command="{Binding TextValueChangedCommand}" CommandParameter="{Binding ElementName=TextValueTextBox}" />
-                            </i:EventTrigger>
-                        </i:Interaction.Triggers>
-                    </TextBox>
-                </StackPanel>
-            </Grid>
-            <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>
-                </StackPanel>
+                </Grid>
+                <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>
+                    </StackPanel>
+                </Grid>
             </Grid>
-        </Grid>
+        </ScrollViewer>
     </Grid>
 </UserControl>

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

@@ -19,12 +19,12 @@
     <Grid IsEnabled="{Binding HeaderFooterGridIsEnabled}">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="558*"/>
-            <ColumnDefinition Width="260*"/>
+            <ColumnDefinition Width="260*" MaxWidth="260"/>
         </Grid.ColumnDefinitions>
         <Grid Grid.Column="0">
             <Grid.RowDefinitions>
                 <RowDefinition Height="556*"/>
-                <RowDefinition Height="64*"/>
+                <RowDefinition Height="64*" MaxHeight="64"/>
             </Grid.RowDefinitions>
             <Grid  Grid.Row="0" AllowDrop="True"
                   Drop="Grid_Drop"
@@ -44,27 +44,23 @@
                     </ListView.ContextMenu>
                     <ListView.View>
                         <GridView>
-                            <GridViewColumn  Header="文档名"  Width="230" DisplayMemberBinding="{Binding FileName}"/>
-                            <GridViewColumn Header="页面范围" Width="170" >
+                            <GridViewColumn  Header="文档名"  Width="234" DisplayMemberBinding="{Binding FileName}"/>
+                            <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>
                                     </DataTemplate>
                                 </GridViewColumn.CellTemplate>
                             </GridViewColumn>
-                            <GridViewColumn Header="大小" Width="100" DisplayMemberBinding="{Binding FileSize}"/>
+                            <GridViewColumn Header="大小" Width="68" DisplayMemberBinding="{Binding FileSize}"/>
                             <GridViewColumn Header="状态" Width="80" >
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
-                                        <TextBlock Text="{Binding FileState}" TextDecorations="Underline" Foreground="Black"/>
-                                    </DataTemplate>
-                                </GridViewColumn.CellTemplate>
-                            </GridViewColumn>
-                            <GridViewColumn Header=""  Width="100">
-                                <GridViewColumn.CellTemplate>
-                                    <DataTemplate >
-                                        <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" Click="DeleteTemplateBtn_Click">
-                                        </Button>
+                                        <StackPanel Orientation="Horizontal">
+                                            <TextBlock Text="{Binding FileState}" Width="14" Height="14" TextDecorations="Underline" Foreground="Black"/>
+                                            <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" VerticalAlignment="Center" Margin="38,0,0,0" Click="DeleteTemplateBtn_Click">
+                                            </Button>
+                                        </StackPanel>
                                         <DataTemplate.Triggers>
                                             <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="True">
                                                 <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Visible"/>
@@ -139,14 +135,15 @@
         </Grid>
         <Grid Grid.Column="1" Background="WhiteSmoke" IsEnabled="{Binding SetHeaderFooterGridIsEnabled}">
             <Grid.RowDefinitions>
-                <RowDefinition Height="*"/>
-                <RowDefinition Height="72"/>
+
+                <RowDefinition Height="536"/>
+                <RowDefinition Height="64"/>
             </Grid.RowDefinitions>
             <Grid Grid.Row="0" Background="#F3F3F3"  Grid.RowSpan="{Binding CreateGridSpan}">
                 <ContentControl prism:RegionManager.RegionName="{Binding HeaderFooterSettingsRegionName}" Visibility="{Binding HeaderFooterSettingsVisible}"></ContentControl>
             </Grid>
             <Grid Grid.Row="1" Visibility="{Binding CreateGridSpanVisibility}">
-                <Button Height="40" Width="228" Background="Black" Command="{Binding CreateCommand}">
+                <Button Height="32" Width="228" Background="Black" Command="{Binding CreateCommand}">
                     <TextBlock Text="Apply" FontSize="18" Foreground="White"/>
                 </Button>
             </Grid>

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

@@ -39,6 +39,7 @@
         <Grid Background="#F3F3F3" Grid.Row="1">
             <ListBox
                                 Width="260" 
+                
                                 BorderThickness="0"
                                 ScrollViewer.CanContentScroll="True"
                                 ScrollViewer.HorizontalScrollBarVisibility="Disabled"

+ 13 - 16
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageRemoveDialog.xaml

@@ -18,12 +18,12 @@
     <Grid IsEnabled="{Binding OptionsRemoveGridIsEnabled}">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="558*"  />
-            <ColumnDefinition Width="260*" />
+            <ColumnDefinition Width="260*" MaxWidth="260"/>
         </Grid.ColumnDefinitions>
         <Grid Grid.Column="0" >
             <Grid.RowDefinitions>
                 <RowDefinition Height="556*" />
-                <RowDefinition Height="64*"/>
+                <RowDefinition Height="64*" MaxHeight="64"/>
             </Grid.RowDefinitions>
             <Grid  Grid.Row="0" AllowDrop="True"
                   Drop="Grid_Drop"
@@ -44,20 +44,16 @@
                     </ListView.ContextMenu>
                     <ListView.View>
                         <GridView>
-                            <GridViewColumn  Header="文档名"  Width="400" DisplayMemberBinding="{Binding FileName}"/>
-                            <GridViewColumn Header="大小" Width="100" DisplayMemberBinding="{Binding FileSize}"/>
+                            <GridViewColumn  Header="文档名"  Width="390" DisplayMemberBinding="{Binding FileName}"/>
+                            <GridViewColumn Header="大小" Width="68" DisplayMemberBinding="{Binding FileSize}"/>
                             <GridViewColumn Header="状态" Width="80" >
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
-                                        <TextBlock Text="{Binding FileState}" TextDecorations="Underline" Foreground="Black"/>
-                                    </DataTemplate>
-                                </GridViewColumn.CellTemplate>
-                            </GridViewColumn>
-                            <GridViewColumn Header=""  Width="100">
-                                <GridViewColumn.CellTemplate>
-                                    <DataTemplate >
-                                        <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" Click="DeleteTemplateBtn_Click">
-                                        </Button>
+                                        <StackPanel Orientation="Horizontal">
+                                            <TextBlock Text="{Binding FileState}" Width="14" Height="14" TextDecorations="Underline" Foreground="Black"/>
+                                            <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" VerticalAlignment="Center" Margin="38,0,0,0" Click="DeleteTemplateBtn_Click">
+                                            </Button>
+                                        </StackPanel>
                                         <DataTemplate.Triggers>
                                             <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="True">
                                                 <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Visible"/>
@@ -69,6 +65,7 @@
                                     </DataTemplate>
                                 </GridViewColumn.CellTemplate>
                             </GridViewColumn>
+                            
                         </GridView>
                     </ListView.View>
                     <ListView.ItemContainerStyle>
@@ -134,8 +131,8 @@
         </Grid>
         <Grid Grid.Column="1" Background="WhiteSmoke" IsEnabled="{Binding SetOptionsRemoveGridIsEnabled}">
             <Grid.RowDefinitions>
-                <RowDefinition Height="*"/>
-                <RowDefinition Height="72"/>
+                <RowDefinition Height="536*"/>
+                <RowDefinition Height="64*"  MaxHeight="64"/>
             </Grid.RowDefinitions>
             <StackPanel Orientation="Vertical" Margin="16,14,0,0" Grid.Row="0">
                 <TextBlock Text="Options" FontSize="14" Width="228" Height=" 22" FontFamily="Segoe UI" TextBlock.Foreground="#252629" HorizontalAlignment="Left"/>
@@ -156,7 +153,7 @@
                 </CheckBox>
             </StackPanel>
             <Grid Grid.Row="2">
-                <Button Height="40" Width="228" Background="Black" Command="{Binding OptionsRemoveCommand}">
+                <Button Height="32" Width="228" Background="Black" Command="{Binding OptionsRemoveCommand}">
                     <TextBlock Text="Remove" FontSize="18" Foreground="White"/>
                 </Button>
             </Grid>

+ 11 - 15
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageSetPasswordDialog.xaml

@@ -18,7 +18,7 @@
     <Grid IsEnabled="{Binding SafetyGridIsEnabled}">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="558*"/>
-            <ColumnDefinition Width="260*"/>
+            <ColumnDefinition Width="260*" MaxWidth="260"/>
         </Grid.ColumnDefinitions>
         <Grid Grid.Column="0">
             <Grid.RowDefinitions>
@@ -43,20 +43,16 @@
                     </ListView.ContextMenu>
                     <ListView.View>
                         <GridView>
-                            <GridViewColumn  Header="文档名"  Width="400" DisplayMemberBinding="{Binding FileName}"/>
-                            <GridViewColumn Header="大小" Width="100" DisplayMemberBinding="{Binding FileSize}"/>
+                            <GridViewColumn  Header="文档名"  Width="390" DisplayMemberBinding="{Binding FileName}"/>
+                            <GridViewColumn Header="大小" Width="68" DisplayMemberBinding="{Binding FileSize}"/>
                             <GridViewColumn Header="状态" Width="80" >
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
-                                        <TextBlock Text="{Binding FileState}" TextDecorations="Underline" Foreground="Black"/>
-                                    </DataTemplate>
-                                </GridViewColumn.CellTemplate>
-                            </GridViewColumn>
-                            <GridViewColumn Header=""  Width="100">
-                                <GridViewColumn.CellTemplate>
-                                    <DataTemplate >
-                                        <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" Click="DeleteTemplateBtn_Click">
-                                        </Button>
+                                        <StackPanel Orientation="Horizontal">
+                                            <TextBlock Text="{Binding FileState}" Width="14" Height="14" TextDecorations="Underline" Foreground="Black"/>
+                                            <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" VerticalAlignment="Center" Margin="38,0,0,0" Click="DeleteTemplateBtn_Click">
+                                            </Button>
+                                        </StackPanel>
                                         <DataTemplate.Triggers>
                                             <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="True">
                                                 <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Visible"/>
@@ -130,9 +126,9 @@
         </Grid>
         <Grid Grid.Column="1" Background="WhiteSmoke" IsEnabled="{Binding SetSafetyGridIsEnabled}">
             <Grid.RowDefinitions>
-                <RowDefinition Height="*"/>
-                <RowDefinition Height="*"/>
-                <RowDefinition Height="72"/>
+                <RowDefinition Height="268*"/>
+                <RowDefinition Height="268*"/>
+                <RowDefinition Height="64*"  MaxHeight="64"/>
             </Grid.RowDefinitions>
             <Grid Grid.Row="0">
                 <StackPanel Margin="15,23,0,0">

+ 27 - 20
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkCreateBaseContent.xaml

@@ -10,8 +10,7 @@
              d:DesignWidth="260" >
     <Grid>
         <Grid.RowDefinitions>
-            <RowDefinition Height="40"></RowDefinition>
-            <RowDefinition Height="48"></RowDefinition>
+            <RowDefinition Height="50"></RowDefinition>
             <RowDefinition></RowDefinition>
         </Grid.RowDefinitions>
         <Grid Grid.Row="0" Visibility="{Binding CreateBaseVisible, Mode=TwoWay}">
@@ -42,26 +41,34 @@
                 </StackPanel>
             </Button>
         </Grid>
-        <Grid Grid.Row="1" Margin="16,0,16,0">
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition></ColumnDefinition>
-                <ColumnDefinition></ColumnDefinition>
-            </Grid.ColumnDefinitions>
-            <Button Name="HomePageWatermarkCreateTextContent" Grid.Column="0" Command="{Binding ChangeCreateModCommand}" CommandParameter="{Binding ElementName=HomePageWatermarkCreateTextContent}">
-                <StackPanel Orientation="Vertical">
-                    <TextBlock Text="文本" FontSize="18"></TextBlock>
-                </StackPanel>
+        <ScrollViewer   Grid.Row="1">
+        <Grid Grid.Row="1">
+            <Grid.RowDefinitions>
+                <RowDefinition Height="32"></RowDefinition>
+                <RowDefinition></RowDefinition>
+            </Grid.RowDefinitions>
+            <Grid Grid.Row="0" Margin="16,0,16,0">
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition></ColumnDefinition>
+                    <ColumnDefinition></ColumnDefinition>
+                </Grid.ColumnDefinitions>
+                <Button Name="HomePageWatermarkCreateTextContent" Grid.Column="0" Command="{Binding ChangeCreateModCommand}" CommandParameter="{Binding ElementName=HomePageWatermarkCreateTextContent}">
+                    <StackPanel Orientation="Vertical">
+                        <TextBlock Text="文本" FontSize="18"></TextBlock>
+                    </StackPanel>
 
-            </Button>
-            <Button Grid.Column="1" Name="HomePageWatermarkCreateFileContent" Command="{Binding ChangeCreateModCommand}" CommandParameter="{Binding ElementName=HomePageWatermarkCreateFileContent}">
-                <StackPanel Orientation="Vertical"  >
-                    <TextBlock Text="文件" FontSize="18" VerticalAlignment="Center"></TextBlock>
-                </StackPanel>
-            </Button>
-        </Grid>
-        <Grid Grid.Row="2">
-            <ContentControl prism:RegionManager.RegionName="{Binding WatermarkCreateRegionName}" Visibility="{Binding WatermarkCreateVisible}"></ContentControl>
+                </Button>
+                <Button Grid.Column="1" Name="HomePageWatermarkCreateFileContent" Command="{Binding ChangeCreateModCommand}" CommandParameter="{Binding ElementName=HomePageWatermarkCreateFileContent}">
+                    <StackPanel Orientation="Vertical"  >
+                        <TextBlock Text="文件" FontSize="18" VerticalAlignment="Center"></TextBlock>
+                    </StackPanel>
+                </Button>
+            </Grid>
+            <Grid Grid.Row="1">
+                <ContentControl prism:RegionManager.RegionName="{Binding WatermarkCreateRegionName}" Visibility="{Binding WatermarkCreateVisible}"></ContentControl>
+            </Grid>
         </Grid>
+        </ScrollViewer>
     </Grid>
 </UserControl>
 

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

@@ -19,7 +19,7 @@
     <Grid IsEnabled="{Binding WatermarkGridIsEnabled}">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="558*"/>
-            <ColumnDefinition Width="260*"/>
+            <ColumnDefinition Width="260*" MaxWidth="260"/>
         </Grid.ColumnDefinitions>
         <Grid Grid.Column="0">
             <Grid.RowDefinitions>
@@ -44,27 +44,23 @@
                     </ListView.ContextMenu>
                     <ListView.View>
                         <GridView>
-                            <GridViewColumn  Header="文档名"  Width="400" DisplayMemberBinding="{Binding FileName}"/>
-                            <GridViewColumn Header="页面范围" Width="170" >
+                            <GridViewColumn  Header="文档名"  Width="234" DisplayMemberBinding="{Binding FileName}"/>
+                            <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>
                                     </DataTemplate>
                                 </GridViewColumn.CellTemplate>
                             </GridViewColumn>
-                            <GridViewColumn Header="大小" Width="100" DisplayMemberBinding="{Binding FileSize}"/>
+                            <GridViewColumn Header="大小" Width="68" DisplayMemberBinding="{Binding FileSize}"/>
                             <GridViewColumn Header="状态" Width="80" >
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
-                                        <TextBlock Text="{Binding FileState}" TextDecorations="Underline" Foreground="Black"/>
-                                    </DataTemplate>
-                                </GridViewColumn.CellTemplate>
-                            </GridViewColumn>
-                            <GridViewColumn Header=""  Width="100">
-                                <GridViewColumn.CellTemplate>
-                                    <DataTemplate >
-                                        <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" Click="DeleteTemplateBtn_Click">
-                                        </Button>
+                                        <StackPanel Orientation="Horizontal">
+                                            <TextBlock Text="{Binding FileState}" Width="14" Height="14" TextDecorations="Underline" Foreground="Black"/>
+                                            <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" VerticalAlignment="Center" Margin="38,0,0,0" Click="DeleteTemplateBtn_Click">
+                                            </Button>
+                                        </StackPanel>
                                         <DataTemplate.Triggers>
                                             <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="True">
                                                 <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Visible"/>
@@ -139,14 +135,15 @@
         </Grid>
         <Grid Grid.Column="1" Background="WhiteSmoke" IsEnabled="{Binding SetWatermarkGridIsEnabled}">
             <Grid.RowDefinitions>
-                <RowDefinition Height="*"/>
-                <RowDefinition Height="72"/>
+
+                <RowDefinition Height="536"/>
+                <RowDefinition Height="64"/>
             </Grid.RowDefinitions>
             <Grid  Grid.Row="0"  Grid.RowSpan="{Binding CreateGridSpan}" Background="#F3F3F3">
                 <ContentControl prism:RegionManager.RegionName="{Binding WatermarkSettingsRegionName}" Visibility="{Binding WatermarkSettingsVisible}"></ContentControl>
             </Grid>
             <Grid Grid.Row="1" Visibility="{Binding CreateGridSpanVisibility}">
-                <Button Height="40" Width="228" Background="Black" Command="{Binding CreateCommand}">
+                <Button Height="32" Width="228" Background="Black" Command="{Binding CreateCommand}">
                     <TextBlock Text="Apply" FontSize="18" Foreground="White"/>
                 </Button>
             </Grid>

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

@@ -29,6 +29,7 @@
     <Grid Background="#F3F3F3">
         <ListBox Name="FileWatermarkListbox" 
                                 Width="240" 
+                 
                                 BorderThickness="0"
                                 ScrollViewer.CanContentScroll="True"
                                 ScrollViewer.HorizontalScrollBarVisibility="Disabled"

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

@@ -29,6 +29,7 @@
     <Grid Background="#F3F3F3">
         <ListBox Name="TextWatermarkListbox" 
                                 Width="240" 
+                 
                                 BorderThickness="0"
                                 ScrollViewer.CanContentScroll="True"
                                 ScrollViewer.HorizontalScrollBarVisibility="Disabled"

+ 13 - 1
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePictureToPDFDialog.xaml

@@ -43,7 +43,19 @@
                         <GridViewColumn Header="状态" Width="80" >
                             <GridViewColumn.CellTemplate>
                                 <DataTemplate>
-                                    <TextBlock Text="{Binding FileState}" TextDecorations="Underline" Foreground="Black"/>
+                                    <StackPanel Orientation="Horizontal">
+                                        <TextBlock Text="{Binding FileState}" Width="14" Height="14" TextDecorations="Underline" Foreground="Black"/>
+                                        <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" VerticalAlignment="Center" Margin="38,0,0,0" Click="DeleteTemplateBtn_Click">
+                                        </Button>
+                                    </StackPanel>
+                                    <DataTemplate.Triggers>
+                                        <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="True">
+                                            <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Visible"/>
+                                        </DataTrigger>
+                                        <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="False">
+                                            <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Hidden"/>
+                                        </DataTrigger>
+                                    </DataTemplate.Triggers>
                                 </DataTemplate>
                             </GridViewColumn.CellTemplate>
                         </GridViewColumn>

+ 26 - 12
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePictureToPDFDialog.xaml.cs

@@ -1,11 +1,15 @@
-using DryIoc;
+using ComPDFKitViewer;
+using DryIoc;
 using ImTools;
 using PDF_Office.Model.Dialog.HomePageToolsDialogs;
 using PDF_Office.ViewModels.Dialog.HomePageToolsDialogs;
+using PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
 using System;
 using System.Collections;
 using System.Collections.Generic;
+using System.Data;
 using System.Diagnostics;
+using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Input;
 using System.Xml.Linq;
@@ -17,9 +21,11 @@ namespace PDF_Office.Views.Dialog.HomePageToolsDialogs
     /// </summary>
     public partial class HomePagePictureToPDFDialog : UserControl
     {
+        private HomePagePictureToPDFDialogViewModel viewModel;
         public HomePagePictureToPDFDialog()
         {
             InitializeComponent();
+            viewModel = this.DataContext as HomePagePictureToPDFDialogViewModel;
         }
 
         private void Menu_Click(object sender, System.Windows.RoutedEventArgs e)
@@ -32,31 +38,31 @@ namespace PDF_Office.Views.Dialog.HomePageToolsDialogs
             IList list = listView.SelectedItems;
             var lists = listView.Items;
             System.Data.DataRowView a;
-            ((HomePagePictureToPDFDialogViewModel)this.DataContext).fileNamesView.Clear();
+            viewModel.fileNamesView.Clear();
             foreach (var item in list)
             {
                 a = (System.Data.DataRowView)item;
-                ((HomePagePictureToPDFDialogViewModel)this.DataContext).fileNamesView.Add(lists.IndexOf(a));
+                viewModel.fileNamesView.Add(lists.IndexOf(a));
             }
-            if (((HomePagePictureToPDFDialogViewModel)this.DataContext).fileNamesView.Count > 0)
+            if (viewModel.fileNamesView.Count > 0)
             {
-                ((HomePagePictureToPDFDialogViewModel)this.DataContext).RemoveIsEnable = "True";
+                viewModel.RemoveIsEnable = "True";
             }
             else
             {
-                ((HomePagePictureToPDFDialogViewModel)this.DataContext).RemoveIsEnable = "False";
+                viewModel.RemoveIsEnable = "False";
             }
 
         }
 
         private void RemoveFileMenuItem_Click(object sender, System.Windows.RoutedEventArgs e)
         {
-            ((HomePagePictureToPDFDialogViewModel)this.DataContext).removepicturefile();
+            viewModel.removepicturefile();
         }
 
         private void OpenFileMenuItem_Click(object sender, System.Windows.RoutedEventArgs e)
         {
-            ((HomePagePictureToPDFDialogViewModel)this.DataContext).openfiledialog();
+            viewModel.openfiledialog();
         }
 
         private void RadioButton_Click(object sender, System.Windows.RoutedEventArgs e)
@@ -66,17 +72,17 @@ namespace PDF_Office.Views.Dialog.HomePageToolsDialogs
             {
                 case "NewFilesRadioButtom":
                     {
-                        ((HomePagePictureToPDFDialogViewModel)this.DataContext).pictureToPDFModel.Mode = HomePagePictureToPDFDialogModel.ToPDFFileMode.NewFiles;
+                        viewModel.pictureToPDFModel.Mode = HomePagePictureToPDFDialogModel.ToPDFFileMode.NewFiles;
                     }
                     break;
                 case "OneNewFileNameRadioButtom":
                     {
-                        ((HomePagePictureToPDFDialogViewModel)this.DataContext).pictureToPDFModel.Mode = HomePagePictureToPDFDialogModel.ToPDFFileMode.OneNewFile;
+                        viewModel.pictureToPDFModel.Mode = HomePagePictureToPDFDialogModel.ToPDFFileMode.OneNewFile;
                     }
                     break;
                 case "SelectFileNameRadioButton":
                     {
-                        ((HomePagePictureToPDFDialogViewModel)this.DataContext).pictureToPDFModel.Mode = HomePagePictureToPDFDialogModel.ToPDFFileMode.SelectFileName;
+                        viewModel.pictureToPDFModel.Mode = HomePagePictureToPDFDialogModel.ToPDFFileMode.SelectFileName;
                     }
                     break;
                 default:
@@ -85,6 +91,14 @@ namespace PDF_Office.Views.Dialog.HomePageToolsDialogs
             }
         }
 
-       
+        private void DeleteTemplateBtn_Click(object sender, RoutedEventArgs e)
+        {
+            Button deletetemplatebtn = sender as Button;
+            var ls = deletetemplatebtn.DataContext as DataRowView;
+            if (ls != null)
+            {
+                viewModel.removepdffile(viewModel.ImagesDataTable.Rows.IndexOf(ls.Row));
+            }
+        }
     }
 }