Browse Source

Merge branch 'dev' of http://git.kdan.cc:8865/Windows/PDFOffice_Windows_exe into dev

OYXH\oyxh 2 years ago
parent
commit
fb8dd02cc8
67 changed files with 8759 additions and 7573 deletions
  1. 11 9
      PDF Office/App.xaml
  2. BIN
      PDF Office/ComPDFKit.Desk.dll
  3. BIN
      PDF Office/ComPDFKit.Viewer.dll
  4. 2 0
      PDF Office/Helper/SettingHelper.cs
  5. 21 2
      PDF Office/Model/SettingsDialog/AnnotateModel.cs
  6. 1432 1346
      PDF Office/MultilingualResources/PDF Office.en.xlf
  7. 1432 1346
      PDF Office/MultilingualResources/PDF Office.zh-Hans.xlf
  8. 1432 1346
      PDF Office/MultilingualResources/PDF Office.zh-Hant.xlf
  9. 14 14
      PDF Office/Strings/HomePage/HomePage.en.resx
  10. 14 14
      PDF Office/Strings/HomePage/HomePage.zh-Hans.resx
  11. 14 14
      PDF Office/Strings/HomePage/HomePage.zh-Hant.resx
  12. 2315 2151
      PDF Office/Strings/MainPage/MainPage.Designer.cs
  13. 14 14
      PDF Office/Strings/MainPage/MainPage.en.resx
  14. 916 850
      PDF Office/Strings/MainPage/MainPage.resx
  15. 14 14
      PDF Office/Strings/MainPage/MainPage.zh-Hans.resx
  16. 14 14
      PDF Office/Strings/MainPage/MainPage.zh-Hant.resx
  17. 14 14
      PDF Office/Strings/Service/Service.en.resx
  18. 14 14
      PDF Office/Strings/Service/Service.zh-Hans.resx
  19. 14 14
      PDF Office/Strings/Service/Service.zh-Hant.resx
  20. 146 8
      PDF Office/Styles/TextBoxStyle.xaml
  21. 36 29
      PDF Office/Themes/Generic.xaml
  22. 12 2
      PDF Office/ViewModels/BOTA/OutLineControlViewModel.cs
  23. 18 1
      PDF Office/ViewModels/BottomToolContentViewModel.cs
  24. 44 0
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterCSVDialogViewModel.cs
  25. 156 0
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterExcelDialogViewModel.cs
  26. 10 0
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterHTMLDialogViewModel.cs
  27. 21 0
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterImgDialogViewModel.cs
  28. 11 0
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterPPTDialogViewModel.cs
  29. 11 0
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterRTFDialogViewModel.cs
  30. 11 0
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterTextDialogViewModel.cs
  31. 11 0
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterWordDialogViewModel.cs
  32. 97 19
      PDF Office/ViewModels/FillAndSign/PropertyPanel/ShapFillPropertyViewModel.cs
  33. 44 54
      PDF Office/ViewModels/PageEdit/PageEditContentViewModel.cs
  34. 46 0
      PDF Office/ViewModels/Tools/ToolsBarContentViewModel.cs
  35. 1 0
      PDF Office/Views/BOTA/BOTAContent.xaml
  36. 9 2
      PDF Office/Views/BOTA/BOTAContent.xaml.cs
  37. 59 56
      PDF Office/Views/BOTA/OutLineControl.xaml
  38. 28 3
      PDF Office/Views/BOTA/OutLineControl.xaml.cs
  39. 59 31
      PDF Office/Views/BottomToolContent.xaml
  40. 4 4
      PDF Office/Views/Dialog/ConverterDialogs/ConverterCSVDialog.xaml
  41. 1 1
      PDF Office/Views/Dialog/ConverterDialogs/ConverterCSVDialog.xaml.cs
  42. 13 13
      PDF Office/Views/Dialog/ConverterDialogs/ConverterExcelDialog.xaml
  43. 1 1
      PDF Office/Views/Dialog/ConverterDialogs/ConverterExcelDialog.xaml.cs
  44. 1 1
      PDF Office/Views/Dialog/ConverterDialogs/ConverterHTMLDialog.xaml
  45. 1 1
      PDF Office/Views/Dialog/ConverterDialogs/ConverterHTMLDialog.xaml.cs
  46. 2 2
      PDF Office/Views/Dialog/ConverterDialogs/ConverterImgDialog.xaml
  47. 1 1
      PDF Office/Views/Dialog/ConverterDialogs/ConverterImgDialog.xaml.cs
  48. 1 1
      PDF Office/Views/Dialog/ConverterDialogs/ConverterPPTDialog.xaml
  49. 1 1
      PDF Office/Views/Dialog/ConverterDialogs/ConverterPPTDialog.xaml.cs
  50. 1 1
      PDF Office/Views/Dialog/ConverterDialogs/ConverterRTFDialog.xaml
  51. 1 1
      PDF Office/Views/Dialog/ConverterDialogs/ConverterRTFDialog.xaml.cs
  52. 1 1
      PDF Office/Views/Dialog/ConverterDialogs/ConverterTextDialog.xaml
  53. 1 1
      PDF Office/Views/Dialog/ConverterDialogs/ConverterTextDialog.xaml.cs
  54. 3 3
      PDF Office/Views/Dialog/ConverterDialogs/ConverterWordDialog.xaml
  55. 1 1
      PDF Office/Views/Dialog/ConverterDialogs/ConverterWordDialog.xaml.cs
  56. 22 10
      PDF Office/Views/Dialog/SettingsDialog.xaml
  57. 1 1
      PDF Office/Views/Dialog/SignatureCreateDialog.xaml.cs
  58. 1 1
      PDF Office/Views/FillAndSign/PropertyPanel/ShapFillProperty.xaml
  59. 2 8
      PDF Office/Views/HomePanel/RecentFiles/RecentFilesContent.xaml
  60. 34 31
      PDF Office/Views/HomePanel/RecentFiles/RecentFilesContent.xaml.cs
  61. 0 1
      PDF Office/Views/MainWindow.xaml
  62. 0 39
      PDF Office/Views/MainWindow.xaml.cs
  63. 62 59
      PDF Office/Views/PageEdit/PageEditContent.xaml
  64. 80 4
      PDF Office/Views/PageEdit/PageEditContent.xaml.cs
  65. 4 4
      PDF Office/Views/Tools/ToolsBarContent.xaml
  66. 1 0
      PDF Office/Views/ViewContent.xaml
  67. 1 0
      PDFSettings/APPSettingProperties.cs

+ 11 - 9
PDF Office/App.xaml

@@ -3,6 +3,7 @@
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2"
+    xmlns:cus="clr-namespace:PDF_Master.CustomControl"
     xmlns:local="clr-namespace:PDF_Master"
     xmlns:prism="http://prismlibrary.com/"
     xmlns:sys="clr-namespace:System;assembly=mscorlib">
@@ -521,7 +522,7 @@
                                     <Setter TargetName="arrow" Property="Fill" Value="{StaticResource color.icon.arrow.gray.dis}" />
                                     <Setter TargetName="templateRoot" Property="Background" Value="{StaticResource color.field.bg.dis}" />
                                     <Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource color.field.border.dis}" />
-                                    
+
                                 </Trigger>
                             </ControlTemplate.Triggers>
                         </ControlTemplate>
@@ -607,7 +608,7 @@
                         <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
                     </Trigger>
                     <Trigger Property="IsEnabled" Value="false">
-                        <Setter  Property="Foreground" Value="{StaticResource color.field.text.dis}"/>
+                        <Setter Property="Foreground" Value="{StaticResource color.field.text.dis}" />
                     </Trigger>
                     <MultiTrigger>
                         <MultiTrigger.Conditions>
@@ -696,15 +697,16 @@
                         Style="{StaticResource ComboBoxToggleButton}" />
                     <Border
                         x:Name="border"
-                        Margin="3 1 8 1"
+                        Margin="3,1,8,1"
                         Background="{StaticResource TextBox.Static.Background}">
-                        <TextBox
+                        <cus:TextBoxEx
                             x:Name="PART_EditableTextBox"
-                            Margin="{TemplateBinding Padding}"
-                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
-                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Padding="0"
+                            ShowClose="False"
+                            VerticalAlignment="Center"
                             IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
-                            Style="{StaticResource ComboBoxEditableTextBox}" />
+                            PlaceholderText="1,3-5"
+                            Style="{StaticResource InnerTextBox}" />
                     </Border>
                 </Grid>
                 <ControlTemplate.Triggers>
@@ -752,7 +754,7 @@
                 <Style.Triggers>
                     <Trigger Property="IsEditable" Value="true">
                         <Setter Property="IsTabStop" Value="false" />
-                        <Setter Property="Padding" Value="2 3 5 3"/>
+                        <Setter Property="Padding" Value="2,3,5,3" />
                         <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
                     </Trigger>
                 </Style.Triggers>

BIN
PDF Office/ComPDFKit.Desk.dll


BIN
PDF Office/ComPDFKit.Viewer.dll


+ 2 - 0
PDF Office/Helper/SettingHelper.cs

@@ -48,6 +48,8 @@ namespace PDF_Master.Helper
             else
             {
                 OpenFileInfo fileInfo = new OpenFileInfo();
+                fileInfo.LastFitMode = Settings.Default.AppProperties.InitialVIew.ZoomMode;
+                fileInfo.LastViewMode = Settings.Default.AppProperties.InitialVIew.PageView;
                 fileInfo.FileName = Path.GetFileName(filePath);
                 fileInfo.FilePath = filePath;
                 fileInfo.IsGuidPDF = string.Equals(filePath, App.GuidPDFPath);

+ 21 - 2
PDF Office/Model/SettingsDialog/AnnotateModel.cs

@@ -137,6 +137,18 @@ namespace PDF_Master.Model.SettingsDialog
             }
         }
 
+        private Color arrowColor;   
+
+        public Color ArrowColor
+        {
+            get { return arrowColor; }
+            set
+            {
+                SetProperty(ref arrowColor, value);
+            }
+        }
+
+
         private TextAlignment textAlign;
 
         public TextAlignment TextAlign
@@ -189,6 +201,7 @@ namespace PDF_Master.Model.SettingsDialog
             this.CircleBorderColor = annote.CircleBorderColor;
             this.CircleFillColor = annote.CircleFillColor;
             this.LineColor = annote.LineColor;
+            this.ArrowColor = annote.ArrowColor;
             this.TextFontFamaily = annote.TextFontFamaily;
             this.AnchoredFamaily = annote.AnchoredFamaily;
             this.TextAlign = annote.TextAlign;
@@ -228,6 +241,10 @@ namespace PDF_Master.Model.SettingsDialog
             var AnnotLineAnnot = GetAnnotDefault(AnnotArgsType.AnnotLine);
             AnnotLineAnnot.BorderColor = this.LineColor;
             SetDefautAnnotProperties(AnnotLineAnnot);
+
+            var ArrowAnnot = GetAnnotDefault(AnnotArgsType.AnnotLine,"Arrow");
+            AnnotLineAnnot.BorderColor = this.LineColor;
+            SetDefautAnnotProperties(AnnotLineAnnot);
             Settings.Default.Save();
         }
 
@@ -240,9 +257,9 @@ namespace PDF_Master.Model.SettingsDialog
             Settings.Default.DefautAnnotProperties.SetAnnotProperty(annotProperty);
         }
 
