Преглед на файлове

批量处理-进度条、部分bug

liyijie преди 2 години
родител
ревизия
09df690dae
променени са 24 файла, в които са добавени 2616 реда и са изтрити 158 реда
  1. 26 1
      PDF Office/CustomControl/BatchStatus.xaml
  2. 90 0
      PDF Office/CustomControl/BatchStatus.xaml.cs
  3. 2331 0
      PDF Office/PDF Office.csproj
  4. 7 1
      PDF Office/StyleAndTemplateList.txt
  5. 14 14
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundDialogViewModel.cs
  6. 14 14
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBates/HomePageBatesDialogViewModel.cs
  7. 18 15
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageCompressDialogViewModel.cs
  8. 19 19
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialogViewModel.cs
  9. 14 14
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageHeaderFooter/HomePageHeaderFooterDialogViewModel.cs
  10. 14 14
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageRemoveDialogViewModel.cs
  11. 12 13
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageSetPasswordDialogViewModel.cs
  12. 14 14
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkDialogViewModel.cs
  13. 27 27
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePictureToPDFDialogViewModel.cs
  14. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBackground/HomePageBackgroundDialog.xaml
  15. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageBates/HomePageBatesDialog.xaml
  16. 2 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageCompressDialog.xaml
  17. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialog.xaml
  18. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageHeaderFooter/HomePageHeaderFooterDialog.xaml
  19. 2 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageRemoveDialog.xaml
  20. 2 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageSetPasswordDialog.xaml
  21. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageWatermark/HomePageWatermarkDialog.xaml
  22. 3 2
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePictureToPDFDialog.xaml
  23. 1 1
      PDF Office/Views/EditTools/Watermark/WatermarkTemplateListFileContent.xaml
  24. 1 1
      PDF Office/Views/EditTools/Watermark/WatermarkTemplateListTextContent.xaml

+ 26 - 1
PDF Office/CustomControl/BatchStatus.xaml

@@ -2,11 +2,36 @@
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:local="clr-namespace:PDF_Office.CustomControl"
              mc:Ignorable="d" 
-             d:DesignHeight="450" d:DesignWidth="800">
+             d:DesignHeight="16" d:DesignWidth="16">
     <Grid>
+        <Border x:Name="wait" Width="16" Height="16" Visibility="Visible">
+            <Path HorizontalAlignment="Center" VerticalAlignment="Center" Data="M12.5 7C12.5 10.0376 10.0376 12.5 7 12.5C3.96243 12.5 1.5 10.0376 1.5 7C1.5 3.96243 3.96243 1.5 7 1.5C10.0376 1.5 12.5 3.96243 12.5 7ZM14 7C14 10.866 10.866 14 7 14C3.13401 14 0 10.866 0 7C0 3.13401 3.13401 0 7 0C10.866 0 14 3.13401 14 7ZM6.25 3V7V7.75H7H10V6.25H7.75V3H6.25Z" Fill="#616469"></Path>
+        </Border>
+        <Border x:Name="complete"  Width="16" Height="16" Visibility="Hidden">
+            <Grid>
+                <Ellipse Width="16" Height="16" Stroke="#1AD598" StrokeThickness="8"></Ellipse>
+                <Path  Data="M12.5912 5.46152L7.907 11.4615C7.77258 11.6337 7.5698 11.7387 7.35162 11.7491C7.13345 11.7596 6.92157 11.6744 6.77136 11.5158L3.45557 8.01579L4.5445 6.98418L7.26093 9.85152L11.4089 4.53845L12.5912 5.46152Z" Fill="white"></Path>
+            </Grid>
+        </Border>
+        <Border x:Name="error" Width="16" Height="16" Visibility="Hidden">
+            <Grid>
+                <Ellipse Width="16" Height="16" Stroke="#F3465B" StrokeThickness="8"></Ellipse>
+                <Path  Data="M0.25 0V5H1.75V0H0.25ZM0.25 6.5V8H1.75L1.75 6.5H0.25Z" Fill="white" HorizontalAlignment="Center" VerticalAlignment="Center">
+                    </Path>
+            </Grid>
+        </Border>
+        <Grid x:Name="progress" Visibility="Hidden">
             
+        <Rectangle Width="16" Height="16" Stroke="White" StrokeThickness="8" RadiusX="50" RadiusY="50"></Rectangle>
+            <Rectangle x:Name="progressBar" RenderTransformOrigin="0.5,0.5"  Width="16" Height="16" Stroke="#1AD598" StrokeThickness="8" StrokeDashArray="1,1000"  RadiusX="50" RadiusY="50">
+            <Rectangle.RenderTransform>
+                <RotateTransform Angle="90"></RotateTransform>
+            </Rectangle.RenderTransform>
+        </Rectangle>
+        </Grid>
     </Grid>
 </UserControl>

+ 90 - 0
PDF Office/CustomControl/BatchStatus.xaml.cs

@@ -24,5 +24,95 @@ namespace PDF_Office.CustomControl
         {
             InitializeComponent();
         }
+
+        public int MaxStatusValue
+        {
+            get { return (int)GetValue(MaxStatusValueProperty); }
+            set
+            {
+                SetValue(MaxStatusValueProperty, value);
+
+            }
+        }
+
+        // Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty MaxStatusValueProperty =
+            DependencyProperty.Register("MaxStatusValue", typeof(int), typeof(BatchStatus), new PropertyMetadata(10));
+
+        public string StatusValue
+        {
+            get { return (string)GetValue(StatusValueProperty); }
+            set
+            {
+                SetValue(StatusValueProperty, value);
+            }
+        }
+
+        // Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty StatusValueProperty =
+            DependencyProperty.Register("StatusValue", typeof(string), typeof(BatchStatus), new PropertyMetadata("wait",
+            new PropertyChangedCallback(OnPropertyChanged), // 第3个值回调位置
+            new CoerceValueCallback(OnCoerceValueCallback) // 第2个强制回调位置
+        )
+        , new ValidateValueCallback(OnValidateValueCallBack));
+
+        static void OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+        {
+
+            (d as BatchStatus).CalculateProgress(e.NewValue.ToString());
+            
+        }
+
+
+        static object OnCoerceValueCallback(DependencyObject d, object obj)
+        {
+            
+            return obj;
+        }
+
+
+        static bool OnValidateValueCallBack(object obj)
+        {
+           
+            return true;
+        }
+
+        void CalculateProgress(string value)
+        {
+            if (value == "wait")
+            {
+                this.wait.Visibility = Visibility.Visible;
+                this.complete.Visibility = Visibility.Hidden;
+                this.error.Visibility = Visibility.Hidden;
+                this.progress.Visibility = Visibility.Hidden;
+            }
+            if (value == "complete")
+            {
+                this.complete.Visibility = Visibility.Visible;
+                this.wait.Visibility = Visibility.Hidden;
+                this.error.Visibility = Visibility.Hidden;
+                this.progress.Visibility = Visibility.Hidden;
+            }
+            if (value == "error")
+            {
+                this.error.Visibility = Visibility.Visible;
+                this.wait.Visibility = Visibility.Hidden;
+                this.complete.Visibility = Visibility.Hidden;
+                this.progress.Visibility = Visibility.Hidden;
+            }
+            if (int.TryParse(value, out _))
+            {
+                this.progress.Visibility = Visibility.Visible;
+                this.wait.Visibility = Visibility.Hidden;
+                this.complete.Visibility = Visibility.Hidden;
+                this.error.Visibility = Visibility.Hidden;
+                double step = (double.Parse(value) / (double)MaxStatusValue) * Math.PI;
+                progressBar.StrokeDashArray = new DoubleCollection() { step, 10000 };
+            }
+
+        }
+      
+
+       
     }
 }

Файловите разлики са ограничени, защото са твърде много
+ 2331 - 0
PDF Office/PDF Office.csproj


+ 7 - 1
PDF Office/StyleAndTemplateList.txt

@@ -49,4 +49,10 @@
 6.PageTurningPreview
 位置:PDF Office\CustomControl\PageTurningPreview.xaml
 用途:普通预览控件,可进行翻页
-使用方法:load自定义控件时设置PageIndexLists(负责控制页数),cpdfdocment(负责渲染的文件)
+使用方法:load自定义控件时设置PageIndexLists(负责控制页数),cpdfdocment(负责渲染的文件)
+
+7.BatchStatus
+位置:PDF Office\CustomControl\BatchStatus.xaml
+用途:批量处理进度显示
+使用方法:StatusValue{设置等于,"complete"(显示绿色背景勾形符号)、"error"(显示红色背景感叹符号)、
+"wait"(显示等待闹钟)、"为数字时"(显示进度条)}

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

@@ -336,7 +336,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
 
         private void create()
         {
-            updateListview("待确定");
+            updateListview("wait");
             fileNamesIndex = 0;
             BackgroundGridIsEnabled = "False";
             foreach (var filename in fileNames)
@@ -349,8 +349,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 CPDFDocument document = CPDFDocument.InitWithFilePath(filename);
                 if (document == null)
                 {
-                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                     fileNamesIndex++;
                     continue;
                 }
@@ -372,8 +372,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                     if (document.IsLocked)
                     {
                         //未成功解密文档时,释放Document对象,返回
-                        PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                        PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                        PDFDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                        PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                         fileNamesIndex++;
                         continue;
                     }
@@ -388,8 +388,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 //    }
 
                 document.Release();
-                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
-                PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
+                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
+                PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
                 fileNamesIndex++;
             }
             BackgroundGridIsEnabled = "True";
@@ -448,7 +448,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 RemoveExcess(ref fileNames);
                 SetBackgroundGridIsEnabled = "True";
                 AddFileVisibility = Visibility.Collapsed;
-                updateListview("待确定");
+                updateListview("wait");
             }
         }
 
@@ -459,7 +459,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             RemoveExcess(ref fileNames);
             SetBackgroundGridIsEnabled = "True";
             AddFileVisibility = Visibility.Collapsed;
-            updateListview("待确定");
+            updateListview("wait");
         }
 
         /// <summary>
@@ -502,7 +502,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                     }
                 }
                 RemoveExcess(ref fileNames);
-                updateListview("待确定");
+                updateListview("wait");
                 SetBackgroundGridIsEnabled = "True";
                 AddFileVisibility = Visibility.Collapsed;
             }
@@ -552,7 +552,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
         /// 更新Currentlistview显示
         /// pagerangetext 自定义页面范围字符串  pagerangeselectindex combobox下拉索引(0全部页面 1奇数页 2偶数页 3自定义页面)isevenpageisenabled 偶数页状态 state 状态显示字符串
         /// </summary>
-        public void updateCurrentListview(string pagerangetext = "1", string pagerangeselectindex = "0",bool isevenpageisenabled=true,string state = "待完成")
+        public void updateCurrentListview(string pagerangetext = "1", string pagerangeselectindex = "0",bool isevenpageisenabled=true,string state = "wait")
         {
             if (fileNames.Count >= FileNameNumber)
             {
@@ -651,7 +651,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 SetBackgroundGridIsEnabled = "False";
                 AddFileVisibility = Visibility.Visible;
             }
-            updateListview("待确定");
+            updateListview("wait");
         }
 
         public void removepdffile(int index)
@@ -665,7 +665,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 AddFileVisibility = Visibility.Visible;
             }
 