-        private DefaultAnnotProperty GetAnnotDefault(AnnotArgsType annotArgsType)
+        private DefaultAnnotProperty GetAnnotDefault(AnnotArgsType annotArgsType,string saveKey="")
         {
-            var Annot = SettingHelper.GetAnnotDefaultProperty(annotArgsType);
+            var Annot = SettingHelper.GetAnnotDefaultProperty(annotArgsType,saveKey);
             if (Annot == null)
             {
                 Annot = new DefaultAnnotProperty();
@@ -264,6 +281,7 @@ namespace PDF_Master.Model.SettingsDialog
             annote.CircleBorderColor = this.CircleBorderColor;
             annote.CircleFillColor = this.CircleFillColor;
             annote.LineColor = this.LineColor;
+            annote.ArrowColor = this.ArrowColor;
             annote.TextFontFamaily = this.TextFontFamaily;
             annote.AnchoredFamaily = this.AnchoredFamaily;
             annote.TextAlign = this.TextAlign;
@@ -290,6 +308,7 @@ namespace PDF_Master.Model.SettingsDialog
             this.CircleBorderColor = annote.CircleBorderColor;
             this.CircleFillColor = annote.CircleFillColor;
             this.LineColor = annote.LineColor;
+            this.ArrowColor = annote.ArrowColor;
             this.TextFontFamaily = annote.TextFontFamaily;
             this.AnchoredFamaily = annote.AnchoredFamaily;
             this.TextAlign = annote.TextAlign;

File diff suppressed because it is too large
+ 1432 - 1346
PDF Office/MultilingualResources/PDF Office.en.xlf


File diff suppressed because it is too large
+ 1432 - 1346
PDF Office/MultilingualResources/PDF Office.zh-Hans.xlf


File diff suppressed because it is too large
+ 1432 - 1346
PDF Office/MultilingualResources/PDF Office.zh-Hant.xlf


+ 14 - 14
PDF Office/Strings/HomePage/HomePage.en.resx

@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
 </root>

+ 14 - 14
PDF Office/Strings/HomePage/HomePage.zh-Hans.resx

@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
 </root>

+ 14 - 14
PDF Office/Strings/HomePage/HomePage.zh-Hant.resx

@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
 </root>

File diff suppressed because it is too large
+ 2315 - 2151
PDF Office/Strings/MainPage/MainPage.Designer.cs


+ 14 - 14
PDF Office/Strings/MainPage/MainPage.en.resx

@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
 </root>

File diff suppressed because it is too large
+ 916 - 850
PDF Office/Strings/MainPage/MainPage.resx


+ 14 - 14
PDF Office/Strings/MainPage/MainPage.zh-Hans.resx

@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
 </root>

+ 14 - 14
PDF Office/Strings/MainPage/MainPage.zh-Hant.resx

@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
 </root>

+ 14 - 14
PDF Office/Strings/Service/Service.en.resx

@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
 </root>

+ 14 - 14
PDF Office/Strings/Service/Service.zh-Hans.resx

@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
 </root>

+ 14 - 14
PDF Office/Strings/Service/Service.zh-Hant.resx

@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
 </root>

+ 146 - 8
PDF Office/Styles/TextBoxStyle.xaml

@@ -1,4 +1,7 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<ResourceDictionary
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:cus="clr-namespace:PDF_Master.CustomControl">
 
     <Style x:Key="PagesView_txtContext" TargetType="{x:Type TextBlock}">
         <Setter Property="FontFamily" Value="Segoe UI" />
@@ -78,21 +81,156 @@
         </Style.Triggers>
     </Style>
 
+    <!--  没有颜色变化的文本框  -->
+    <Style x:Key="InnerTextBox" TargetType="{x:Type cus:TextBoxEx}">
+        <Setter Property="Background" Value="{StaticResource color.field.bg.def}" />
+        <Setter Property="BorderBrush" Value="{StaticResource color.field.border.norm}" />
+        <Setter Property="Foreground" Value="Black" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="HorizontalContentAlignment" Value="Left" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
+        <Setter Property="Height" Value="32" />
+        <Setter Property="Padding" Value="3,0" />
+        <Setter Property="CornerRadius" Value="4" />
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type cus:TextBoxEx}">
+                    <Border
+                        x:Name="border"
+                        Width="{TemplateBinding Width}"
+                        Height="{TemplateBinding Height}"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}"
+                        CornerRadius="{TemplateBinding CornerRadius}"
+                        SnapsToDevicePixels="True">
+                        <Grid Margin="{TemplateBinding Padding}">
+                            <TextBlock
+                                x:Name="placeholder"
+                                Padding="{TemplateBinding Padding}"
+                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                                FontSize="{TemplateBinding FontSize}"
+                                Foreground="{TemplateBinding PlaceholderForeground}"
+                                Text="{TemplateBinding PlaceholderText}"
+                                Visibility="Collapsed" />
+                            <Grid VerticalAlignment="Center">
+                                <Grid.ColumnDefinitions>
+                                    <ColumnDefinition Width="*" />
+                                    <ColumnDefinition Width="auto" />
+                                </Grid.ColumnDefinitions>
+                                <ScrollViewer
+                                    x:Name="PART_ContentHost"
+                                    Margin="0"
+                                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
+                                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
+                                    Focusable="false"
+                                    Foreground="{TemplateBinding Foreground}"
+                                    HorizontalScrollBarVisibility="Hidden"
+                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
+                                    Style="{x:Null}"
+                                    VerticalScrollBarVisibility="Hidden" />
+                                <Button
+                                    Name="PART_BtnClear"
+                                    Grid.Column="1"
+                                    Width="16"
+                                    Height="16"
+                                    Margin="9,0"
+                                    HorizontalAlignment="Right"
+                                    VerticalAlignment="Center"
+                                    Background="Transparent"
+                                    BorderThickness="0"
+                                    Style="{StaticResource NoColorBtn}"
+                                    Visibility="Collapsed">
+                                    <Path
+                                        Data="M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11.5303 5.53038L9.06069 8L11.5303 10.4696L10.4697 11.5303L8.00002 9.06066L5.53033 11.5303L4.46967 10.4697L6.93936 8L4.46967 5.53033L5.53033 4.46967L8.00002 6.93934L10.4697 4.46971L11.5303 5.53038Z"
+                                        Fill="#CED0D4"
+                                        Stretch="Uniform" />
+                                </Button>
+                            </Grid>
+                        </Grid>
+                    </Border>
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="IsEnabled" Value="false">
+                            <Setter TargetName="border" Property="Opacity" Value="0.56" />
+                        </Trigger>
+                        <Trigger Property="Text" Value="{x:Null}">
+                            <Setter TargetName="placeholder" Property="Visibility" Value="Visible" />
+                        </Trigger>
+                        <Trigger Property="IsMouseOver" Value="True">
+                            <Setter TargetName="PART_BtnClear" Property="Visibility" Value="Visible" />
+                        </Trigger>
+                        <Trigger Property="IsFocused" Value="True">
+                            <Setter TargetName="PART_BtnClear" Property="Visibility" Value="Visible" />
+                        </Trigger>
+                        <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                                <Condition Property="IsFocused" Value="True" />
+                                <Condition Property="IsError" Value="True" />
+                            </MultiTrigger.Conditions>
+                            <MultiTrigger.Setters>
+                                <Setter TargetName="border" Property="Effect" Value="{StaticResource shadow.error.s}" />
+                            </MultiTrigger.Setters>
+                        </MultiTrigger>
+                        <Trigger Property="IsError" Value="True">
+                            <Setter Property="BorderBrush" Value="{StaticResource color.sys.border.error}" />
+                        </Trigger>
+                        <Trigger Property="Text" Value="">
+                            <Setter TargetName="placeholder" Property="Visibility" Value="Visible" />
+                            <Setter TargetName="PART_BtnClear" Property="Visibility" Value="Collapsed" />
+                        </Trigger>
+                        <Trigger Property="ShowClose" Value="False">
+                            <Setter TargetName="PART_BtnClear" Property="Visibility" Value="Collapsed" />
+                        </Trigger>
+                        <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                                <Condition Property="Text" Value="" />
+                                <Condition Property="IsMouseOver" Value="True" />
+                            </MultiTrigger.Conditions>
+                            <MultiTrigger.Setters>
+                                <Setter TargetName="PART_BtnClear" Property="Visibility" Value="Collapsed" />
+                            </MultiTrigger.Setters>
+                        </MultiTrigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+        <Style.Triggers>
+            <MultiTrigger>
+                <MultiTrigger.Conditions>
+                    <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
+                    <Condition Property="IsSelectionActive" Value="false" />
+                </MultiTrigger.Conditions>
+                <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
+            </MultiTrigger>
+        </Style.Triggers>
+    </Style>
+
     <Style x:Key="Print_normalTxtStyle" TargetType="TextBox">
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate>
-                    <Grid Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
-                        <Border BorderBrush="{StaticResource color.field.border.norm}" Background="{StaticResource color.field.bg.def}" BorderThickness="1" CornerRadius="4">
-                            <ScrollViewer x:Name="PART_ContentHost" Focusable="false"
-                                          HorizontalScrollBarVisibility="Hidden"
-                                          VerticalScrollBarVisibility="Hidden"
-                                          VerticalAlignment="Center" MinHeight="22" Margin="8,0,0,0" Opacity="1" />
+                    <Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
+                        <Border
+                            Background="{StaticResource color.field.bg.def}"
+                            BorderBrush="{StaticResource color.field.border.norm}"
+                            BorderThickness="1"
+                            CornerRadius="4">
+                            <ScrollViewer
+                                x:Name="PART_ContentHost"
+                                MinHeight="22"
+                                Margin="8,0,0,0"
+                                VerticalAlignment="Center"
+                                Focusable="false"
+                                HorizontalScrollBarVisibility="Hidden"
+                                Opacity="1"
+                                VerticalScrollBarVisibility="Hidden" />
                         </Border>
                     </Grid>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsEnabled" Value="False">
-                            <Setter Property="Opacity" Value="0.6"></Setter>
+                            <Setter Property="Opacity" Value="0.6" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>

+ 36 - 29
PDF Office/Themes/Generic.xaml

@@ -48,6 +48,8 @@
         <Setter Property="BorderThickness" Value="1" />
         <Setter Property="FocusVisualStyle" Value="{x:Null}" />
         <Setter Property="Height" Value="32" />
+        <Setter Property="Padding" Value="3 0"/>
+        <Setter Property="CornerRadius" Value="4" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type cus:TextBoxEx}">
@@ -63,7 +65,6 @@
                         <Grid Margin="{TemplateBinding Padding}">
                             <TextBlock
                                 x:Name="placeholder"
-                                Margin="{Binding ElementName=PART_ContentHost, Path=Margin}"
                                 Padding="{TemplateBinding Padding}"
                                 HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                 VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
@@ -71,33 +72,40 @@
                                 Foreground="{TemplateBinding PlaceholderForeground}"
                                 Text="{TemplateBinding PlaceholderText}"
                                 Visibility="Collapsed" />
-
-                            <ScrollViewer
-                                x:Name="PART_ContentHost"
-                                Margin="4,5,25,5"
-                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
-                                Focusable="false"
-                                Foreground="{TemplateBinding Foreground}"
-                                HorizontalScrollBarVisibility="Hidden"
-                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
-                                Style="{x:Null}"
-                                VerticalScrollBarVisibility="Hidden" />
-                            <Button
-                                Name="PART_BtnClear"
-                                Width="16"
-                                Height="16"
-                                Margin="9,0"
-                                HorizontalAlignment="Right"
-                                VerticalAlignment="Center"
-                                Background="Transparent"
-                                BorderThickness="0"
-                                Style="{StaticResource NoColorBtn}"
-                                Visibility="Collapsed">
-                                <Path
-                                    Data="M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11.5303 5.53038L9.06069 8L11.5303 10.4696L10.4697 11.5303L8.00002 9.06066L5.53033 11.5303L4.46967 10.4697L6.93936 8L4.46967 5.53033L5.53033 4.46967L8.00002 6.93934L10.4697 4.46971L11.5303 5.53038Z"
-                                    Fill="#CED0D4"
-                                    Stretch="Uniform" />
-                            </Button>
+                            <Grid VerticalAlignment="Center">
+                                <Grid.ColumnDefinitions>
+                                    <ColumnDefinition Width="*" />
+                                    <ColumnDefinition Width="auto" />
+                                </Grid.ColumnDefinitions>
+                                <ScrollViewer
+                                    x:Name="PART_ContentHost"
+                                    Margin="0"
+                                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
+                                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
+                                    Focusable="false"
+                                    Foreground="{TemplateBinding Foreground}"
+                                    HorizontalScrollBarVisibility="Hidden"
+                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
+                                    Style="{x:Null}"
+                                    VerticalScrollBarVisibility="Hidden" />
+                                <Button
+                                    Name="PART_BtnClear"
+                                    Grid.Column="1"
+                                    Width="16"
+                                    Height="16"
+                                    Margin="9,0"
+                                    HorizontalAlignment="Right"
+                                    VerticalAlignment="Center"
+                                    Background="Transparent"
+                                    BorderThickness="0"
+                                    Style="{StaticResource NoColorBtn}"
+                                    Visibility="Collapsed">
+                                    <Path
+                                        Data="M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11.5303 5.53038L9.06069 8L11.5303 10.4696L10.4697 11.5303L8.00002 9.06066L5.53033 11.5303L4.46967 10.4697L6.93936 8L4.46967 5.53033L5.53033 4.46967L8.00002 6.93934L10.4697 4.46971L11.5303 5.53038Z"
+                                        Fill="#CED0D4"
+                                        Stretch="Uniform" />
+                                </Button>
+                            </Grid>
                         </Grid>
                     </Border>
                     <ControlTemplate.Triggers>
@@ -134,7 +142,6 @@
                         </Trigger>
                         <Trigger Property="ShowClose" Value="False">
                             <Setter TargetName="PART_BtnClear" Property="Visibility" Value="Collapsed" />
-                            <Setter TargetName="PART_ContentHost" Property="Margin" Value="4,5" />
                         </Trigger>
                         <MultiTrigger>
                             <MultiTrigger.Conditions>

+ 12 - 2
PDF Office/ViewModels/BOTA/OutLineControlViewModel.cs

@@ -179,7 +179,7 @@ namespace PDF_Master.ViewModels.BOTA
                 }
             }
 
-            if (list.Count>0)
+            if (list.Count > 0)
             {
                 //如果是第一条数据不允许点击降级
                 list[0].CanDown = false;
@@ -589,6 +589,12 @@ namespace PDF_Master.ViewModels.BOTA
         public WriteableBitmap LoadPreview(OutlineNode outlineNode,int Width,int Height)
         {
             CPDFPage page = PDFViewer.Document.PageAtIndex(Convert.ToInt32(outlineNode.PageIndex) - 1);
+
+            if (page==null)
+            {
+                return null;
+            }
+
             Size size = PDFViewer.Document.GetPageSize(Convert.ToInt32(outlineNode.PageIndex) - 1);
             //当前对象添加时没创建默认对象,SDK会返回(-1,-1)
             if (outlineNode.PositionX == -1)
@@ -703,7 +709,7 @@ namespace PDF_Master.ViewModels.BOTA
                 }
                 else
                 {
-                    node.CanDown = false;
+                    node.CanDown = true;
                 }
             }
             return node;
@@ -765,6 +771,10 @@ namespace PDF_Master.ViewModels.BOTA
             {
                 return list.Last();
             }
+            if (list.Count<=0)
+            {
+                return null;
+            }
             int index = list.IndexOf(outline);
             if (index >= 0)
             {

+ 18 - 1
PDF Office/ViewModels/BottomToolContentViewModel.cs

@@ -657,7 +657,24 @@ namespace PDF_Master.ViewModels
             if (e.Key == "Zoom")
             {
                 CurrentZoom = (double)e.Value * 100;
-                SelectedIndex = -1;
+
+                switch (PDFViewer.ModeFit)
+                {
+                    case FitMode.FitWidth:
+                        SelectedIndex = 1;
+                        break;
+                    case FitMode.FitHeight:
+                        SelectedIndex = 2;
+                        break;
+                    case FitMode.FitSize:
+                        SelectedIndex = 0;
+                        break;
+                    case FitMode.FitFree:
+                        SelectedIndex = -1;
+                        break;
+                    default:
+                        break;
+                }
             }
             if (OpenFileInfo != null)
             {

+ 44 - 0
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterCSVDialogViewModel.cs

@@ -61,12 +61,56 @@ namespace PDF_Master.ViewModels.Dialog.ConverterDialogs
             }
         }
 
+        private string T_eachForm;
 
+        public string T_EachForm
+        {
+            get { return T_eachForm; }
+            set
+            {
+                SetProperty(ref T_eachForm, value);
+            }
+        }
+        private string T_aDocument;
+
+        public string T_ADocument
+        {
+            get { return T_aDocument; }
+            set
+            {
+                SetProperty(ref T_aDocument, value);
+            }
+        }
+        private string T_settings;
+
+        public string T_Settings
+        {
+            get { return T_settings; }
+            set
+            {
+                SetProperty(ref T_settings, value);
+            }
+        }
+
+        private string T_pageRange;
+
+        public string T_PageRange
+        {
+            get { return T_pageRange; }
+            set
+            {
+                SetProperty(ref T_pageRange, value);
+            }
+        }
         private void IntString()
         {
             T_Title = App.MainPageLoader.GetString("Convert_PDFToCSVTitle");
             T_YES = App.MainPageLoader.GetString("Convert_Yes");
             T_No = App.MainPageLoader.GetString("Convert_No");
+            T_EachForm = App.MainPageLoader.GetString("Convert_PDFToCSVEachForm");
+            T_ADocument = App.MainPageLoader.GetString("Convert_PDFToCSVADocment");
+            T_Settings = App.MainPageLoader.GetString("Convert_PDFToCSVSettings");
+            T_PageRange = App.MainPageLoader.GetString("Convert_PDFPageRange");
         }
 
         #endregion

+ 156 - 0
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterExcelDialogViewModel.cs

@@ -22,7 +22,162 @@ namespace PDF_Master.ViewModels.Dialog.ConverterDialogs
 {
     public class ConverterExcelDialogViewModel : BindableBase, IDialogAware
     {
+        #region 文案
 
+        private string T_title;
+
+        public string T_Title
+        {
+            get { return T_title; }
+            set
+            {
+                SetProperty(ref T_title, value);
+            }
+        }
+
+        private string T_yes;
+
+        public string T_YES
+        {
+            get { return T_yes; }
+            set
+            {
+                SetProperty(ref T_yes, value);
+            }
+        }
+
+        private string T_no;
+
+        public string T_No
+        {
+            get { return T_no; }
+            set
+            {
+                SetProperty(ref T_no, value);
+            }
+        }
+
+        private string T_onlyTables;
+
+        public string T_OnlyTables
+        {
+            get { return T_onlyTables; }
+            set
+            {
+                SetProperty(ref T_onlyTables, value);
+            }
+        }
+
+        private string T_allContents;
+
+        public string T_AllContents
+        {
+            get { return T_allContents; }
+            set
+            {
+                SetProperty(ref T_allContents, value);
+            }
+        }
+
+        private string T_eachPageAllContents;
+
+        public string T_EachPageAllContents
+        {
+            get { return T_eachPageAllContents; }
+            set
+            {
+                SetProperty(ref T_eachPageAllContents, value);
+            }
+        }
+        private string T_fileAllContents;
+
+        public string T_FileAllContents
+        {
+            get { return T_fileAllContents; }
+            set
+            {
+                SetProperty(ref T_fileAllContents, value);
+            }
+        }
+        private string T_eachTableOnlyTables;
+
+        public string T_EachTableOnlyTables
+        {
+            get { return T_eachTableOnlyTables; }
+            set
+            {
+                SetProperty(ref T_eachTableOnlyTables, value);
+            }
+        }
+        private string T_eachPageOnlyTables;
+
+        public string T_EachPageOnlyTables
+        {
+            get { return T_eachPageOnlyTables; }
+            set
+            {
+                SetProperty(ref T_eachPageOnlyTables, value);
+            }
+        }
+        private string T_fileOnlyTables;
+
+        public string T_FileOnlyTables
+        {
+            get { return T_fileOnlyTables; }
+            set
+            {
+                SetProperty(ref T_fileOnlyTables, value);
+            }
+        }
+        private string T_onlyText;
+
+        public string T_OnlyText
+        {
+            get { return T_onlyText; }
+            set
+            {
+                SetProperty(ref T_onlyText, value);
+            }
+        }
+        private string T_settings;
+
+        public string T_Settings
+        {
+            get { return T_settings; }
+            set
+            {
+                SetProperty(ref T_settings, value);
+            }
+        }
+        private string T_pageRange;
+
+        public string T_PageRange
+        {
+            get { return T_pageRange; }
+            set
+            {
+                SetProperty(ref T_pageRange, value);
+            }
+        }
+
+        private void IntString()
+        {
+            T_Title = App.MainPageLoader.GetString("Convert_PDFToExcelTitle");
+            T_YES = App.MainPageLoader.GetString("Convert_Yes");
+            T_No = App.MainPageLoader.GetString("Convert_No");
+            T_AllContents = App.MainPageLoader.GetString("Convert_PDFToExcelAllContents");
+            T_EachPageAllContents = App.MainPageLoader.GetString("Convert_PDFToExcelAllContentsEachPage");
+            T_FileAllContents = App.MainPageLoader.GetString("Convert_PDFToExcelAllContentsFile");
+            T_OnlyTables = App.MainPageLoader.GetString("Convert_PDFToExcelAllOnlyTables");
+            T_EachTableOnlyTables = App.MainPageLoader.GetString("Convert_PDFToExcelAllOnlyTablesEachTable");
+            T_EachPageOnlyTables = App.MainPageLoader.GetString("Convert_PDFToExcelAllOnlyTablesEachPage");
+            T_FileOnlyTables = App.MainPageLoader.GetString("Convert_PDFToExcelAllOnlyTablesFile");
+            T_OnlyText= App.MainPageLoader.GetString("Convert_PDFToExcelOnlyText");
+            T_Settings = App.MainPageLoader.GetString("Convert_PDFToExcelSettings");
+            T_PageRange = App.MainPageLoader.GetString("Convert_PDFPageRange");
+
+        }
+        #endregion 参数和属性
         public string Title => "";
 
         public event Action<IDialogResult> RequestClose;
@@ -145,6 +300,7 @@ namespace PDF_Master.ViewModels.Dialog.ConverterDialogs
 
         public ConverterExcelDialogViewModel(IDialogService dialogService)
         {
+            IntString();
             CancelCommand = new DelegateCommand(cancel);
             ConverterCommnad = new DelegateCommand(converter);
             RadioButtonCommand = new DelegateCommand<string>(radiobutton);

+ 10 - 0
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterHTMLDialogViewModel.cs

@@ -56,12 +56,22 @@ namespace PDF_Master.ViewModels.Dialog.ConverterDialogs
             }
         }
 
+        private string T_pageRange;
 
+        public string T_PageRange
+        {
+            get { return T_pageRange; }
+            set
+            {
+                SetProperty(ref T_pageRange, value);
+            }
+        }
         private void IntString()
         {
             T_Title = App.MainPageLoader.GetString("Convert_PDFToHTMLTitle");
             T_YES = App.MainPageLoader.GetString("Convert_Yes");
             T_No = App.MainPageLoader.GetString("Convert_No");
+            T_PageRange = App.MainPageLoader.GetString("Convert_PDFPageRange");
         }
 
         #endregion

+ 21 - 0
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterImgDialogViewModel.cs

@@ -57,12 +57,33 @@ namespace PDF_Master.ViewModels.Dialog.ConverterDialogs
             }
         }
 
+        private string T_pageRange;
 
+        public string T_PageRange
+        {
+            get { return T_pageRange; }
+            set
+            {
+                SetProperty(ref T_pageRange, value);
+            }
+        }
+        private string T_format;
+
+        public string T_Format
+        {
+            get { return T_format; }
+            set
+            {
+                SetProperty(ref T_format, value);
+            }
+        }
         private void IntString()
         {
             T_Title = App.MainPageLoader.GetString("Convert_PDFToImageTitle");
             T_YES = App.MainPageLoader.GetString("Convert_Yes");
             T_No = App.MainPageLoader.GetString("Convert_No");
+            T_PageRange = App.MainPageLoader.GetString("Convert_PDFPageRange");
+            T_Format= App.MainPageLoader.GetString("Convert_PDFToImageFormat");
         }
 
         #endregion

+ 11 - 0
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterPPTDialogViewModel.cs

@@ -13,6 +13,7 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
 using System.Linq;
+using System.Windows.Controls;
 using System.Windows.Forms;
 using DialogResult = Prism.Services.Dialogs.DialogResult;
 
@@ -55,12 +56,22 @@ namespace PDF_Master.ViewModels.Dialog.ConverterDialogs
             }
         }
 
+        private string T_pageRange;
 
+        public string T_PageRange
+        {
+            get { return T_pageRange; }
+            set
+            {
+                SetProperty(ref T_pageRange, value);
+            }
+        }
         private void IntString()
         {
             T_Title = App.MainPageLoader.GetString("Convert_PDFToPPTTitle");
             T_YES = App.MainPageLoader.GetString("Convert_Yes");
             T_No = App.MainPageLoader.GetString("Convert_No");
+            T_PageRange = App.MainPageLoader.GetString("Convert_PDFPageRange");
         }
 
         #endregion

+ 11 - 0
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterRTFDialogViewModel.cs

@@ -13,6 +13,7 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
 using System.Linq;
+using System.Windows.Controls;
 using System.Windows.Forms;
 using DialogResult = Prism.Services.Dialogs.DialogResult;
 
@@ -55,13 +56,23 @@ namespace PDF_Master.ViewModels.Dialog.ConverterDialogs
                 SetProperty(ref T_no, value);
             }
         }
+        private string T_pageRange;
 
+        public string T_PageRange
+        {
+            get { return T_pageRange; }
+            set
+            {
+                SetProperty(ref T_pageRange, value);
+            }
+        }
 
         private void IntString()
         {
             T_Title = App.MainPageLoader.GetString("Convert_PDFToRTFTitle");
             T_YES = App.MainPageLoader.GetString("Convert_Yes");
             T_No = App.MainPageLoader.GetString("Convert_No");
+            T_PageRange = App.MainPageLoader.GetString("Convert_PDFPageRange");
         }
 
         #endregion

+ 11 - 0
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterTextDialogViewModel.cs

@@ -13,6 +13,7 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
 using System.Linq;
+using System.Windows.Controls;
 using System.Windows.Forms;
 using static Dropbox.Api.Sharing.ListFileMembersIndividualResult;
 using DialogResult = Prism.Services.Dialogs.DialogResult;
@@ -55,13 +56,23 @@ namespace PDF_Master.ViewModels.Dialog.ConverterDialogs
                 SetProperty(ref T_no, value);
             }
         }
+        private string T_pageRange;
 
+        public string T_PageRange
+        {
+            get { return T_pageRange; }
+            set
+            {
+                SetProperty(ref T_pageRange, value);
+            }
+        }
 
         private void IntString()
         {
             T_Title = App.MainPageLoader.GetString("Convert_PDFToTextTitle");
             T_YES = App.MainPageLoader.GetString("Convert_Yes");
             T_No = App.MainPageLoader.GetString("Convert_No");
+            T_PageRange = App.MainPageLoader.GetString("Convert_PDFPageRange");
         }
 
         #endregion

+ 11 - 0
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterWordDialogViewModel.cs

@@ -14,6 +14,7 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
 using System.Linq;
+using System.Windows.Controls;
 using System.Windows.Forms;
 using DialogResult = Prism.Services.Dialogs.DialogResult;
 
@@ -56,12 +57,22 @@ namespace PDF_Master.ViewModels.Dialog.ConverterDialogs
             }
         }
 
+        private string T_pageRange;
 
+        public string T_PageRange
+        {
+            get { return T_pageRange; }
+            set
+            {
+                SetProperty(ref T_pageRange, value);
+            }
+        }
         private void IntString()
         {
             T_Title = App.MainPageLoader.GetString("Convert_PDFToWordTitle");
             T_YES = App.MainPageLoader.GetString("Convert_Yes");
             T_No = App.MainPageLoader.GetString("Convert_No");
+            T_PageRange = App.MainPageLoader.GetString("Convert_PDFPageRange");
         }
 
         #endregion

+ 97 - 19
PDF Office/ViewModels/FillAndSign/PropertyPanel/ShapFillPropertyViewModel.cs

@@ -23,6 +23,7 @@ using PDF_Master.Model.AnnotPanel;
 using PDFSettings;
 using PDF_Master.ViewModels.Tools.AnnotManager;
 using Prism.Common;
+using ComPDFKitViewer.PdfViewer;
 
 namespace PDF_Master.ViewModels.FillAndSign.PropertyPanel
 {
@@ -35,7 +36,26 @@ namespace PDF_Master.ViewModels.FillAndSign.PropertyPanel
         public List<List<Point>> updatapath = new List<List<Point>>();
         private Geometry dataPath = null;
         private bool IsFillAndSign = false;
-        public string Shape = "";
+        public string shape = "";
+        public string Shape
+        {
+            get { return shape; }
+            set
+            {
+                SetProperty(ref shape, value);
+            }
+        }
+
+        public string shapeType = "";
+        public string ShapeType
+        {
+            get { return shapeType; }
+            set
+            {
+                SetProperty(ref shapeType, value);
+            }
+        }
+
         public Geometry DataPath
         {
             get { return dataPath; }
@@ -61,13 +81,13 @@ namespace PDF_Master.ViewModels.FillAndSign.PropertyPanel
                     fillAndSignContentViewModel.SelectColor = value;
                     //if (FillAndSignContentViewModel.IsEdit)
                     {
-                        PropertyPanel.UpdateAnnotAAttrib(AnnotAttrib.Thickness, LineWidth * lineWidthMultiple);
+                        // PropertyPanel.UpdateAnnotAAttrib(AnnotAttrib.Thickness, LineWidth * lineWidthMultiple);
                         PropertyPanel.UpdateAnnotAAttrib(AnnotAttrib.Color, (selectColor as SolidColorBrush).Color);
                     }
                     //else
                     {
-                        if(IsFillAndSign) { fillAndSignContentViewModel.SetStamp(); }
-                        
+                        if (IsFillAndSign) { fillAndSignContentViewModel.SetStamp(); }
+
                     }
 
                 }
@@ -94,7 +114,7 @@ namespace PDF_Master.ViewModels.FillAndSign.PropertyPanel
                     //else
                     {
                         if (IsFillAndSign) { fillAndSignContentViewModel.SetStamp(); }
-                        
+
                     }
 
                 }