-            updateListview("待确定");
+            updateListview("wait");
         }
 
         public void PDFFileCount()
@@ -695,7 +695,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             {
                 fileNames = filepath;
                 PDFFileCount();
-                updateListview("待确定");
+                updateListview("wait");
                 CreateGridSpan = "1";
                 CreateGridSpanVisibility = Visibility.Visible;
                 EnterSelectedContent(TemplateListBaseName);

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

@@ -273,7 +273,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
 
         private void create()
         {
-            updateListview("待确定");
+            updateListview("wait");
             fileNamesIndex = 0;
             BatesGridIsEnabled = "False";
             foreach (var filename in fileNames)
@@ -286,8 +286,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 CPDFDocument document = CPDFDocument.InitWithFilePath(filename);
                 if (document == null)
                 {
-                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                     fileNamesIndex++;
                     continue;
                 }
@@ -309,8 +309,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                     if (document.IsLocked)
                     {
                         //未成功解密文档时,释放Document对象,返回
-                        PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                        PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                        PDFDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                        PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                         fileNamesIndex++;
                         continue;
                     }
@@ -325,8 +325,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 //    return;
                 //}
                 document.Release();
-                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
-                PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
+                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
+                PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
                 fileNamesIndex++;
             }
             BatesGridIsEnabled = "True";
@@ -377,7 +377,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 RemoveExcess(ref fileNames);
                 SetBatesGridIsEnabled = "True";
                 AddFileVisibility = Visibility.Collapsed;
-                updateListview("待确定");
+                updateListview("wait");
             }
         }
         /// <summary>
@@ -390,7 +390,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             RemoveExcess(ref fileNames);
             SetBatesGridIsEnabled = "True";
             AddFileVisibility = Visibility.Collapsed;
-            updateListview("待确定");
+            updateListview("wait");
         }
 
         /// <summary>
@@ -432,7 +432,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                     }
                 }
                 RemoveExcess(ref fileNames);
-                updateListview("待确定");
+                updateListview("wait");
                 SetBatesGridIsEnabled = "True";
                 AddFileVisibility = Visibility.Collapsed;
             }
@@ -480,7 +480,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
         /// 更新Currentlistview显示
         /// pagerangetext 自定义页面范围字符串  pagerangeselectindex combobox下拉索引(0全部页面 1奇数页 2偶数页 3自定义页面)isevenpageisenabled 偶数页状态 state 状态显示字符串
         /// </summary>
-        public void updateCurrentListview(string pagerangetext = "1", string pagerangeselectindex = "0", bool isevenpageisenabled = true, string state = "待完成")
+        public void updateCurrentListview(string pagerangetext = "1", string pagerangeselectindex = "0", bool isevenpageisenabled = true, string state = "wait")
         {
             if (fileNames.Count >= FileNameNumber)
             {
@@ -580,7 +580,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 AddFileVisibility = Visibility.Visible;
             }
 
-            updateListview("待确定");
+            updateListview("wait");
         }
         public void removepdffile(int index)
         {
@@ -594,7 +594,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 AddFileVisibility = Visibility.Visible;
             }
 
-            updateListview("待确定");
+            updateListview("wait");
             
         }
 
@@ -630,7 +630,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 CreateGridSpan = "1";
                 CreateGridSpanVisibility = Visibility.Visible;
                 PDFFileCount();
-                updateListview("待确定");
+                updateListview("wait");
                 EnterSelectedContent(TemplateListName);
             }
         }

+ 18 - 15
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageCompressDialogViewModel.cs

@@ -139,6 +139,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             PDFDataTable.Columns.Add("FileName");
             PDFDataTable.Columns.Add("FileSize");
             PDFDataTable.Columns.Add("FileState");
+            PDFDataTable.Columns.Add("MaxPageRange");
             ADDPDFCommand = new DelegateCommand(addpicture);
             ADDPDFFilesCommand = new DelegateCommand(addpicturefiles);
             RemovePDFFileCommand = new DelegateCommand(removepdffile);
@@ -173,7 +174,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
 
         private int GetIndex(int pageindex)
         {
-            PDFDataTable.Rows[fileNamesIndex]["FileState"]="已经压缩"+pageindex.ToString()+"页";
+            PDFDataTable.Rows[fileNamesIndex]["FileState"]=pageindex.ToString();
             return 0;
         }
 
@@ -186,8 +187,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 CPDFDocument document = CPDFDocument.InitWithFilePath(filename);
                 if (document == null)
                 {
-                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                     fileNamesIndex++;
                     continue;
                 }
@@ -209,8 +210,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                     if (document.IsLocked)
                     {
                         //未成功解密文档时,释放Document对象,返回
-                        PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                        PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                        PDFDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                        PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                         fileNamesIndex++;
                         continue;
                     }
@@ -221,8 +222,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 compressingIntpr = document.CompressFile_Init(((float)homePageCompressDialogModel.CompressQuality), indexDelegate);
                 tempDocument = document;
                 await Task.Run<bool>(() => { return document.CompressFile_Start(compressingIntpr, CommonHelper.CreateFilePath(filename +"compress.pdf")); });
-                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
-                PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
+                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
+                PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
                 fileNamesIndex++;
                 document.Release();
             }
@@ -246,7 +247,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 RemoveExcess(ref fileNames);
                 SetCompressGridIsEnabled = "True";
                 AddFileVisibility = Visibility.Collapsed;
-                updateListview("待确定");
+                updateListview("wait");
             }
         }
 
@@ -257,7 +258,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             RemoveExcess(ref fileNames);
             SetCompressGridIsEnabled = "True";
             AddFileVisibility = Visibility.Collapsed;