@@ -106,7 +126,9 @@ namespace PDF_Master.ViewModels.FillAndSign.PropertyPanel
         public bool IsMultiSelected
         {
             get { return _isMultiSelected; }
-            set => SetProperty(ref _isMultiSelected, value);
+            set { SetProperty(ref _isMultiSelected, value);
+            if(value) { ShapeType= "General Properties"; }
+            }
         }
 
         private bool _isSelected = false;
@@ -115,7 +137,7 @@ namespace PDF_Master.ViewModels.FillAndSign.PropertyPanel
             get { return _isSelected; }
             set => SetProperty(ref _isSelected, value);
         }
-        private double lineWidthMultiple=1;
+        private double lineWidthMultiple = 1;
         private double lineWidth = 1;
         public double LineWidth
         {
@@ -136,13 +158,13 @@ namespace PDF_Master.ViewModels.FillAndSign.PropertyPanel
 
                         PropertyPanel.UpdateAnnotAAttrib(AnnotAttrib.Thickness, LineWidth * lineWidthMultiple);
                         //fillAndSignContentViewModel.LineWidthMultiple = lineWidthMultiple;
-                         //PropertyPanel.UpdateAnnotAAttrib(AnnotAttrib.Path, updatapath);
+                        //PropertyPanel.UpdateAnnotAAttrib(AnnotAttrib.Path, updatapath);
 
                     }
                     // else
                     {
                         if (IsFillAndSign) { fillAndSignContentViewModel.SetStamp(); }
-                        
+
                     }
 
                 }
@@ -336,7 +358,7 @@ namespace PDF_Master.ViewModels.FillAndSign.PropertyPanel
 
                 case "DotShape":
                     {
-                        fillAndSignContentViewModel.LineWidthMultiple = 5;
+                        //fillAndSignContentViewModel.LineWidthMultiple = 5;
                         EllipseGeometry circlePath = new EllipseGeometry();
                         circlePath.RadiusX = 2.4;
                         circlePath.RadiusY = 2.4;
@@ -374,10 +396,37 @@ namespace PDF_Master.ViewModels.FillAndSign.PropertyPanel
             //if (isFromToolsBtn == false)
             //    PropertyPanel.AnnotTypeChangedInvoke(this, changeData);
 
+        }
+        private string UPDateShapeType(string tag)
+        {
+            switch (tag)
+            {
+                case "DotShape":
+                    return "Dot";
+                    break;
+                case "LineShape":
+                    return "Line";
+                    break;
+                case "RectShape":
+                    return "Rectangle";
+                    break;
+                case "ForkShape":
+                    return "Fork";
+                    break;
+                case "HookShape":
+                    return "Hook";
+                    break;
+                    default:
+                    return "General Properties";
+                    break;
+            }
+
+
         }
 
-        private void InitSharpsType(string tag)
+        private void InitShapesType(string tag)
         {
+            ShapeType = UPDateShapeType(tag);
             fillAndSignContentViewModel.LineWidthMultiple = 1;
             switch (tag)
             {
@@ -412,7 +461,7 @@ namespace PDF_Master.ViewModels.FillAndSign.PropertyPanel
 
                 case "DotShape":
                     {
-                        fillAndSignContentViewModel.LineWidthMultiple = 5;
+                        //fillAndSignContentViewModel.LineWidthMultiple = 5;
                         EllipseGeometry circlePath = new EllipseGeometry();
                         circlePath.RadiusX = 2.4;
                         circlePath.RadiusY = 2.4;
@@ -488,7 +537,34 @@ namespace PDF_Master.ViewModels.FillAndSign.PropertyPanel
             }
 
         }
-
+
+        private void BindingPDFViewerHandler()
+        {
+            //来自PDFViewer的响应事件
+            if (fillAndSignContentViewModel.PDFViewer != null)
+            {
+
+
+                fillAndSignContentViewModel.PDFViewer.AnnotActiveHandler -= PDFViewer_AnnotActiveHandler;
+                fillAndSignContentViewModel.PDFViewer.AnnotActiveHandler += PDFViewer_AnnotActiveHandler;
+            }
+        }
+        private void UnBindingPDFViewerHandler()
+        {
+            if (fillAndSignContentViewModel.PDFViewer != null)
+            {
+                fillAndSignContentViewModel.PDFViewer.AnnotActiveHandler -= PDFViewer_AnnotActiveHandler;
+            }
+        }
+        private void PDFViewer_AnnotActiveHandler(object sender, AnnotAttribEvent e)
+        {
+            if (e != null) { }
+            else
+            {
+                if (fillAndSignContentViewModel.PDFViewer.MouseMode == MouseModes.AnnotCreate) { IsSelected = true; }
+            }
+
+        }
         public bool IsNavigationTarget(NavigationContext navigationContext)
         {
             return true;
@@ -496,7 +572,7 @@ namespace PDF_Master.ViewModels.FillAndSign.PropertyPanel
 
         public void OnNavigatedFrom(NavigationContext navigationContext)
         {
-
+            UnBindingPDFViewerHandler();
         }
 
         public void OnNavigatedTo(NavigationContext navigationContext)
@@ -508,7 +584,8 @@ namespace PDF_Master.ViewModels.FillAndSign.PropertyPanel
             bool isFillAndSign = false;
             navigationContext.Parameters.TryGetValue<bool>("IsFillAndSign", out isFillAndSign);
             IsFillAndSign = isFillAndSign;
-            InitSharpsType(shape);
+            InitShapesType(shape);
+
             //FillAndSignContentViewModel.IsEdit = false;
             if (PropertyPanel != null)
             {
@@ -537,7 +614,7 @@ namespace PDF_Master.ViewModels.FillAndSign.PropertyPanel
                 {
                     GetAnnotProperty(shape);
                 }
-
+                BindingPDFViewerHandler();
             }
         }
 
@@ -555,11 +632,12 @@ namespace PDF_Master.ViewModels.FillAndSign.PropertyPanel
                         if (annot.PageIndex == point.PageIndex && annot.AnnotIndex == point.AnnotIndex)
                         {
                             lineWidthMultiple = 1;
-                            if (point.Shape == "DotShape") {
+                            if (point.Shape == "DotShape")
+                            {
                                 lineWidthMultiple = 5;
                             }
-                            InitSharpsType(point.Shape);
-                            Shape=point.Shape;
+                            InitShapesType(point.Shape);
+                            Shape = point.Shape;
                         }
                     }
                 }

+ 44 - 54
PDF Office/ViewModels/PageEdit/PageEditContentViewModel.cs

@@ -57,7 +57,7 @@ namespace PDF_Master.ViewModels.PageEdit
         #endregion
 
 
-        private CPDFViewer PDFViewer;
+        public CPDFViewer PDFViewer;
 
         private ViewContentViewModel viewContentViewModel;
 
@@ -140,14 +140,16 @@ namespace PDF_Master.ViewModels.PageEdit
             set
             {
                 SetProperty(ref listSelecedIndex, value);
-                //显示页面范围选择控件
-                TbPageRangeVisibility = Visibility.Visible;
-                TbPageRange = (ListSelectedIndex + 1).ToString();
-                TxtPageInputVisibility = Visibility.Collapsed;
-                if (IsBOTAThumb == Visibility.Visible && PDFViewer != null)
+                if (!IsSelectFormSelf&&value>=0)
                 {
-                    PDFViewer.GoToPage(listSelecedIndex);
+                    //显示页面范围选择控件
+                    TxtPageInputVisibility = Visibility.Visible;
+                    TbPageRange = (ListSelectedIndex + 1).ToString();
                 }
+                //if (IsBOTAThumb == Visibility.Visible && PDFViewer != null)
+                //{
+                //    PDFViewer.GoToPage(listSelecedIndex);
+                //}
             }
         }
 
@@ -175,10 +177,11 @@ namespace PDF_Master.ViewModels.PageEdit
             set
             {
                 SetProperty(ref comboxSelectIndex, value);
+                //隐藏tb页面范围显示控件
+                TxtPageInputVisibility = Visibility.Collapsed;
                 //选中指定的页面范围
                 SuitPageRange(comboxSelectIndex);
-                //隐藏tb页面范围显示控件
-                TbPageRangeVisibility = Visibility.Collapsed;
+
 
             }
         }
@@ -210,10 +213,6 @@ namespace PDF_Master.ViewModels.PageEdit
             set
             {
                 SetProperty(ref tbPageRange, value);
-                if (string.IsNullOrEmpty(TbPageRange))
-                {
-                    TbPageRange = "请输入范围";
-                }
             }
         }
 
@@ -347,6 +346,11 @@ namespace PDF_Master.ViewModels.PageEdit
         //选中的页面集合
         private List<int> selectedPageList = new List<int>();
 
+        /// <summary>
+        /// 是否是下拉框选项改变引起的选项变更事件
+        /// </summary>
+        private bool IsSelectFormSelf = false;
+
 
         #endregion
 
@@ -358,16 +362,6 @@ namespace PDF_Master.ViewModels.PageEdit
         /// </summary>
         public DelegateCommand<object> PreviewKeyDown { get; set; }
 
-        /// <summary>
-        /// 响应键盘回车事件
-        /// </summary>
-        public DelegateCommand<object> KeyDown { get; set; }
-
-        /// <summary>
-        ///文本框失去焦点事件
-        /// </summary>
-        public DelegateCommand<object> LostFocusCommand { get; set; }
-
 
         /// <summary>
         /// 粘贴
@@ -445,6 +439,8 @@ namespace PDF_Master.ViewModels.PageEdit
         public DelegateCommand ShowPageSizeCommand { get; set; }
 
         public DelegateCommand ClearSelectedCommand { get; set; }
+
+
         #endregion
 
         public PageEditContentViewModel(IDialogService dialogService, IEventAggregator eventAggregator)
@@ -459,8 +455,6 @@ namespace PDF_Master.ViewModels.PageEdit
             //绑定命令
             SelectionChangedCommand = new DelegateCommand<object>(SelectionChangedEvent);
             PreviewKeyDown = new DelegateCommand<object>(PreviewKeyDownEvent);
-            KeyDown = new DelegateCommand<object>(KeyDownEvent);
-            LostFocusCommand = new DelegateCommand<object>(lostfocus);
 
             SplitCommand = new DelegateCommand(SplitCommandEvent);
             InsertCommand = new DelegateCommand<object>(InsertCommandEvent);
@@ -814,10 +808,6 @@ namespace PDF_Master.ViewModels.PageEdit
             PageEditItems.Insert(preiIndex, targetitem);
             PageEditItems.Insert(laterIndex, sourceitem);
 
-            //PageEditItems.Remove(targetitem);
-            //PageEditItems.Insert(laterIndex, sourceitem);
-            //PageEditItems.Remove(sourceitem);
-            //PageEditItems.Insert(preiIndex, targetitem);
             return true;
         }
 
@@ -924,11 +914,16 @@ namespace PDF_Master.ViewModels.PageEdit
         /// <param name="e"></param>
         private void SelectionChangedEvent(object e)
         {
+            if (IsSelectFormSelf)
+            {
+                //避免频繁的触发该事件
+                return;
+            }
             var args = e as SelectionChangedEventArgs;
             //下下策 从UI控件获取所有选项的集合
             var listbox = args.OriginalSource as ListBox;
 
-            if (TbPageRangeVisibility == Visibility.Visible && args != null)
+            if (TxtPageInputVisibility == Visibility.Visible && args != null)
             {
                 selectedPageList = new List<int>();
                 for (int i = 0; i < listbox.SelectedItems.Count; i++)
@@ -994,28 +989,18 @@ namespace PDF_Master.ViewModels.PageEdit
                 return;
             }
 
+
+            //枚举 过滤所有不合理的输入
             if (args.Key != Key.Enter && args.Key != Key.Back && args.Key != Key.OemComma && args.Key != Key.OemMinus && args.Key != Key.Subtract && !((args.Key >= Key.D0 && args.Key <= Key.D9) || (args.Key >= Key.NumPad0 && args.Key <= Key.NumPad9)))
             {
                 args.Handled = true;
             }
-        }
 
-        /// <summary>
-        /// 响应回车确认事件
-        /// </summary>
-        /// <param name="e"></param>
-        private void KeyDownEvent(object e)
-        {
-            var args = e as KeyEventArgs;
-            if (args == null)
-            {
-                return;
-            }
             if (args.Key == Key.Enter)
             {
                 List<int> TargetPageIndexs = new List<int>();
                 var result = CommonHelper.GetPagesInRange(ref TargetPageIndexs, (args.OriginalSource as TextBox).Text, PDFViewer.Document.PageCount, new char[] { ',', ',' }, new char[] { '-' });
-                if (!result && ComboxSelectIndex == 5)
+                if (!result)
                 {
                     AlertsMessage alertsMessage = new AlertsMessage();
                     alertsMessage.ShowDialog("", "请输入有效范围", "OK");
@@ -1040,7 +1025,7 @@ namespace PDF_Master.ViewModels.PageEdit
         /// 失去焦点后选中页面
         /// </summary>
         /// <param name="obj"></param>
-        private void lostfocus(object obj)
+        public void lostfocus(object obj)
         {
             var args = obj as RoutedEventArgs;
             if (args == null || (args.OriginalSource as TextBox) == null)
@@ -2059,7 +2044,7 @@ namespace PDF_Master.ViewModels.PageEdit
         /// 选中目标页面范围的页面
         /// </summary>
         /// <param name="index">页面范围选中项索引</param>
-        private void SuitPageRange(int index)
+        private async void SuitPageRange(int index)
         {
             List<int> pageRange = new List<int>();
             switch (index)
@@ -2111,24 +2096,24 @@ namespace PDF_Master.ViewModels.PageEdit
                     }
                     break;
                 case 5://自定义
-
-                    //await Task.Delay(20);
-                    //TbPageRange = "1,3";
+                    TxtPageInputVisibility = Visibility.Visible;
+                        await Task.Delay(30);
+                        TbPageRange = "";
                     break;
                 default:
                     break;
             }
             if (pageRange.Count > 0)
             {
+                //避免在下面的过程中频繁触发SelectionChanged事件
+                IsSelectFormSelf = true;
                 NotifyUIToRefresh(pageRange);
+                IsSelectFormSelf = false;
             }
             else
             {
-                if (index != 5)
-                {
-                    //没有符合条件时 清空选中项
-                    ListSelectedIndex = -1;
-                }
+                //没有符合条件时 清空选中项
+                ListSelectedIndex = -1;
             }
         }
 
@@ -2338,7 +2323,7 @@ namespace PDF_Master.ViewModels.PageEdit
                 }
             }
             //通知UI选中Items
-            //NotifyUIToRefresh(selectedPages);
+            NotifyUIToRefresh(selectedPages);
             //刷新页码和图片
             ReloadAfterOption(true, true, new Tuple<int, int>(0, PDFViewer.Document.PageCount));
 
@@ -2374,6 +2359,11 @@ namespace PDF_Master.ViewModels.PageEdit
             var source = PageEditItems[sourceindex];
             PageEditItems.RemoveAt(sourceindex);
             PageEditItems.Insert(targetindex, source);
+
+            if(PDFViewer.CurrentIndex==sourceindex)
+            {
+                PDFViewer.GoToPage(targetindex);
+            }
             return true;
         }
 

+ 46 - 0
PDF Office/ViewModels/Tools/ToolsBarContentViewModel.cs

@@ -51,11 +51,57 @@ namespace PDF_Master.ViewModels.Tools
             }
         }
 
+        private string T_compress;
 
+        public string T_Compress
+        {
+            get { return T_compress; }
+            set
+            {
+                SetProperty(ref T_compress, value);
+            }
+        }
+
+        private string T_security;
+
+        public string T_Security
+        {
+            get { return T_security; }
+            set
+            {
+                SetProperty(ref T_security, value);
+            }
+        }
+
+        private string T_merge;
+
+        public string T_Merge
+        {
+            get { return T_merge; }
+            set
+            {
+                SetProperty(ref T_merge, value);
+            }
+        }
+
+        private string T_crop;
+
+        public string T_Crop
+        {
+            get { return T_crop; }
+            set
+            {
+                SetProperty(ref T_crop, value);
+            }
+        }
         private void InitString()
         {
             T_SetPassWord = App.MainPageLoader.GetString("Security_SetPassword");
             T_RemovePassword = App.MainPageLoader.GetString("Security_RemovePassword");
+            T_Compress= App.MainPageLoader.GetString("ToolsBar_Compress");
+            T_Security = App.MainPageLoader.GetString("ToolsBar_Security");
+            T_Merge = App.MainPageLoader.GetString("ToolsBar_Merge");
+            T_Crop = App.MainPageLoader.GetString("ToolsBar_Crop");
         }
 
         #endregion

+ 1 - 0
PDF Office/Views/BOTA/BOTAContent.xaml

@@ -91,6 +91,7 @@
                 Width="48"
                 Height="48"
                 Style="{StaticResource BOTATab}"
+                IsVisibleChanged="TabItemThumbnail_IsVisibleChanged"
                 Visibility="{Binding ElementName=MenuThumbnail, Path=IsChecked, Converter={StaticResource BoolToVisibleConvert}, Mode=TwoWay}">
                 <customcontrol:IconAndTextTabItem.NormalPathIcon>
                     <PathGeometry Figures="M15 9V17H5L5 3L9 3V7C9 8.10457 9.89543 9 11 9H15ZM14.1716 7H11V3.82843L12.5858 5.41421L14.1716 7ZM17 8V17C17 18.1046 16.1046 19 15 19H5C3.89543 19 3 18.1046 3 17V3C3 1.89543 3.89543 1 5 1H10H10.1716C10.702 1 11.2107 1.21071 11.5858 1.58579L14 4L16.4142 6.41421C16.7893 6.78929 17 7.29799 17 7.82843V8Z" />

+ 9 - 2
PDF Office/Views/BOTA/BOTAContent.xaml.cs

@@ -54,9 +54,16 @@ namespace PDF_Master.Views.BOTA
             }
         }
 
-        private void CloseBOTACommand_Executed(object sender, ExecutedRoutedEventArgs e)
+        private void TabItemThumbnail_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
         {
-           
+            var item = sender as TabItem;
+            if(item!=null&&item.IsSelected)
+            {
+                if(!(bool)e.NewValue)
+                {
+                    (this.DataContext as BOTAContentViewModel).viewContentViewModel.OpenBOTA = false;
+                }
+            }
         }
     }
 }

+ 59 - 56
PDF Office/Views/BOTA/OutLineControl.xaml

@@ -10,12 +10,68 @@
     xmlns:model="clr-namespace:PDF_Master.Model.BOTA"
     xmlns:mainPageLoader="clr-namespace:PDF_Master.Strings.MainPage"
     d:DataContext="{d:DesignInstance Type=bota:OutLineControlViewModel}"
+    LostFocus="UserControl_LostFocus"
+    KeyDown="UserControl_KeyDown"
     mc:Ignorable="d">
     <UserControl.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
                 <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/OutLineItemStyle.xaml" />
             </ResourceDictionary.MergedDictionaries>
+
+            <ContextMenu x:Key="OutLineItemMenu">
+                <MenuItem
+                                        x:Name="AddMenu"
+                                        Click="AddMenu_Click"
+                                        Header="{x:Static mainPageLoader:MainPage.Outline_Add}" />
+                <MenuItem
+                                        x:Name="AddChlidMenu"
+                                        Click="AddChlidMenu_Click"
+                                        Header="{x:Static mainPageLoader:MainPage.Outline_AddSub}" />
+                <MenuItem
+                                        x:Name="AddParentMenu"
+                                        Click="AddParentMenu_Click"
+                                        Header="{x:Static mainPageLoader:MainPage.Outline_AddLevel}"
+                                        IsEnabled="{Binding CanAddParent}" />
+
+                <MenuItem
+                                        x:Name="DeleteMenu"
+                                        Click="DeleteMenu_Click"
+                                        Header="{x:Static mainPageLoader:MainPage.Outline_Delete}" />
+
+                <MenuItem
+                                        x:Name="RenameMenu"
+                                        Click="RenameMenu_Click"
+                                        Header="{x:Static mainPageLoader:MainPage.Outline_Rename}" />
+                <MenuItem
+                                        x:Name="ChangeDestinationMenu"
+                                        Click="ChangeDestinationMenu_Click"
+                                        Header="{x:Static mainPageLoader:MainPage.Outline_Change}" />
+
+                <MenuItem
+                                        x:Name="UpgradeMenu"
+                                        Click="UpgradeMenu_Click"
+                                        Header="{x:Static mainPageLoader:MainPage.Outline_Up}"
+                                        IsEnabled="{Binding CanUp}" />
+                <MenuItem
+                                        x:Name="DowngradeMenu"
+                                        Click="DowngradeMenu_Click"
+                                        Header="{x:Static mainPageLoader:MainPage.Outline_Down}"
+                                        IsEnabled="{Binding CanDown}" />
+            </ContextMenu>
+            <!--  圆角 https://wpf.2000things.com/2012/05/11/556-clipping-to-a-border-using-an-opacity-mask  -->
+            <ToolTip x:Key="OutLineItemToolTip"
+                                        Width="320"
+                                        Height="120"
+                                        Closed="ToolTip_Closed"
+                                        Opened="ToolTip_Opened"
+                                        Style="{StaticResource ErrorRoundedTooltip}">
+                <customcontrol:CustomImageControl
+                                            Width="320"
+                                            Height="120"
+                                            HorizontalAlignment="Stretch"
+                                            VerticalAlignment="Stretch" />
+            </ToolTip>
         </ResourceDictionary>
     </UserControl.Resources>
     <Grid Background="Transparent">
@@ -167,64 +223,8 @@
                 <TreeView.ItemTemplate>
                     <HierarchicalDataTemplate DataType="{x:Type model:OutlineNode}" ItemsSource="{Binding Path=Chlidlist}">
                         <Grid>
-                            <Grid.ContextMenu>
-                                <ContextMenu>
-                                    <MenuItem
-                                        x:Name="AddMenu"
-                                        Click="AddMenu_Click"
-                                        Header="{x:Static mainPageLoader:MainPage.Outline_Add}" />
-                                    <MenuItem
-                                        x:Name="AddChlidMenu"
-                                        Click="AddChlidMenu_Click"
-                                        Header="{x:Static mainPageLoader:MainPage.Outline_AddSub}" />
-                                    <MenuItem
-                                        x:Name="AddParentMenu"
-                                        Click="AddParentMenu_Click"
-                                        Header="{x:Static mainPageLoader:MainPage.Outline_AddLevel}"
-                                        IsEnabled="{Binding CanAddParent}" />
 
-                                    <MenuItem
-                                        x:Name="DeleteMenu"
-                                        Click="DeleteMenu_Click"
-                                        Header="{x:Static mainPageLoader:MainPage.Outline_Delete}" />
-
-                                    <MenuItem
-                                        x:Name="RenameMenu"
-                                        Click="RenameMenu_Click"
-                                        Header="{x:Static mainPageLoader:MainPage.Outline_Rename}" />
-                                    <MenuItem
-                                        x:Name="ChangeDestinationMenu"
-                                        Click="ChangeDestinationMenu_Click"
-                                        Header="{x:Static mainPageLoader:MainPage.Outline_Change}" />
-
-                                    <MenuItem
-                                        x:Name="UpgradeMenu"
-                                        Click="UpgradeMenu_Click"
-                                        Header="{x:Static mainPageLoader:MainPage.Outline_Up}"
-                                        IsEnabled="{Binding CanUp}" />
-                                    <MenuItem
-                                        x:Name="DowngradeMenu"
-                                        Click="DowngradeMenu_Click"
-                                        Header="{x:Static mainPageLoader:MainPage.Outline_Down}"
-                                        IsEnabled="{Binding CanDown}" />
-                                </ContextMenu>
-                            </Grid.ContextMenu>
                             <Grid x:Name="ContentPanel">
-                                <Grid.ToolTip>
-                                    <!--  圆角 https://wpf.2000things.com/2012/05/11/556-clipping-to-a-border-using-an-opacity-mask  -->
-                                    <ToolTip
-                                        Width="320"
-                                        Height="120"
-                                        Closed="ToolTip_Closed"
-                                        Opened="ToolTip_Opened"
-                                        Style="{StaticResource ErrorRoundedTooltip}">
-                                        <customcontrol:CustomImageControl
-                                            Width="320"
-                                            Height="120"
-                                            HorizontalAlignment="Stretch"
-                                            VerticalAlignment="Stretch" />
-                                    </ToolTip>
-                                </Grid.ToolTip>
                                 <Grid.ColumnDefinitions>
                                     <ColumnDefinition />
                                     <ColumnDefinition Width="auto" />
@@ -273,6 +273,7 @@
                                     x:Name="ReName"
                                     HorizontalAlignment="Left"
                                     VerticalAlignment="Center"
+                                    TextWrapping="WrapWithOverflow"
                                     IsVisibleChanged="ReName_IsVisibleChanged"
                                     KeyDown="ReName_KeyDown"
                                     Style="{StaticResource TextBoxStyleRadius}" />
@@ -282,6 +283,8 @@
                 </TreeView.ItemTemplate>
                 <TreeView.ItemContainerStyle>
                     <Style BasedOn="{StaticResource OutLineItemStyle}" TargetType="TreeViewItem">
+                        <Setter Property="ContextMenu" Value="{StaticResource  OutLineItemMenu}" />
+                        <Setter Property="ToolTip" Value="{StaticResource  OutLineItemToolTip}" />
                         <EventSetter Event="PreviewMouseLeftButtonUp" Handler="TreeViewItem_PreviewMouseLeftButtonUp" />
                         <EventSetter Event="PreviewMouseLeftButtonDown" Handler="TreeViewItem_PreviewMouseLeftButtonDown" />
                     </Style>

+ 28 - 3
PDF Office/Views/BOTA/OutLineControl.xaml.cs

@@ -449,9 +449,12 @@ namespace PDF_Master.Views.BOTA
             int ItemIndex = (DataContext as OutLineControlViewModel).InsertChlidOutline((sender as MenuItem).DataContext as OutlineNode);
             OutlineView.UpdateLayout();
             OutlineNode node = (DataContext as OutLineControlViewModel).FindOutlineFromList((DataContext as OutLineControlViewModel).Outlinelist, (OutlineView.SelectedItem as OutlineNode).Chlidlist[ItemIndex], ItemIndex);
-            node.IsSelected = true;
-            ReNameOutlineNode = node;
-            node.IsReName = Visibility.Collapsed;
+            if (node != null)
+            {
+                node.IsSelected = true;
+                ReNameOutlineNode = node;
+                node.IsReName = Visibility.Collapsed;
+            }
         }
 
         private void OutlineView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
@@ -466,5 +469,27 @@ namespace PDF_Master.Views.BOTA
                 OutlineView.Focus();
             }
         }
+
+        private void UserControl_LostFocus(object sender, RoutedEventArgs e)
+        {
+            OutlineNode outlineNode = OutlineView.SelectedItem as OutlineNode;
+            if (outlineNode != null)
+            {
+                outlineNode.IsSelected = false;
+            }
+        }
+
+        private void UserControl_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.Key == Key.Escape)
+            {
+                OutlineNode outlineNode = OutlineView.SelectedItem as OutlineNode;
+                if (outlineNode != null)
+                {
+                    outlineNode.IsSelected = false; 
+                    e.Handled = true;
+                }
+            }
+        }
     }
 }

File diff suppressed because it is too large
+ 59 - 31
PDF Office/Views/BottomToolContent.xaml


+ 4 - 4
PDF Office/Views/Dialog/ConverterDialogs/ConverterCSVDialog.xaml

@@ -34,7 +34,7 @@
                                 Height="20"
                                 Style="{StaticResource PropertyHeaderLv2}"
                                 HorizontalAlignment="Left"
-                                Text="CSV Settings" />
+                                Text="{Binding T_Settings}" />
                         <StackPanel Margin="0,10,0,0">
                             <RadioButton
                                 IsChecked="True"
@@ -43,7 +43,7 @@
                                 Style="{StaticResource RadioButtonStyleText}"
                                 Command="{Binding RadioButtonCommand}"
                                 CommandParameter="{Binding ElementName=ForEachPageRadioBtn, Path=Name}">
-                                <TextBlock Text="Create worksheets for each &#13; form" />
+                                <TextBlock Text="{Binding T_EachForm}" />
                             </RadioButton>
                             <RadioButton
                                 