-            updateListview("待确定");
+            updateListview("wait");
         }
 
         /// <summary>
@@ -299,7 +300,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                     }
                 }
                 RemoveExcess(ref fileNames);
-                updateListview("待确定");
+                updateListview("wait");
                 SetCompressGridIsEnabled = "True";
                 AddFileVisibility = Visibility.Collapsed;
             }
@@ -316,13 +317,15 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             pdfdatatable.Columns.Add("FileName");
             pdfdatatable.Columns.Add("FileSize");
             pdfdatatable.Columns.Add("FileState");
+            pdfdatatable.Columns.Add("MaxPageRange");
             int datatableindex = 0;
             foreach (var fileName in fileNames)
             {
                 string file_all = fileName;
                 FileInfo f = new FileInfo(file_all);
                 string file_size = (((float)f.Length) / 1024).ToString() + " K";
-                pdfdatatable.Rows.Add(f.Name, file_size, PDFCurrentDataTable.Rows[datatableindex]["FileState"]);
+                int pagecount = CPDFDocument.InitWithFilePath(fileName).PageCount;
+                pdfdatatable.Rows.Add(f.Name, file_size, PDFCurrentDataTable.Rows[datatableindex]["FileState"],pagecount);
                 datatableindex++;
             }
             PDFDataTable = pdfdatatable;
@@ -334,7 +337,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
         /// 更新Currentlistview显示
         /// state 状态显示字符串
         /// </summary>
-        public void updateCurrentListview(string state = "待完成")
+        public void updateCurrentListview(string state = "wait")
         {
             if (fileNames.Count >= FileNameNumber)
             {
@@ -391,7 +394,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 SetCompressGridIsEnabled = "False";
                 AddFileVisibility = Visibility.Visible;
             }
-            updateListview("待确定");
+            updateListview("wait");
         }
 
         public void removepdffile(int index)
@@ -405,7 +408,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 AddFileVisibility = Visibility.Visible;
             }
 
-            updateListview("待确定");
+            updateListview("wait");
         }
 
 
@@ -434,7 +437,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
 
                 fileNames = filepath;
                 PDFFileCount();
-                updateListview("待确定");
+                updateListview("wait");
             }
         }
 

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

@@ -212,13 +212,13 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
         #region 逻辑函数
         private void SetProgress(int pageIndex)
         {
-            PDFDataTable.Rows[fileNamesIndex]["FileState"] = "已经转换" + pageIndex.ToString() + "页";
+            PDFDataTable.Rows[fileNamesIndex]["FileState"] = pageIndex.ToString();
             pageIndex.ToString();
         }
 
         private async void convert()
         {
-            updateListview("待确定");
+            updateListview("wait");
             bool result = false;
             OnProgress GetProgress = null;
             GetProgress += SetProgress;
@@ -234,8 +234,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 CPDFDocument document = CPDFDocument.InitWithFilePath(filename);
                 if (document == null )
                 {
-                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                     fileNamesIndex++;
                     continue;
                 }
@@ -259,8 +259,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                     if (document.IsLocked)
                     {
                         //未成功解密文档时,释放Document对象,返回
-                        PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                        PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                        PDFDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                        PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                         fileNamesIndex++;
                         continue;
                     }
@@ -270,8 +270,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 { //TODO
                     
                     MessageBoxEx.Show("输入不对");
-                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                     fileNamesIndex++;
                     continue;
                 }
@@ -348,13 +348,13 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 }
                 document.Release();
                 if (!result) {
-                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "转档出错";
-                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "转档出错";
+                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                     fileNamesIndex++;
                     continue;
                 }
-                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
-                PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
+                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
+                PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
                 fileNamesIndex++;
             }
             ConverterGridIsEnabled = "True";
@@ -377,7 +377,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 RemoveExcess(ref fileNames);
                 SetConverterGridIsEnabled = "True";
                 AddFileVisibility = Visibility.Collapsed;
-                updateListview("待确定");
+                updateListview("wait");
             }
         }
 
@@ -388,7 +388,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             RemoveExcess(ref fileNames);
             SetConverterGridIsEnabled = "True"; 
             AddFileVisibility = Visibility.Collapsed;
-            updateListview("待确定");
+            updateListview("wait");
         }
 
         /// <summary>
@@ -430,7 +430,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                     }
                 }
                 RemoveExcess(ref fileNames);
-                updateListview("待确定");
+                updateListview("wait");
                 SetConverterGridIsEnabled = "True";
                 AddFileVisibility = Visibility.Collapsed;
             }
@@ -480,7 +480,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
         /// 更新Currentlistview显示
         /// pagerangetext 自定义页面范围字符串  pagerangeselectindex combobox下拉索引(0全部页面 1奇数页 2偶数页 3自定义页面)isevenpageisenabled 偶数页状态 state 状态显示字符串
         /// </summary>
-        public void updateCurrentListview(string pagerangetext = "1", string pagerangeselectindex = "0", bool isevenpageisenabled = true, string state = "待完成")
+        public void updateCurrentListview(string pagerangetext = "1", string pagerangeselectindex = "0", bool isevenpageisenabled = true, string state = "wait")
         {
             if (fileNames.Count >= FileNameNumber)
             {
@@ -580,7 +580,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 SetConverterGridIsEnabled = "False";
                 AddFileVisibility = Visibility.Visible;
             }
-            updateListview("待确定");
+            updateListview("wait");
         }
         public void removepdffile(int index)
         {
@@ -593,7 +593,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 AddFileVisibility = Visibility.Visible;
             }
 
-            updateListview("待确定");
+            updateListview("wait");
         }
 
         public void PDFFileCount()
@@ -636,7 +636,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             {
                 fileNames = filepath;
                 PDFFileCount();
-                updateListview("待确定");
+                updateListview("wait");
                 ChangeConverter(convertertypeindex);
             }
         }

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