@@ -52,7 +52,7 @@
                                 Style="{StaticResource RadioButtonStyleText}"
                                 Command="{Binding RadioButtonCommand}"
                                 CommandParameter="{Binding ElementName=OnlyTableRadioBtn, Path=Name}">
-                                <TextBlock Text="Create a single worksheet for &#13; a document" />
+                                <TextBlock Text="{Binding T_ADocument}" />
                             </RadioButton>
                         </StackPanel>
                         <StackPanel Margin="0,18,0,0" Orientation="Vertical">
@@ -60,7 +60,7 @@
                                 Height="20"
                                 HorizontalAlignment="Left"
                                 Style="{StaticResource PropertyHeaderLv2}"
-                                Text="Page Range" />
+                                Text="{Binding T_PageRange}" />
                             <cus:WritableComboBox
                                 x:Name="PageRangeComboBox"
                                 Width="228"

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterCSVDialog.xaml.cs

@@ -38,7 +38,7 @@ namespace PDF_Master.Views.Dialog.ConverterDialogs
             if (PageRangeComboBox.CurrentPage)
             {
                 ComboBoxItem comboBoxItem = new ComboBoxItem();
-                comboBoxItem.Content = "当前页面";
+                comboBoxItem.Content = App.MainPageLoader.GetString("WritableComboBox_CustomRange"); 
                 PageRangeComboBox.writableComboBox.Items.Insert(1, comboBoxItem);
                 
             }

+ 13 - 13
PDF Office/Views/Dialog/ConverterDialogs/ConverterExcelDialog.xaml

@@ -16,7 +16,7 @@
              prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
              prism:ViewModelLocator.AutoWireViewModel="True"
              mc:Ignorable="d">
-    <cus:DialogContent Header="PDF转Excel">
+    <cus:DialogContent Header="{Binding T_Title}">
         <cus:DialogContent.Content>
             <Grid Grid.Row="1">
                 <Grid.ColumnDefinitions>
@@ -29,28 +29,28 @@
                 <Grid Grid.Column="1">
                     <StackPanel Orientation="Vertical" Margin="16,2,0,0">
                         <StackPanel Orientation="Vertical">
-                            <TextBlock Text="ExcelExcel Workbook Settings" Height="20"  Style="{StaticResource PropertyHeaderLv2}"/>
+                            <TextBlock Text="{Binding T_Settings}" Height="20"  Style="{StaticResource PropertyHeaderLv2}"/>
                             <StackPanel Orientation="Vertical" Margin="0,10,0,0">
                                 <RadioButton Name="AnyContentRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=AnyContentRadioBtn,Path=Name}" IsChecked="True"
                                 Style="{StaticResource RadioButtonStyleText}">
-                                    <TextBlock Text="All contents"/>
+                                    <TextBlock Text="{Binding T_AllContents}"/>
                                 </RadioButton>
                                 <ComboBox Margin="0,8,0,0" Width="326" Height="32" HorizontalAlignment="Left" IsEnabled="{Binding ElementName=AnyContentRadioBtn,Path=IsChecked}"  SelectedIndex="{Binding AnyContentSelectIndex}" >
-                                    <ComboBoxItem Content="为每个页面创建工作表 "/>
-                                    <ComboBoxItem Content="为文档创建单个工作表"/>
+                                    <ComboBoxItem Content="{Binding T_EachPageAllContents}"/>
+                                    <ComboBoxItem Content="{Binding T_FileAllContents}"/>
                                 </ComboBox>
                                 <RadioButton Margin="0,8,0,0" Name="OnlyTableRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=OnlyTableRadioBtn,Path=Name}" Padding="8,0,0,0"
                                 Style="{StaticResource RadioButtonStyleText}">
-                                    <TextBlock Text="Only Tables"/>
+                                    <TextBlock Text="{Binding T_OnlyTables}"/>
                                 </RadioButton>
                                 <ComboBox Name="OnlyTableComboBox"  Margin="0,8,0,0" Width="326" Height="32" HorizontalAlignment="Left" IsEnabled="{Binding ElementName=OnlyTableRadioBtn,Path=IsChecked}"  SelectedIndex="{Binding OnlyTableSelectIndex}">
-                                    <ComboBoxItem Content="支持一个表格提取到单独的工作表"/>
-                                    <ComboBoxItem Content="支持按页面提取表格到单独的工作表"/>
-                                    <ComboBoxItem Content="支持将所有表格提取到一个工作表"/>
+                                    <ComboBoxItem Content="{Binding T_EachTableOnlyTables}"/>
+                                    <ComboBoxItem Content="{Binding T_EachPageOnlyTables}"/>
+                                    <ComboBoxItem Content="{Binding T_FileOnlyTables}"/>
                                 </ComboBox>
                                 <RadioButton Margin="0,8,0,0" Name="OnlyTextRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=OnlyTextRadioBtn,Path=Name}" Padding="8,0,0,0"
                                 Style="{StaticResource RadioButtonStyleText}">
-                                    <TextBlock Text="Only Text"></TextBlock>
+                                    <TextBlock Text="{Binding T_OnlyText}"></TextBlock>
                                 </RadioButton>
                             </StackPanel>
                         </StackPanel>
@@ -69,7 +69,7 @@
                                 </ComboBox>
                             </StackPanel>
                             <StackPanel Orientation="Vertical" Margin="0,18,0,0">
-                                <TextBlock Text="Page Range" Height="20"  HorizontalAlignment="Left"  Style="{StaticResource PropertyHeaderLv2}"/>
+                                <TextBlock Text="{Binding T_PageRange}" Height="20"  HorizontalAlignment="Left"  Style="{StaticResource PropertyHeaderLv2}"/>
                                 <cus:WritableComboBox x:Name="PageRangeComboBox" Margin="0,10,0,0" Width="326" Height="32" HorizontalAlignment="Left" IsCurrentPage="True" Text="{Binding PageRangeText, Mode=TwoWay}"  SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange}" Loaded="PageRangeComboBox_Loaded">
                                     <i:Interaction.Triggers>
                                         <i:EventTrigger EventName="SelectionChanged">
@@ -101,14 +101,14 @@
                     Height="32"
                     Margin="0,0,16,0"
                     HorizontalAlignment="Right"
-                    Content="取消" 
+                    Content="{Binding T_No}" 
                     Command="{Binding CancelCommand}" Style="{StaticResource btn.sec}"/>
                 <Button
                     Width="98"
                     Height="32"
                     Margin="124,0"
                     HorizontalAlignment="Right"
-                    Content="转换" 
+                    Content="{Binding T_YES}" 
                     Command = "{Binding ConverterCommnad}" Style="{StaticResource Btn.cta}"/>
             </Grid>
         </cus:DialogContent.BottmBar>

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterExcelDialog.xaml.cs

@@ -38,7 +38,7 @@ namespace PDF_Master.Views.Dialog.ConverterDialogs
             if (PageRangeComboBox.CurrentPage)
             {
                 ComboBoxItem comboBoxItem = new ComboBoxItem();
-                comboBoxItem.Content = "当前页面";
+                comboBoxItem.Content = App.MainPageLoader.GetString("WritableComboBox_CustomRange");
                 PageRangeComboBox.writableComboBox.Items.Insert(1, comboBoxItem);
             }
         }

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterHTMLDialog.xaml

@@ -42,7 +42,7 @@
                             </ComboBox>
                         </StackPanel>
                         <StackPanel Orientation="Vertical" Margin="0,0,0,0" >
-                            <TextBlock Text="Page Range" Height="20"  Style="{StaticResource PropertyHeaderLv2}" HorizontalAlignment="Left"/>
+                            <TextBlock Text="{Binding T_PageRange}" Height="20"  Style="{StaticResource PropertyHeaderLv2}" HorizontalAlignment="Left"/>
                             <cus:WritableComboBox x:Name="PageRangeComboBox" Margin="0,10,0,0" Width="228" Height="32" HorizontalAlignment="Left" IsCurrentPage="True" Text="{Binding PageRangeText, Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange}" SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}" Loaded="PageRangeComboBox_Loaded">
                                 <i:Interaction.Triggers>
                                     <i:EventTrigger EventName="SelectionChanged">

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterHTMLDialog.xaml.cs

@@ -38,7 +38,7 @@ namespace PDF_Master.Views.Dialog.ConverterDialogs
             if (PageRangeComboBox.CurrentPage)
             {
                 ComboBoxItem comboBoxItem = new ComboBoxItem();
-                comboBoxItem.Content = "当前页面";
+                comboBoxItem.Content = App.MainPageLoader.GetString("WritableComboBox_CustomRange");
                 PageRangeComboBox.writableComboBox.Items.Insert(1, comboBoxItem);
 
             }

+ 2 - 2
PDF Office/Views/Dialog/ConverterDialogs/ConverterImgDialog.xaml

@@ -35,7 +35,7 @@
                                 Style="{StaticResource PropertyHeaderLv2}"
                                 Height="20"
                                 HorizontalAlignment="Left"
-                                Text="File Type" />
+                                Text="{Binding T_Format}" />
                             <ComboBox
                                 Name="ImageTypeComboBox"
                                 Width="228"
@@ -60,7 +60,7 @@
                                 Style="{StaticResource PropertyHeaderLv2}"
                                 Height="20"
                                 HorizontalAlignment="Left"
-                                Text="Page Range" />
+                                Text="{Binding T_PageRange}" />
                             <cus:WritableComboBox
                                 x:Name="PageRangeComboBox"
                                 Width="228"

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterImgDialog.xaml.cs

@@ -39,7 +39,7 @@ namespace PDF_Master.Views.Dialog.ConverterDialogs
             if (PageRangeComboBox.CurrentPage)
             {
                 ComboBoxItem comboBoxItem = new ComboBoxItem();
-                comboBoxItem.Content = "当前页面";
+                comboBoxItem.Content = App.MainPageLoader.GetString("WritableComboBox_CustomRange");
                 PageRangeComboBox.writableComboBox.Items.Insert(1, comboBoxItem);
 
             }

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterPPTDialog.xaml

@@ -42,7 +42,7 @@
                             </ComboBox>
                         </StackPanel>
                         <StackPanel Orientation="Vertical" Margin="0,0,0,0">
-                            <TextBlock Text="Page Range" Height="20"  Style="{StaticResource PropertyHeaderLv2}" HorizontalAlignment="Left"/>
+                            <TextBlock Text="{Binding T_PageRange}" Height="20"  Style="{StaticResource PropertyHeaderLv2}" HorizontalAlignment="Left"/>
                             <cus:WritableComboBox x:Name="PageRangeComboBox" Margin="0,10,0,0" Width="228" Height="32" HorizontalAlignment="Left" IsCurrentPage="True" Text="{Binding PageRangeText, Mode=TwoWay}"  SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange}" Loaded="PageRangeComboBox_Loaded">
                                 <i:Interaction.Triggers>
                                     <i:EventTrigger EventName="SelectionChanged">

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterPPTDialog.xaml.cs

@@ -38,7 +38,7 @@ namespace PDF_Master.Views.Dialog.ConverterDialogs
             if (PageRangeComboBox.CurrentPage)
             {
                 ComboBoxItem comboBoxItem = new ComboBoxItem();
-                comboBoxItem.Content = "当前页面";
+                comboBoxItem.Content = App.MainPageLoader.GetString("WritableComboBox_CustomRange");
                 PageRangeComboBox.writableComboBox.Items.Insert(1, comboBoxItem);
 
             }

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterRTFDialog.xaml

@@ -42,7 +42,7 @@
                             </ComboBox>
                         </StackPanel>
                         <StackPanel Orientation="Vertical" Margin="0,0,0,0">
-                            <TextBlock Text="Page Range" Height="20"  Style="{StaticResource PropertyHeaderLv2}" HorizontalAlignment="Left"/>
+                            <TextBlock Text="{Binding T_PageRange}" Height="20"  Style="{StaticResource PropertyHeaderLv2}" HorizontalAlignment="Left"/>
                             <cus:WritableComboBox x:Name="PageRangeComboBox" Margin="0,10,0,0" Width="228" Height="32" HorizontalAlignment="Left" IsCurrentPage="True" Text="{Binding PageRangeText, Mode=TwoWay}"  SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange}" Loaded="PageRangeComboBox_Loaded">
                                 <i:Interaction.Triggers>
                                     <i:EventTrigger EventName="SelectionChanged">

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterRTFDialog.xaml.cs

@@ -39,7 +39,7 @@ namespace PDF_Master.Views.Dialog.ConverterDialogs
             if (PageRangeComboBox.CurrentPage)
             {
                 ComboBoxItem comboBoxItem = new ComboBoxItem();
-                comboBoxItem.Content = "当前页面";
+                comboBoxItem.Content = App.MainPageLoader.GetString("WritableComboBox_CustomRange");
                 PageRangeComboBox.writableComboBox.Items.Insert(1, comboBoxItem);
 
             }

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterTextDialog.xaml

@@ -42,7 +42,7 @@
                             </ComboBox>
                         </StackPanel>
                         <StackPanel Orientation="Vertical" Margin="0,0,0,0">
-                            <TextBlock Text="Page Range" Height="20"  Style="{StaticResource PropertyHeaderLv2}" HorizontalAlignment="Left"/>
+                            <TextBlock Text="{Binding T_PageRange}" Height="20"  Style="{StaticResource PropertyHeaderLv2}" HorizontalAlignment="Left"/>
                             <cus:WritableComboBox x:Name="PageRangeComboBox" Margin="0,10,0,0" Width="228" Height="32" HorizontalAlignment="Left" IsCurrentPage="True" Text="{Binding PageRangeText, Mode=TwoWay}"  SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange}" Loaded="PageRangeComboBox_Loaded">
                                 <i:Interaction.Triggers>
                                     <i:EventTrigger EventName="SelectionChanged">

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterTextDialog.xaml.cs

@@ -38,7 +38,7 @@ namespace PDF_Master.Views.Dialog.ConverterDialogs
             if (PageRangeComboBox.CurrentPage)
             {
                 ComboBoxItem comboBoxItem = new ComboBoxItem();
-                comboBoxItem.Content = "当前页面";
+                comboBoxItem.Content = App.MainPageLoader.GetString("WritableComboBox_CustomRange");
                 PageRangeComboBox.writableComboBox.Items.Insert(1, comboBoxItem);
 
             }

+ 3 - 3
PDF Office/Views/Dialog/ConverterDialogs/ConverterWordDialog.xaml

@@ -28,7 +28,7 @@
                 </Grid>
                 <Grid Grid.Column="1">
                     <StackPanel Orientation="Vertical" Margin="16,2,0,0">
-                        <StackPanel Orientation="Vertical" HorizontalAlignment="Left">
+                        <StackPanel Orientation="Vertical" HorizontalAlignment="Left" Visibility="Collapsed">
                             <TextBlock Text="Layout Settings"  Style="{StaticResource PropertyHeaderLv2}" Height="20" HorizontalAlignment="Left"/>
                             <StackPanel Orientation="Vertical" Margin="0,8,0,0">
                                 <RadioButton Name="FlowingTextRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=FlowingTextRadioBtn,Path=Name}" IsEnabled="False"  Style="{StaticResource RadioButtonStyleText}" Visibility="Collapsed"
@@ -55,8 +55,8 @@
                                     <ComboBoxItem Content="Korean"/>
                                 </ComboBox>
                             </StackPanel>
-                            <StackPanel Orientation="Vertical" Margin="0,16,0,0">
-                                <TextBlock Text="Page Range" Height="20"  Style="{StaticResource PropertyHeaderLv2}" HorizontalAlignment="Left"/>
+                            <StackPanel Orientation="Vertical" Margin="0,0,0,0">
+                                <TextBlock Text="{Binding T_PageRange}" Height="20"  Style="{StaticResource PropertyHeaderLv2}" HorizontalAlignment="Left"/>
                                 <cus:WritableComboBox x:Name="PageRangeComboBox" Margin="0,8,0,0" Width="228" Height="32" HorizontalAlignment="Left" IsCurrentPage="True" Text="{Binding PageRangeText, Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange}"  SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}" Loaded="PageRangeComboBox_Loaded">
                                     <i:Interaction.Triggers>
                                         <i:EventTrigger EventName="SelectionChanged">

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterWordDialog.xaml.cs

@@ -38,7 +38,7 @@ namespace PDF_Master.Views.Dialog.ConverterDialogs
             if (PageRangeComboBox.CurrentPage)
             {
                 ComboBoxItem comboBoxItem = new ComboBoxItem();
-                comboBoxItem.Content = "当前页面";
+                comboBoxItem.Content = App.MainPageLoader.GetString("WritableComboBox_CustomRange");
                 PageRangeComboBox.writableComboBox.Items.Insert(1, comboBoxItem);
 
             }

+ 22 - 10
PDF Office/Views/Dialog/SettingsDialog.xaml

@@ -460,12 +460,12 @@
 
                                 <Label
                                     Grid.Column="2"
-                                    Content="Rectangular borders:"
+                                    Content="Rectangular Fill:"
                                     Style="{StaticResource Label2}" />
                                 <compositecontrol:ColorContent
                                     Grid.Column="3"
                                     Height="40"
-                                    SelectedColor="{Binding Annote.RectangleBorderColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                    SelectedColor="{Binding Annote.RectangleFillColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                     ShowColorList="Collapsed" />
                                 <Label
                                     Grid.Row="1"
@@ -481,13 +481,13 @@
                                 <Label
                                     Grid.Row="1"
                                     Grid.Column="2"
-                                    Content="Round borders:"
+                                    Content="Rectangle borders:"
                                     Style="{StaticResource Label2}" />
                                 <compositecontrol:ColorContent
                                     Grid.Row="1"
                                     Grid.Column="3"
                                     Height="40"
-                                    SelectedColor="{Binding Annote.CircleBorderColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                    SelectedColor="{Binding Annote.RectangleBorderColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                     ShowColorList="Collapsed" />
                                 <Label
                                     Grid.Row="2"
@@ -503,13 +503,13 @@
                                 <Label
                                     Grid.Row="2"
                                     Grid.Column="2"
-                                    Content="Line segment:"
+                                    Content="Circle Fill:"
                                     Style="{StaticResource Label2}" />
                                 <compositecontrol:ColorContent
                                     Grid.Row="2"
                                     Grid.Column="3"
                                     Height="40"
-                                    SelectedColor="{Binding Annote.LineColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                    SelectedColor="{Binding Annote.CircleFillColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                     ShowColorList="Collapsed" />
                                 <Label
                                     Grid.Row="3"
@@ -525,13 +525,13 @@
                                 <Label
                                     Grid.Row="3"
                                     Grid.Column="2"
-                                    Content="Rectangular Fill:"
+                                    Content="Circle Border:"
                                     Style="{StaticResource Label2}" />
                                 <compositecontrol:ColorContent
                                     Grid.Row="3"
                                     Grid.Column="3"
                                     Height="40"
-                                    SelectedColor="{Binding Annote.RectangleFillColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                    SelectedColor="{Binding Annote.CircleBorderColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                     ShowColorList="Collapsed" />
                                 <Label
                                     Grid.Row="4"
@@ -547,13 +547,13 @@
                                 <Label
                                     Grid.Row="4"
                                     Grid.Column="2"
-                                    Content="Round filling:"
+                                    Content="Line:"
                                     Style="{StaticResource Label2}" />
                                 <compositecontrol:ColorContent
                                     Grid.Row="4"
                                     Grid.Column="3"
                                     Height="40"
-                                    SelectedColor="{Binding Annote.CircleFillColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                    SelectedColor="{Binding Annote.LineColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                     ShowColorList="Collapsed" />
                                 <Label
                                     Grid.Row="5"
@@ -566,6 +566,18 @@
                                     HorizontalAlignment="Left"
                                     SelectedColor="{Binding Annote.NoteAnnoteColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                     ShowColorList="Collapsed" />
+                                <Label
+                                    Grid.Row="5"
+                                    Grid.Column="2"
+                                    Content="Arrow:"
+                                    Style="{StaticResource Label2}" />
+                                <compositecontrol:ColorContent
+                                    Grid.Row="5"
+                                    Grid.Column="4"
+                                    Height="40"
+                                    HorizontalAlignment="Left"
+                                    SelectedColor="{Binding Annote.NoteAnnoteColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                    ShowColorList="Collapsed" />
                             </Grid>
                         </Border>
 

+ 1 - 1
PDF Office/Views/Dialog/SignatureCreateDialog.xaml.cs

@@ -77,7 +77,7 @@ namespace PDF_Master.Views.PropertyPanel.AnnotPanel
             BtnTextClear.Content = App.MainPageLoader.GetString("Signatur_DialogClear");
 
             DrawItem.Header = App.MainPageLoader.GetString("Signatur_DialogDraw");
-            DrawHint.Text = App.MainPageLoader.GetString("Signatur_DialogPictureHint");
+            DrawHint.Text = App.MainPageLoader.GetString("Signatur_DialogDrawHint");
             BtnDrawClear.Content = App.MainPageLoader.GetString("Signatur_DialogClear");
 
             PictureItem.Header = App.MainPageLoader.GetString("Signatur_DialogPicture");

+ 1 - 1
PDF Office/Views/FillAndSign/PropertyPanel/ShapFillProperty.xaml

@@ -39,7 +39,7 @@
                 FontSize="18"
                 FontWeight="Bold"
                 LineHeight="24"
-                Text="{Binding AnnotTypeTitle}" />
+                Text="{Binding ShapeType}"/>
             <Border
                 x:Name="shapeBarder"
                 Width="228"

+ 2 - 8
PDF Office/Views/HomePanel/RecentFiles/RecentFilesContent.xaml

@@ -14,8 +14,8 @@
     d:DesignHeight="450"
     d:DesignWidth="800"
     prism:ViewModelLocator.AutoWireViewModel="True"
-    Loaded="UserControl_Loaded"
     KeyDown="UserControl_KeyDown"
+    Loaded="UserControl_Loaded"
     mc:Ignorable="d">
     <UserControl.Resources>
         <ResourceDictionary>
@@ -50,14 +50,9 @@
 
             <ContextMenu
                 x:Key="FlyoutMenu"
+                DataContext="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext}"
                 FontSize="14"
                 Opened="ContextMenu_Opened">
-                <ContextMenu.ItemContainerStyle>
-                    <Style TargetType="MenuItem">
-                        <Setter Property="Padding" Value="0,7,0,7" />
-                        <Setter Property="VerticalContentAlignment" Value="Center" />
-                    </Style>
-                </ContextMenu.ItemContainerStyle>
                 <MenuItem
                     Name="FilePathMenuItem"
                     Click="FilePathMenuItem_Click"
@@ -272,7 +267,6 @@
                     ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                     ScrollViewer.VerticalScrollBarVisibility="Auto"
                     SelectionMode="Extended"
-                    Style="{StaticResource FilesGridViewStyle}"
                     VirtualizingPanel.CacheLength="1"
                     VirtualizingPanel.CacheLengthUnit="Page"
                     VirtualizingPanel.IsVirtualizing="True"

+ 34 - 31
PDF Office/Views/HomePanel/RecentFiles/RecentFilesContent.xaml.cs

@@ -53,30 +53,30 @@ namespace PDF_Master.Views.HomePanel.RecentFiles
         #region UI操作
         private void ViewModel_RecentFilesSelection(object sender, bool e)
         {
-            if (e)
-            {
-                RecentFilesList.SelectedItems.Clear();
-                if (GridRecentFilesList.SelectedItems.Count > 0)
-                {
-                    for (int i = 0; i < GridRecentFilesList.SelectedItems.Count; i++)
-                    {
-                        RecentFilesList.SelectedItems.Add(GridRecentFilesList.SelectedItems[i]);
-                    }
-
-                }
-            }
-            else
-            {
-                GridRecentFilesList.SelectedItems.Clear();
-                if (RecentFilesList.SelectedItems.Count > 0)
-                {
-                    for (int i = 0; i < RecentFilesList.SelectedItems.Count; i++)
-                    {
-                        GridRecentFilesList.SelectedItems.Add(RecentFilesList.SelectedItems[i]);
-                    }
-
-                }
-            }
+            //if (e)
+            //{
+            //    RecentFilesList.SelectedItems.Clear();
+            //    if (GridRecentFilesList.SelectedItems.Count > 0)
+            //    {
+            //        for (int i = 0; i < GridRecentFilesList.SelectedItems.Count; i++)
+            //        {
+            //            RecentFilesList.SelectedItems.Add(GridRecentFilesList.SelectedItems[i]);
+            //        }
+
+            //    }
+            //}
+            //else
+            //{
+            //    GridRecentFilesList.SelectedItems.Clear();
+            //    if (RecentFilesList.SelectedItems.Count > 0)
+            //    {
+            //        for (int i = 0; i < RecentFilesList.SelectedItems.Count; i++)
+            //        {
+            //            GridRecentFilesList.SelectedItems.Add(RecentFilesList.SelectedItems[i]);
+            //        }
+
+            //    }
+            //}
         }
 
         private void ContextMenu_Opened(object sender, RoutedEventArgs e)
@@ -213,14 +213,17 @@ namespace PDF_Master.Views.HomePanel.RecentFiles
 
         private void UserControl_KeyDown(object sender, KeyEventArgs e)
         {
-            //点击ESC取消选中
-            if(GridRecentFilesList.Visibility == Visibility.Visible)
-            {
-                GridRecentFilesList.SelectedIndex = -1;
-            }
-            else
+            if (e.Key == Key.Escape)
             {
-                RecentFilesList.SelectedIndex = -1;
+                //点击ESC取消选中
+                if (GridRecentFilesList.Visibility == Visibility.Visible)
+                {
+                    GridRecentFilesList.SelectedIndex = -1;
+                }
+                else
+                {
+                    RecentFilesList.SelectedIndex = -1;
+                }
             }
         }
     }

+ 0 - 1
PDF Office/Views/MainWindow.xaml

@@ -22,7 +22,6 @@
     BorderThickness="2"
     Closed="Window_Closed"
     Closing="Window_Closing"
-    PreviewMouseLeftButtonDown="Window_PreviewMouseLeftButtonDown"
     SizeChanged="Window_SizeChanged"
     Style="{StaticResource WindowStyle}"
     UseLayoutRounding="True"

+ 0 - 39
PDF Office/Views/MainWindow.xaml.cs

@@ -240,44 +240,5 @@ namespace PDF_Master.Views
                 e.Cancel = true;
             }
         }
-
-        private void Window_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
-        {
-            //通过转移焦点来使文本框触发失去焦点事件
-            var uiElement = FocusManager.GetFocusedElement(this);
-            if (uiElement != null)
-            {
-                var textBox = uiElement as TextBox;
-                
-                //如果是下拉框本身的可输入文本框,则点击下拉框或者下拉选项时不失去焦点
-                var parent = CommonHelper.FindVisualParent<ComboBox>(textBox);
-                if (parent != null)
-                {
-                    var visual = VisualTreeHelper.HitTest(parent, e.GetPosition(parent));
-                    if (visual != null)
-                    {
-                        //点击下拉框展开按钮时 不失去焦点
-                        var item = CommonHelper.FindVisualParent<ComboBox>(visual.VisualHit);
-                        if (item != null)
-                        {
-                            return;
-                        }
-                    }
-
-                    //选择下拉选项时,返回,不失去焦点,否则下拉框的其他选项无法选中
-                    if(parent.IsDropDownOpen)
-                    {
-                        return;
-                    }
-                }
-
-                //点击其他非文本框区域时,失去焦点
-                if (textBox != null)
-                {
-                    GridRoot.Focusable = true;
-                    GridRoot.Focus();
-                }
-            }
-        }
     }
 }

+ 62 - 59
PDF Office/Views/PageEdit/PageEditContent.xaml

@@ -30,62 +30,64 @@
             <convert:BoolToVisible x:Key="BoolToVisibleConvert" />
             <convert:UnVisivleConvert x:Key="UnVisibleConvert" />
             <DataTemplate x:Key="PageEditListBoxItemTemplate" DataType="{x:Type pageedit:PageEditItem}">