@@ -281,7 +281,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
 
         private  void create()
         {
-            updateListview("待确定");
+            updateListview("wait");
             fileNamesIndex = 0;
             HeaderFooterGridIsEnabled = "False";
             foreach (var filename in fileNames)
@@ -294,8 +294,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 CPDFDocument document = CPDFDocument.InitWithFilePath(filename);
                 if (document == null)
                 {
-                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                     fileNamesIndex++;
                     continue;
                 }
@@ -317,8 +317,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                     if (document.IsLocked)
                     {
                         //未成功解密文档时,释放Document对象,返回
-                        PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                        PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                        PDFDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                        PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                         fileNamesIndex++;
                         continue;
                     }
@@ -333,8 +333,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 //}
 
                 document.Release();
-                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
-                PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
+                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
+                PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
                 fileNamesIndex++;
             }
             HeaderFooterGridIsEnabled = "True";
@@ -381,7 +381,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 RemoveExcess(ref fileNames);
                 SetHeaderFooterGridIsEnabled = "True";
                 AddFileVisibility = Visibility.Collapsed;
-                updateListview("待确定");
+                updateListview("wait");
             }
         }
 
@@ -392,7 +392,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             RemoveExcess(ref fileNames);
             SetHeaderFooterGridIsEnabled = "True";
             AddFileVisibility = Visibility.Collapsed;
-            updateListview("待确定");
+            updateListview("wait");
         }
 
         /// <summary>
@@ -434,7 +434,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                     }
                 }
                 RemoveExcess(ref fileNames);
-                updateListview("待确定");
+                updateListview("wait");
                 SetHeaderFooterGridIsEnabled = "True";
                 AddFileVisibility = Visibility.Collapsed;
             }
@@ -484,7 +484,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
         /// 更新Currentlistview显示
         /// pagerangetext 自定义页面范围字符串  pagerangeselectindex combobox下拉索引(0全部页面 1奇数页 2偶数页 3自定义页面)isevenpageisenabled 偶数页状态 state 状态显示字符串
         /// </summary>
-        public void updateCurrentListview(string pagerangetext = "1", string pagerangeselectindex = "0", bool isevenpageisenabled = true, string state = "待完成")
+        public void updateCurrentListview(string pagerangetext = "1", string pagerangeselectindex = "0", bool isevenpageisenabled = true, string state = "wait")
         {
             if (fileNames.Count >= FileNameNumber)
             {
@@ -583,7 +583,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 SetHeaderFooterGridIsEnabled = "False";
                 AddFileVisibility = Visibility.Visible;
             }
-            updateListview("待确定");
+            updateListview("wait");
         }
 
         public void removepdffile(int index)
@@ -597,7 +597,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 AddFileVisibility = Visibility.Visible;
             }
 
-            updateListview("待确定");
+            updateListview("wait");
         }
         public void PDFFileCount()
         {
@@ -628,7 +628,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 PDFFileCount();
                 CreateGridSpan = "1";
                 CreateGridSpanVisibility = Visibility.Visible;
-                updateListview("待确定");
+                updateListview("wait");
                 EnterSelectedContent(TemplateListName);
             }
         }

+ 14 - 14
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageRemoveDialogViewModel.cs

@@ -248,13 +248,13 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             fileNamesIndex = 0;
             foreach (var filename in fileNames)
             {
-                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "待完成";
+                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "wait";
                 CPDFDocument document = CPDFDocument.InitWithFilePath(filename);
 
                 if (document == null)
                 {
-                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                     fileNamesIndex++;
                     continue;
                 }
@@ -276,8 +276,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                     if (document.IsLocked)
                     {
                         //未成功解密文档时,释放Document对象,返回
-                        PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                        PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                        PDFDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                        PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                         fileNamesIndex++;
                         continue;
                     }
@@ -309,8 +309,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 {
                     document.WriteToFilePath(CommonHelper.CreateFilePath(filename + "_Remove.pdf"));
                 }
-                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
-                PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
+                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
+                PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
                 fileNamesIndex++;
                 document.Release();
             }
@@ -334,7 +334,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 RemoveExcess(ref fileNames);
                 SetOptionsRemoveGridIsEnabled = "True";
                 AddFileVisibility = Visibility.Collapsed;
-                updateListview("待确定");
+                updateListview("wait");
             }
         }
 
@@ -344,7 +344,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             RemoveExcess(ref fileNames);
             SetOptionsRemoveGridIsEnabled = "True";
             AddFileVisibility = Visibility.Collapsed;
-            updateListview("待确定");
+            updateListview("wait");
         }
         
 
@@ -387,7 +387,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                     }
                 }
                 RemoveExcess(ref fileNames);
-                updateListview("待确定");
+                updateListview("wait");
                 SetOptionsRemoveGridIsEnabled = "True";
                 AddFileVisibility = Visibility.Collapsed;
             }
@@ -422,7 +422,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
         /// 更新Currentlistview显示
         /// state 状态显示字符串
         /// </summary>
-        public void updateCurrentListview(string state = "待完成")
+        public void updateCurrentListview(string state = "wait")
         {
             if (fileNames.Count >= FileNameNumber)
             {
@@ -479,7 +479,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 SetOptionsRemoveGridIsEnabled = "False";
                 AddFileVisibility = Visibility.Visible;
             }
-            updateListview("待确定");
+            updateListview("wait");
         }
         public void removepdffile(int index)
         {
@@ -492,7 +492,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 AddFileVisibility = Visibility.Visible;
             }
 
-            updateListview("待确定");
+            updateListview("wait");
         }
 
         public void PDFFileCount()
@@ -520,7 +520,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
 
                 fileNames = filepath;
                 PDFFileCount();
-                updateListview("待确定");
+                updateListview("wait");
             }
         }
 

+ 12 - 13
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageSetPasswordDialogViewModel.cs

@@ -296,12 +296,12 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             fileNamesIndex = 0;
             foreach (var filename in fileNames)
             {
-                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "待完成";
+                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "wait";
                 CPDFDocument document = CPDFDocument.InitWithFilePath(filename);
                 if (document == null || document.IsEncrypted)
                 {
-                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                     fileNamesIndex++;
                     continue;
                 }
@@ -314,13 +314,12 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 document.Encrypt(openPassword, editPassword, permissionsInfo);
                 document.WriteToFilePath(filename + "SetPassword");
 
-                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
-                PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
+                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
+                PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
                 fileNamesIndex++;
                 document.Release();
             }
             SafetyGridIsEnabled = "True";
-            MessageBoxEx.Show("已完成");
         }
         #endregion
 
@@ -340,7 +339,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 RemoveExcess(ref fileNames);
                 SetSafetyGridIsEnabled = "True";
                 AddFileVisibility = Visibility.Collapsed;
-                updateListview("待确定");
+                updateListview("wait");
             }
         }
 
@@ -351,7 +350,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             RemoveExcess(ref fileNames);
             SetSafetyGridIsEnabled = "True";
             AddFileVisibility = Visibility.Collapsed;
-            updateListview("待确定");
+            updateListview("wait");
         }
 
         /// <summary>
@@ -393,7 +392,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                     }
                 }
                 RemoveExcess(ref fileNames);
-                updateListview("待确定");
+                updateListview("wait");
                 SetSafetyGridIsEnabled = "True";
                 AddFileVisibility = Visibility.Collapsed;
             }
@@ -428,7 +427,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
         /// 更新Currentlistview显示
         /// state 状态显示字符串
         /// </summary>
-        public void updateCurrentListview( string state = "待完成")
+        public void updateCurrentListview( string state = "wait")
         {
             if (fileNames.Count >= FileNameNumber)
             {
@@ -485,7 +484,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 SetSafetyGridIsEnabled = "False";
                 AddFileVisibility = Visibility.Visible;
             }
-            updateListview("待确定");
+            updateListview("wait");
         }
 
         public void removepdffile(int index)
@@ -499,7 +498,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 AddFileVisibility = Visibility.Visible;
             }
 
-            updateListview("待确定");
+            updateListview("wait");
         }
 
         public void PDFFileCount()
@@ -525,7 +524,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
 
                 fileNames = filepath;
                 PDFFileCount();
-                updateListview("待确定");
+                updateListview("wait");
             }
         }
 

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

@@ -338,7 +338,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
 
         private void create()
         {
-            updateListview("待确定");
+            updateListview("wait");
             fileNamesIndex = 0;
             WatermarkGridIsEnabled = "False";
             foreach (var filename in fileNames)
@@ -351,8 +351,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 CPDFDocument document = CPDFDocument.InitWithFilePath(filename);
                 if (document == null )
                 {
-                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                    PDFDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                    PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                     fileNamesIndex++;
                     continue;
                 }
@@ -374,8 +374,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                     if (document.IsLocked)
                     {
                         //未成功解密文档时,释放Document对象,返回
-                        PDFDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                        PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                        PDFDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                        PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                         fileNamesIndex++;
                         continue;
                     }
@@ -390,8 +390,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 //}
 
                 document.Release();
-                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
-                PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
+                PDFDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
+                PDFCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
                 fileNamesIndex++;
             }
             WatermarkGridIsEnabled = "True";
@@ -454,7 +454,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 RemoveExcess(ref fileNames);
                 SetWatermarkGridIsEnabled = "True";
                 AddFileVisibility = Visibility.Collapsed;
-                updateListview("待确定");
+                updateListview("wait");
             }
         }
 
@@ -465,7 +465,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             RemoveExcess(ref fileNames);
             SetWatermarkGridIsEnabled = "True";
             AddFileVisibility = Visibility.Collapsed;
-            updateListview("待确定");
+            updateListview("wait");
         }
 
         /// <summary>
@@ -507,7 +507,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                     }
                 }
                 RemoveExcess(ref fileNames);
-                updateListview("待确定");
+                updateListview("wait");
                 SetWatermarkGridIsEnabled = "True";
                 AddFileVisibility = Visibility.Collapsed;
             }
@@ -557,7 +557,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
         /// 更新Currentlistview显示
         /// pagerangetext 自定义页面范围字符串  pagerangeselectindex combobox下拉索引(0全部页面 1奇数页 2偶数页 3自定义页面)isevenpageisenabled 偶数页状态 state 状态显示字符串
         /// </summary>
-        public void updateCurrentListview(string pagerangetext = "1", string pagerangeselectindex = "0", bool isevenpageisenabled = true, string state = "待完成")
+        public void updateCurrentListview(string pagerangetext = "1", string pagerangeselectindex = "0", bool isevenpageisenabled = true, string state = "wait")
         {
             if (fileNames.Count >= FileNameNumber)
             {
@@ -656,7 +656,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 SetWatermarkGridIsEnabled = "False";
                 AddFileVisibility = Visibility.Visible;
             }
-            updateListview("待确定");
+            updateListview("wait");
         }
 
         public void removepdffile(int index)
@@ -670,7 +670,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 AddFileVisibility = Visibility.Visible;
             }
 
-            updateListview("待确定");
+            updateListview("wait");
         }
 
 
@@ -705,7 +705,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 EnterSelectedContent(TemplateListName);
                 fileNames = filepath;
                 PDFFileCount();
-                updateListview("待确定");
+                updateListview("wait");
             }
         }
 