-                <StackPanel AllowDrop="True">
-                    <Border
-                        Name="BdBorder"
-                        VerticalAlignment="Top"
-                        BorderBrush="Transparent"
-                        BorderThickness="2"
-                        CornerRadius="0">
-                        <Grid
-                            Name="GridRoot"
-                            Width="{Binding ItemSize.Width}"
-                            Height="{Binding ItemSize.Height}"
-                            Margin="1"
-                            Background="Transparent">
-                            <Image Source="{Binding Image}" Stretch="Uniform" />
-                            <Border
-                                Width="10"
-                                Height="10"
-                                Margin="0,10,10,0"
-                                HorizontalAlignment="Right"
-                                VerticalAlignment="Top"
-                                Background="Yellow"
-                                Visibility="{Binding HaveBookMark, Converter={StaticResource BoolToVisibleConvert}}" />
-                        </Grid>
-                    </Border>
+                <Grid Name="BdRoot">
+                    <StackPanel AllowDrop="True">
+                        <Border
+                            Name="BdBorder"
+                            VerticalAlignment="Top"
+                            BorderBrush="Transparent"
+                            BorderThickness="2"
+                            CornerRadius="0">
+                            <Grid
+                                Name="GridRoot"
+                                Width="{Binding ItemSize.Width}"
+                                Height="{Binding ItemSize.Height}"
+                                Margin="1"
+                                Background="Transparent">
+                                <Image Source="{Binding Image}" Stretch="Uniform" />
+                                <Border
+                                    Width="10"
+                                    Height="10"
+                                    Margin="0,10,10,0"
+                                    HorizontalAlignment="Right"
+                                    VerticalAlignment="Top"
+                                    Background="Yellow"
+                                    Visibility="{Binding HaveBookMark, Converter={StaticResource BoolToVisibleConvert}}" />
+                            </Grid>
+                        </Border>
 
-                    <Border
-                        Name="BdPageNum"
-                        Margin="0,4,0,0"
-                        HorizontalAlignment="Center"
-                        VerticalAlignment="Bottom"
-                        Background="Transparent">
-                        <StackPanel
-                            Name="StkpnlButtom"
-                            Width="auto"
-                            MinWidth="10"
+                        <Border
+                            Name="BdPageNum"
+                            Margin="0,4,0,0"
                             HorizontalAlignment="Center"
+                            VerticalAlignment="Bottom"
                             Background="Transparent">
-                            <TextBlock
-                                Width="auto"
-                                Height="22"
-                                Margin="0,4"
-                                HorizontalAlignment="Center"
-                                FontSize="14"
-                                Text="{Binding PageNumber}" />
-                            <TextBlock
+                            <StackPanel
+                                Name="StkpnlButtom"
                                 Width="auto"
-                                MinHeight="22"
-                                MaxWidth="{Binding ElementName=GridRoot, Path=ActualWidth}"
+                                MinWidth="10"
                                 HorizontalAlignment="Center"
-                                FontSize="14"
-                                Text="{Binding PageSize}"
-                                TextWrapping="Wrap"
-                                Visibility="{Binding ShowPageSize, Converter={StaticResource BoolToVisibleConvert}}" />
-                        </StackPanel>
-                    </Border>
-                </StackPanel>
+                                Background="Transparent">
+                                <TextBlock
+                                    Width="auto"
+                                    Height="22"
+                                    Margin="0,4"
+                                    HorizontalAlignment="Center"
+                                    FontSize="14"
+                                    Text="{Binding PageNumber}" />
+                                <TextBlock
+                                    Width="auto"
+                                    MinHeight="22"
+                                    MaxWidth="{Binding ElementName=GridRoot, Path=ActualWidth}"
+                                    HorizontalAlignment="Center"
+                                    FontSize="14"
+                                    Text="{Binding PageSize}"
+                                    TextWrapping="Wrap"
+                                    Visibility="{Binding ShowPageSize, Converter={StaticResource BoolToVisibleConvert}}" />
+                            </StackPanel>
+                        </Border>
+                    </StackPanel>
+                </Grid>
             </DataTemplate>
 
             <ContextMenu x:Key="ListBoxItemMenu" DataContext="{Binding Path=DataContext, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
@@ -175,29 +177,29 @@
                 <RowDefinition Height="auto" />
                 <RowDefinition />
             </Grid.RowDefinitions>
-            <Grid Height="40" Background="{StaticResource color.sys.layout.mg}">
+            <Grid
+                Height="40"
+                Background="{StaticResource color.sys.layout.mg}"
+                Focusable="True"
+                PreviewMouseLeftButtonDown="Grid_PreviewMouseLeftButtonDown">
                 <StackPanel
                     Name="StkpnlCenter"
                     HorizontalAlignment="Center"
                     Orientation="Horizontal">
                     <Grid>
                         <ComboBox
+                            Name="CmbPageRange"
                             Width="117"
                             Height="23"
                             IsEditable="True"
                             ItemsSource="{Binding PageRangeItems}"
+                            LostFocus="TextBoxEx_LostFocus"
                             SelectedIndex="{Binding ComboxSelectIndex, Mode=TwoWay}"
-                            Text="{Binding TbPageRange}">
+                            Text="{Binding TbPageRange, Mode=TwoWay}">
                             <i:Interaction.Triggers>
                                 <i:EventTrigger EventName="PreviewKeyDown">
                                     <i:InvokeCommandAction Command="{Binding PreviewKeyDown}" PassEventArgsToCommand="True" />
                                 </i:EventTrigger>
-                                <i:EventTrigger EventName="KeyDown">
-                                    <i:InvokeCommandAction Command="{Binding KeyDown}" PassEventArgsToCommand="True" />
-                                </i:EventTrigger>
-                                <i:EventTrigger EventName="LostFocus">
-                                    <i:InvokeCommandAction Command="{Binding LostFocusCommand}" PassEventArgsToCommand="True" />
-                                </i:EventTrigger>
                             </i:Interaction.Triggers>
                         </ComboBox>
                     </Grid>
@@ -214,6 +216,7 @@
                             Data="M19.4129 12.9758C18.9269 10.15 16.4645 8 13.5 8C10.1863 8 7.5 10.6863 7.5 14C7.5 17.3137 10.1863 20 13.5 20C14.5945 20 15.6178 19.7078 16.4993 19.1979L17.5007 20.9291C16.323 21.6104 14.9555 22 13.5 22C9.08172 22 5.5 18.4183 5.5 14C5.5 9.58172 9.08172 6 13.5 6C17.1531 6 20.2343 8.44856 21.192 11.794L21.7091 9.86404L23.641 10.3817L22.4504 14.8249C22.3075 15.3584 21.7591 15.675 21.2257 15.532L16.7824 14.3415L17.3 12.4096L19.4129 12.9758Z" />
                     </Button>
                     <Separator
+                        Name="Separator"
                         Width="1"
                         Height="24"
                         Margin="5,0"

+ 80 - 4
PDF Office/Views/PageEdit/PageEditContent.xaml.cs

@@ -225,8 +225,8 @@ namespace PDF_Master.Views.PageEdit
         /// </summary>
         private void PulishEvent()
         {
-            var itemSize = (ListPageEdit.Items[0] as PageEditItem).ItemSize;
-            var range = GetRoughFromView(ListPageEdit, itemSize, new Thickness(5, 10, 5, 10));
+            var itemSize = new Size((ListPageEdit.Items[0] as PageEditItem).ItemSize.Width+32,(ListPageEdit.Items[0] as PageEditItem).ItemSize.Height+30);
+            var range = GetRoughFromView(ListPageEdit, itemSize, new Thickness(5,10,5,10));
             if((bool)TbnTwoLine.IsChecked)
             {
                 ///双列模式下要计算两列item
@@ -816,8 +816,18 @@ namespace PDF_Master.Views.PageEdit
 
         private void ListBoxItem_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
         {
-
-            //e.Handled = true;
+            if(GridBOTAHeader.Visibility == Visibility.Visible&&viewModel.PDFViewer!=null)
+            {
+                if(Keyboard.Modifiers == ModifierKeys.Shift||Keyboard.Modifiers== ModifierKeys.Control)
+                {
+                    return;
+                }
+                var item = (sender as ListBoxItem).DataContext as PageEditItem;
+                if(item != null)
+                {
+                    viewModel.PDFViewer.GoToPage(item.PageNumber-1);
+                }
+            }
         }
 
         private void ListBoxItem_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
@@ -919,5 +929,71 @@ namespace PDF_Master.Views.PageEdit
         {
 
         }
+
+        private async void TextBoxEx_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
+        {
+            var text = sender as TextBox;
+            if(text!=null)
+            {
+                await Task.Delay(50);
+                text.Focus();
+            }
+        }
+
+        private void TextBoxEx_TextChanged(object sender, TextChangedEventArgs e)
+        {
+            var text = sender as TextBox;
+            if(text.Visibility==Visibility.Visible&&string.IsNullOrEmpty(text.Text))
+            {
+                text.Focus();
+            }
+        }
+
+        private void TextBoxEx_LostFocus(object sender, RoutedEventArgs e)
+        {
+            //因为需要处理点击按钮或者点击列表失去焦点是 不进行弹窗 因此写在cs里,方便获取UI控件
+            var element = FocusManager.GetFocusedElement(this);
+            var visual = VisualTreeHelper.HitTest(this, Mouse.GetPosition(this));
+            //点击其他区域失去焦点时 不响应页码判断逻辑
+            if (visual != null)
+            {
+                var listbox = CommonHelper.FindVisualParent<ListBox>(visual.VisualHit);
+                if (listbox != null)
+                {
+                    //点击在listbox列表内
+                    return;
+                }
+                var image = CommonHelper.FindVisualParent<Image>(visual.VisualHit);
+                if (image != null)
+                {
+                    //点击在listbox列表内,具体某一项时,上面的判断调整可能失效,需要补充条件
+                    return;
+                }
+                var button =CommonHelper.FindVisualParent<Button>(visual.VisualHit);
+                if(button!=null)
+                {
+                    //点击在按钮时 
+                    return;
+                }
+                var combox = CommonHelper.FindVisualParent<ComboBox>(visual.VisualHit);
+                if(combox!=null)
+                {
+                    //点击在下拉框时 
+                    return;
+                }
+                viewModel.lostfocus(e);
+            }
+
+        }
+
+        private void Grid_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+        {
+            var visual = VisualTreeHelper.HitTest(this, Mouse.GetPosition(this));
+            if ((visual.VisualHit as Grid)!=null)
+            {
+                //点击工具栏空白处时 失去焦点
+                ListPageEdit.Focus();
+            }
+        }
     }
 }

+ 4 - 4
PDF Office/Views/Tools/ToolsBarContent.xaml

@@ -30,7 +30,7 @@
                                     <Path Data="M8 2H6V4H8V6H6V8H8V10H6V12V15C6 15.5523 6.44772 16 7 16H9C9.55228 16 10 15.5523 10 15V12H8V10H10V8H8V6H10V4H8V2Z" Fill="#94989C" />
                                 </Grid>
                             </StackPanel>
-                            <TextBlock VerticalAlignment="Center" Text="压缩" />
+                            <TextBlock VerticalAlignment="Center" Text="{Binding T_Compress}" />
                         </StackPanel>
                     </Button>
                     <Button Command="{Binding MergeCommand}" Style="{StaticResource InsideBarBtnStyle}">
@@ -41,7 +41,7 @@
                                     <Path Data="M5.29295 7.87868L6.41427 9L3 9V11L6.41427 11L5.29295 12.1213L6.70716 13.5355L9.53559 10.7071L10 10.2427L10.4644 10.7071L13.2928 13.5355L14.707 12.1213L13.5857 11L17 11V9L13.5857 9L14.707 7.87868L13.2928 6.46446L10.4644 9.29289L10 9.7573L9.53559 9.29289L6.70716 6.46446L5.29295 7.87868Z" Fill="#94989C" />
                                 </Grid>
                             </StackPanel>
-                            <TextBlock VerticalAlignment="Center" Text="合并" />
+                            <TextBlock VerticalAlignment="Center" Text="{Binding T_Merge}" />
                         </StackPanel>
                     </Button>
 
@@ -61,7 +61,7 @@
                                     <Path Data="M9 10V13H11V10H14V8H11V5H9V8H6V10H9Z" Fill="#94989C" />
                                 </Grid>
                             </StackPanel>
-                            <TextBlock VerticalAlignment="Center" Text="安全" />
+                            <TextBlock VerticalAlignment="Center" Text="{Binding T_Security}" />
                             <Path
                                 Width="12"
                                 Height="12"
@@ -232,7 +232,7 @@
                         Visibility="Visible">
                         <StackPanel Margin="4,0,4,0" Orientation="Horizontal">
                             <Path Data="M13 16L5 16C4.44771 16 4 15.5523 4 15V7L4 2V0H2L2 2H0V4H2L2 15C2 16.6569 3.34315 18 5 18L16 18V20H18V18H20V16H18H16H13ZM16 14V5C16 4.44771 15.5523 4 15 4H6V2H15C16.6569 2 18 3.34315 18 5V14H16Z" Fill="#273C62" />
-                            <TextBlock VerticalAlignment="Center" Text="裁剪" />
+                            <TextBlock VerticalAlignment="Center" Text="{Binding T_Crop}" />
                             <Path
                                 Width="12"
                                 Height="12"

+ 1 - 0
PDF Office/Views/ViewContent.xaml

@@ -128,6 +128,7 @@
                             </MenuItem>
                             <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
                             <MenuItem Header="Create Files">
+                                <MenuItem Command="{Binding CreateFromFile}" Header="Create From File" />
                                 <MenuItem Command="{Binding CreateBlankFileCommand}" Header="Create Blank" />
                                 <MenuItem Command="{Binding mainViewModel.homeContentViewModel.CreateFromScanner}" Header="Create Form Scanner" />
                             </MenuItem>

+ 1 - 0
PDFSettings/APPSettingProperties.cs

@@ -212,6 +212,7 @@ namespace PDFSettings
         public Color CircleBorderColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);
         public Color CircleFillColor = Colors.Transparent;
         public Color LineColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);
+        public Color ArrowColor = Colors.Red;
 
         /// <summary>
         ///文本对齐方式