+ 27 - 27
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePictureToPDFDialogViewModel.cs

@@ -148,13 +148,13 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
                 fileNamesIndex = 0;
                 foreach (var filename in fileNames)
                 {
-                    ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "准备转换";
-                    ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "准备转换";
+                    ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "wait";
+                    ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "wait";
                     Image img = Image.FromFile(filename);
                     if (img == null)
                     {
-                        ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                        ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                        ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                        ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                         continue;
                     }
                     CPDFDocument topdfdoc = CPDFDocument.CreateDocument();
@@ -164,8 +164,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
                     topdfdoc.WriteToFilePath(savefilename(filename));
                     topdfdoc.Release();
                     string file_size = (((float)fileinfo.Length) / 1024).ToString() + " K";
-                    ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
-                    ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
+                    ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
+                    ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
                     fileNamesIndex++;
                 }
                 System.Diagnostics.Process.Start("Explorer", "/select," + savefilename(fileNames[0]));
@@ -175,21 +175,21 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
                 CPDFDocument topdfdoc = CPDFDocument.CreateDocument();
                 int pageindex = 0;
                 foreach (var filename in fileNames) {
-                    ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "准备转换";
-                    ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "准备转换";
+                    ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "wait";
+                    ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "wait";
                     Image img = Image.FromFile(filename);
                     if (img == null)
                     {
-                        ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                        ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                        ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                        ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                         continue;
                     }
                     FileInfo fileinfo = new FileInfo(filename);
                     JpegInsertPage(ref topdfdoc, filename, fileinfo,img.Width, img.Height, pageindex);
                     pageindex++;
                     string file_size = (((float)fileinfo.Length) / 1024).ToString() + " K";
-                    ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
-                    ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
+                    ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
+                    ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
                     fileNamesIndex++;
                 }
                 System.Diagnostics.Process.Start("Explorer", "/select," + savefilename(fileNames[0]));
@@ -226,8 +226,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
                     if (topdfdoc.IsLocked)
                     {
                         //未成功解密文档时,释放Document对象,返回
-                        ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                        ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                        ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                        ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                         fileNamesIndex++;
                         PictureToPDFGridIsEnabled = "True";
                         return;
@@ -236,21 +236,21 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
                 int pageindex = topdfdoc.PageCount;
                 foreach (var filename in fileNames)
                 {
-                    ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "准备转换";
-                    ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "准备转换";
+                    ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "wait";
+                    ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "wait";
                     Image img = Image.FromFile(filename);
                     if (img == null)
                     {
-                        ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
-                        ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "文件出错";
+                        ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "error";
+                        ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "error";
                         continue;
                     }
                     FileInfo fileinfo = new FileInfo(filename);
                     JpegInsertPage(ref topdfdoc, filename, fileinfo, img.Width, img.Height, pageindex);
                     pageindex++;
                     string file_size = (((float)fileinfo.Length) / 1024).ToString() + " K";
-                    ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
-                    ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "完成";
+                    ImagesDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
+                    ImagesCurrentDataTable.Rows[fileNamesIndex]["FileState"] = "complete";
                     fileNamesIndex++;
                 }
                 topdfdoc.WriteToLoadedPath();
@@ -302,7 +302,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
                 RemoveExcess(ref fileNames);
                 SetPictureToPDFGridIsEnabled = "True";
                 AddFileVisibility = Visibility.Collapsed;
-                updateListview("待确定");
+                updateListview("wait");
             }
         }
         public void addPicture(string filename)
@@ -312,7 +312,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
             RemoveExcess(ref fileNames);
             SetPictureToPDFGridIsEnabled = "True";
             AddFileVisibility = Visibility.Collapsed;
-            updateListview("待确定");
+            updateListview("wait");
         }
         /// <summary>
         /// 添加图片文件夹
@@ -336,7 +336,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
                     }
                 }
                 RemoveExcess(ref fileNames);
-                updateListview("待确定");
+                updateListview("wait");
                 SetPictureToPDFGridIsEnabled = "True";
                 AddFileVisibility = Visibility.Collapsed;
             }
@@ -358,7 +358,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
                 SetPictureToPDFGridIsEnabled = "False";
                 AddFileVisibility = Visibility.Visible;
             }
-            updateListview("待确定");
+            updateListview("wait");
         }
         public void removepdffile(int index)
         {
@@ -371,7 +371,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
                 AddFileVisibility = Visibility.Visible;
             }
 
-            updateListview("待确定");
+            updateListview("wait");
         }
 
         /// <summary>
@@ -436,7 +436,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
         /// 更新Currentlistview显示
         /// pagerangetext 自定义页面范围字符串  pagerangeselectindex combobox下拉索引(0全部页面 1奇数页 2偶数页 3自定义页面)isevenpageisenabled 偶数页状态 state 状态显示字符串
         /// </summary>
-        public void updateCurrentListview( string state = "待完成")
+        public void updateCurrentListview( string state = "wait")
         {
             if (fileNames.Count >= FileNameNumber)
             {
@@ -566,7 +566,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
             {
                 fileNames=filepath.ToList();
                 
-                updateListview("待确定");
+                updateListview("wait");
             }
         }
         #endregion

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

@@ -57,7 +57,7 @@
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
                                         <StackPanel Orientation="Horizontal">
-                                            <TextBlock Text="{Binding FileState}" Width="14" Height="14" TextDecorations="Underline" Foreground="Black"/>
+                                            <cus:BatchStatus StatusValue="{Binding FileState,Mode=TwoWay}" Width="16" Height="16" MaxStatusValue="{Binding MaxPageRange,Mode=TwoWay}"/>
                                             <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>

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

@@ -57,7 +57,7 @@
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
                                         <StackPanel Orientation="Horizontal">
-                                            <TextBlock Text="{Binding FileState}" Width="14" Height="14" TextDecorations="Underline" Foreground="Black"/>
+                                            <cus:BatchStatus StatusValue="{Binding FileState,Mode=TwoWay}" Width="16" Height="16" MaxStatusValue="{Binding MaxPageRange,Mode=TwoWay}"/>
                                             <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>

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

@@ -3,6 +3,7 @@
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:cus="clr-namespace:PDF_Office.CustomControl"
              xmlns:prism="http://prismlibrary.com/"
              prism:ViewModelLocator.AutoWireViewModel="True"
              xmlns:convert="clr-namespace:PDF_Office.DataConvert"
@@ -49,7 +50,7 @@
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
                                         <StackPanel Orientation="Horizontal">
-                                            <TextBlock Text="{Binding FileState}" Width="14" Height="14" TextDecorations="Underline" Foreground="Black"/>
+                                            <cus:BatchStatus StatusValue="{Binding FileState,Mode=TwoWay}" Width="16" Height="16" MaxStatusValue="{Binding MaxPageRange,Mode=TwoWay}"/>
                                             <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>

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

@@ -57,7 +57,7 @@
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
                                         <StackPanel Orientation="Horizontal">
-                                            <TextBlock Text="{Binding FileState}" Width="14" Height="14" TextDecorations="Underline" Foreground="Black"/>
+                                            <cus:BatchStatus StatusValue="{Binding FileState,Mode=TwoWay}" Width="16" Height="16" MaxStatusValue="{Binding MaxPageRange,Mode=TwoWay}"/>
                                             <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>

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

@@ -57,7 +57,7 @@
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
                                         <StackPanel Orientation="Horizontal">
-                                            <TextBlock Text="{Binding FileState}" Width="14" Height="14" TextDecorations="Underline" Foreground="Black"/>
+                                            <cus:BatchStatus StatusValue="{Binding FileState,Mode=TwoWay}" Width="16" Height="16" MaxStatusValue="{Binding MaxPageRange,Mode=TwoWay}"/>
                                             <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>

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

@@ -3,6 +3,7 @@
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:cus="clr-namespace:PDF_Office.CustomControl"
              xmlns:prism="http://prismlibrary.com/"
              prism:ViewModelLocator.AutoWireViewModel="True"
              xmlns:convert="clr-namespace:PDF_Office.DataConvert"
@@ -50,7 +51,7 @@
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
                                         <StackPanel Orientation="Horizontal">
-                                            <TextBlock Text="{Binding FileState}" Width="14" Height="14" TextDecorations="Underline" Foreground="Black"/>
+                                            <cus:BatchStatus StatusValue="{Binding FileState,Mode=TwoWay}" Width="16" Height="16" />
                                             <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>

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

@@ -3,6 +3,7 @@
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:cus="clr-namespace:PDF_Office.CustomControl"
              xmlns:prism="http://prismlibrary.com/"
              prism:ViewModelLocator.AutoWireViewModel="True"
              xmlns:convert="clr-namespace:PDF_Office.DataConvert"
@@ -49,7 +50,7 @@
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
                                         <StackPanel Orientation="Horizontal">
-                                            <TextBlock Text="{Binding FileState}" Width="14" Height="14" TextDecorations="Underline" Foreground="Black"/>
+                                            <cus:BatchStatus StatusValue="{Binding FileState,Mode=TwoWay}" Width="16" Height="16" />
                                             <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>

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

@@ -57,7 +57,7 @@
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
                                         <StackPanel Orientation="Horizontal">
-                                            <TextBlock Text="{Binding FileState}" Width="14" Height="14" TextDecorations="Underline" Foreground="Black"/>
+                                            <cus:BatchStatus StatusValue="{Binding FileState,Mode=TwoWay}" Width="16" Height="16" MaxStatusValue="{Binding MaxPageRange,Mode=TwoWay}"/>
                                             <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>

+ 3 - 2
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePictureToPDFDialog.xaml

@@ -3,6 +3,7 @@
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:cus="clr-namespace:PDF_Office.CustomControl"
              xmlns:prism="http://prismlibrary.com/" 
              xmlns:homepagetoolsdialogs="clr-namespace:PDF_Office.ViewModels.Dialog.HomePageToolsDialogs" 
              d:DataContext="{d:DesignInstance Type=homepagetoolsdialogs:HomePagePictureToPDFDialogViewModel}"
@@ -51,8 +52,8 @@
                             <GridViewColumn.CellTemplate>
                                 <DataTemplate>
                                     <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">
+                                            <cus:BatchStatus StatusValue="{Binding FileState,Mode=TwoWay}" Width="16" Height="16" MaxStatusValue="{Binding MaxPageRange,Mode=TwoWay}"/>
+                                            <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>

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

@@ -5,7 +5,7 @@
              prism:ViewModelLocator.AutoWireViewModel="True"
              xmlns:data ="clr-namespace:PDFSettings;assembly=PDFSettings"
                xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:watermark="clr-namespace:PDF_Office.ViewModels.EditTools.Watermark" d:DataContext="{d:DesignInstance Type=watermark:WatermarkTemplateListFileContentViewModel}"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              mc:Ignorable="d"
              d:DesignHeight="632"
              d:DesignWidth="260">

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

@@ -5,7 +5,7 @@
              prism:ViewModelLocator.AutoWireViewModel="True"
              xmlns:data ="clr-namespace:PDFSettings;assembly=PDFSettings"
                xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:watermark="clr-namespace:PDF_Office.ViewModels.EditTools.Watermark" d:DataContext="{d:DesignInstance Type=watermark:WatermarkTemplateListTextContentViewModel}"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              mc:Ignorable="d"
              d:DesignHeight="632"
              d:DesignWidth="260">