Prechádzať zdrojové kódy

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

OYXH\oyxh 2 rokov pred
rodič
commit
74731af35d
37 zmenil súbory, kde vykonal 2928 pridanie a 577 odobranie
  1. 2 2
      PDF Office/App.xaml
  2. 4 3
      PDF Office/App.xaml.cs
  3. 4 4
      PDF Office/CustomControl/WritableComboBox.xaml
  4. 4 0
      PDF Office/CustomControl/WritableComboBox.xaml.cs
  5. 5 0
      PDF Office/Model/DialogNames.cs
  6. 61 1
      PDF Office/Model/SettingsDialog/AnnotateModel.cs
  7. 183 1
      PDF Office/MultilingualResources/PDF Office.en.xlf
  8. 183 1
      PDF Office/MultilingualResources/PDF Office.zh-Hans.xlf
  9. 183 1
      PDF Office/MultilingualResources/PDF Office.zh-Hant.xlf
  10. 41 9
      PDF Office/PDF Office.csproj
  11. 4 4
      PDF Office/Strings/HomePage/HomePage.Designer.cs
  12. 116 97
      PDF Office/Strings/HomePage/HomePage.resx
  13. 393 4
      PDF Office/Strings/MainPage/MainPage.Designer.cs
  14. 252 97
      PDF Office/Strings/MainPage/MainPage.resx
  15. 4 4
      PDF Office/Strings/Service/Service.Designer.cs
  16. 271 0
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/CreateFromScannerDialogsViewModel.cs
  17. 0 0
      PDF Office/ViewModels/Dialog/SignatureCreateDialogViewModel.cs
  18. 14 2
      PDF Office/ViewModels/Dialog/ToolsDialogs/MergeDialogViewModel.cs
  19. 10 1
      PDF Office/ViewModels/HomeContentViewModel.cs
  20. 52 0
      PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Command.cs
  21. 369 53
      PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Function.cs
  22. 65 35
      PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Layout.cs
  23. 0 3
      PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Properties.cs
  24. 14 17
      PDF Office/Views/BOTA/OutLineControl.xaml
  25. 14 1
      PDF Office/Views/BOTA/OutLineControl.xaml.cs
  26. 200 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/CreateFromScannerDialogs.xaml
  27. 28 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/CreateFromScannerDialogs.xaml.cs
  28. 355 192
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePictureToPDFDialog.xaml
  29. 17 15
      PDF Office/Views/PropertyPanel/AnnotPanel/SignatureCreateDialog.xaml
  30. 21 0
      PDF Office/Views/PropertyPanel/AnnotPanel/SignatureCreateDialog.xaml.cs
  31. 28 27
      PDF Office/Views/Dialog/ToolsDialogs/MergeDialog.xaml
  32. 15 0
      PDF Office/Views/Dialog/ToolsDialogs/MergeDialog.xaml.cs
  33. 2 1
      PDF Office/Views/PropertyPanel/AnnotPanel/SignatureAnnotProperty.xaml
  34. 6 1
      PDF Office/Views/PropertyPanel/AnnotPanel/SignatureAnnotProperty.xaml.cs
  35. 2 1
      PDF Office/Views/PropertyPanel/AnnotPanel/StampAnnotProperty.xaml
  36. 5 0
      PDF Office/Views/PropertyPanel/AnnotPanel/StampAnnotProperty.xaml.cs
  37. 1 0
      PDF Office/packages.config

+ 2 - 2
PDF Office/App.xaml

@@ -696,8 +696,7 @@
                         Style="{StaticResource ComboBoxToggleButton}" />
                     <Border
                         x:Name="border"
-                        Margin="4 1 8 1"
-                        HorizontalAlignment="Left"
+                        Margin="3 1 8 1"
                         Background="{StaticResource TextBox.Static.Background}">
                         <TextBox
                             x:Name="PART_EditableTextBox"
@@ -753,6 +752,7 @@
                 <Style.Triggers>
                     <Trigger Property="IsEditable" Value="true">
                         <Setter Property="IsTabStop" Value="false" />
+                        <Setter Property="Padding" Value="2 3 5 3"/>
                         <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
                     </Trigger>
                 </Style.Triggers>

+ 4 - 3
PDF Office/App.xaml.cs

@@ -104,17 +104,17 @@ namespace PDF_Office
         /// <summary>
         /// 文案资源管理器  首页
         /// </summary>
-        public static ResourceManager HomePageLoader = new ResourceManager("PDF Office.String.HomePage.HomePage", Assembly.GetExecutingAssembly());
+        public static ResourceManager HomePageLoader = new ResourceManager("PDF_Office.Strings.HomePage.HomePage", Assembly.GetExecutingAssembly());
 
         /// <summary>
         /// 文案资源管理器  阅读页
         /// </summary>
-        public static ResourceManager MainPageLoader = new ResourceManager("PDF Office.String.MainPage.MainPage", Assembly.GetExecutingAssembly());
+        public static ResourceManager MainPageLoader = new ResourceManager("PDF_Office.Strings.MainPage.MainPage", Assembly.GetExecutingAssembly());
 
         /// <summary>
         /// 文案资源管理器  注册相关
         /// </summary>
-        public static ResourceManager ServiceLoader = new ResourceManager("PDF Office.String.Service.Service", Assembly.GetExecutingAssembly());
+        public static ResourceManager ServiceLoader = new ResourceManager("PDF_Office.Strings.Service.Service", Assembly.GetExecutingAssembly());
 
         public App()
         {
@@ -402,6 +402,7 @@ namespace PDF_Office
 
             containerRegistry.RegisterDialog<EditPresetColorsDialog>(DialogNames.EditPresetColorsDialog);
             containerRegistry.RegisterDialog<CreateFromHtmlDialog>(DialogNames.CreateFromHtmlDialog);
+            containerRegistry.RegisterDialog<CreateFromScannerDialogs>(DialogNames.CreateFromScannerDialogs);
             //标记密文弹窗
             containerRegistry.RegisterDialog<MarkSettingDialog>(DialogNames.MarkSettingDialog);
             containerRegistry.RegisterDialog<PageMarkDialog>(DialogNames.PageMarkDialog);

+ 4 - 4
PDF Office/CustomControl/WritableComboBox.xaml

@@ -19,10 +19,10 @@
             SelectedIndex="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:WritableComboBox}, Path=SelectedIndex}"
             SelectionChanged="writableComboBox_SelectionChanged"
             Visibility="Visible">
-            <ComboBoxItem Tag="AllPage" Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:WritableComboBox}, Path=IsAllPageVisible}">全部页面</ComboBoxItem>
-            <ComboBoxItem Tag="OddPage">奇数页</ComboBoxItem>
-            <ComboBoxItem IsEnabled="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:WritableComboBox}, Path=EvenPageIsEnabled}" Tag="EvenPage">偶数页</ComboBoxItem>
-            <ComboBoxItem Tag="CustomPage">自定义页面</ComboBoxItem>
+            <ComboBoxItem x:Name="AllPageItem" Tag="AllPage" Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:WritableComboBox}, Path=IsAllPageVisible}"/>
+            <ComboBoxItem x:Name="OddPageItem" Tag="OddPage"/>
+            <ComboBoxItem x:Name="EvenPageItem" IsEnabled="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:WritableComboBox}, Path=EvenPageIsEnabled}" Tag="EvenPage"/>
+            <ComboBoxItem x:Name="CustomPageItem" Tag="CustomPage"/>
         </ComboBox>
         <TextBox
             x:Name="writableTextBox"

+ 4 - 0
PDF Office/CustomControl/WritableComboBox.xaml.cs

@@ -393,6 +393,10 @@ namespace PDF_Office.CustomControl
         private void UserControl_Loaded(object sender, RoutedEventArgs e)
         {
             UpDataPagesInRange();
+            AllPageItem.Content = App.MainPageLoader.GetString("WritableComboBox_AllPage");
+            OddPageItem.Content = App.MainPageLoader.GetString("WritableComboBox_OddPage");
+            EvenPageItem.Content = App.MainPageLoader.GetString("WritableComboBox_EvenPage");
+            CustomPageItem.Content = App.MainPageLoader.GetString("WritableComboBox_CustomRange");
         }
     }
 }

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

@@ -182,6 +182,11 @@ namespace PDF_Office.Model
         /// </summary>
         public static string CreateFromHtmlDialog = "CreateFromHtmlDialog";
 
+        /// <summary>
+        /// 从网页创建PDF弹窗
+        /// </summary>
+        public static string CreateFromScannerDialogs = "CreateFromScannerDialogs";
+
         /// <summary>
         /// 标记密文相关弹窗
         /// </summary>

+ 61 - 1
PDF Office/Model/SettingsDialog/AnnotateModel.cs

@@ -1,4 +1,6 @@
-using PDF_Office.Properties;
+using ComPDFKitViewer.AnnotEvent;
+using PDF_Office.Helper;
+using PDF_Office.Properties;
 using PDFSettings;
 using Prism.Mvvm;
 using System;
@@ -192,6 +194,62 @@ namespace PDF_Office.Model.SettingsDialog
             this.TextAlign = annote.TextAlign;
         }
 
+        private void SaveDefaultAnnotSettings()
+        {
+            var highLightAnnot = GetAnnotDefault(AnnotArgsType.AnnotHighlight);
+            highLightAnnot.ForgoundColor = this.HighLightColor;
+            SetDefautAnnotProperties(highLightAnnot);
+
+            var UnderLineAnnot = GetAnnotDefault(AnnotArgsType.AnnotUnderline); 
+            UnderLineAnnot.ForgoundColor = this.UnderLineColor;
+            SetDefautAnnotProperties(UnderLineAnnot);
+
+            var StrikethroughColor = GetAnnotDefault(AnnotArgsType.AnnotStrikeout);
+            StrikethroughColor.ForgoundColor = this.strikethroughColor;
+            SetDefautAnnotProperties(StrikethroughColor);
+
+            var FreeHandAnnot = GetAnnotDefault(AnnotArgsType.AnnotFreehand);
+            FreeHandAnnot.ForgoundColor = this.FreeHandColor;
+            SetDefautAnnotProperties(FreeHandAnnot);
+
+            var TextAnnoteAnnot = GetAnnotDefault(AnnotArgsType.AnnotFreeText);
+            TextAnnoteAnnot.ForgoundColor = this.textAnnoteColor;
+            SetDefautAnnotProperties(TextAnnoteAnnot);
+
+            var NoteAnnoteAnnot = GetAnnotDefault(AnnotArgsType.AnnotSticky);
+            NoteAnnoteAnnot.ForgoundColor = this.NoteAnnoteColor;
+            SetDefautAnnotProperties(NoteAnnoteAnnot);
+
+            var RectangleAnnot = GetAnnotDefault(AnnotArgsType.AnnotSquare);
+            RectangleAnnot.BorderColor = this.RectangleBorderColor;
+            RectangleAnnot.BackgroundColor = this.RectangleFillColor;
+            SetDefautAnnotProperties(RectangleAnnot);
+
+            var AnnotLineAnnot = GetAnnotDefault(AnnotArgsType.AnnotLine);
+            AnnotLineAnnot.BorderColor = this.LineColor;
+            SetDefautAnnotProperties(AnnotLineAnnot);
+            Settings.Default.Save();
+        }
+
+        private void SetDefautAnnotProperties(DefaultAnnotProperty annotProperty)
+        {
+            if (Settings.Default.DefautAnnotProperties == null)
+            {
+                Settings.Default.DefautAnnotProperties = new DefaultAnnotProperties();
+            }
+            Settings.Default.DefautAnnotProperties.SetAnnotProperty(annotProperty);
+        }
+
+        private DefaultAnnotProperty GetAnnotDefault(AnnotArgsType annotArgsType)
+        {
+            var Annot = SettingHelper.GetAnnotDefaultProperty(annotArgsType);
+            if (Annot == null)
+            {
+                Annot = new DefaultAnnotProperty();
+            }
+            return Annot;
+        }
+
         public void Save()
         {
             AnnotatePropertyClass annote = new AnnotatePropertyClass();
@@ -211,6 +269,8 @@ namespace PDF_Office.Model.SettingsDialog
             annote.TextAlign = this.TextAlign;
 
             Settings.Default.AppProperties.Annotate = annote;
+
+            SaveDefaultAnnotSettings();
         }
 
         public void Reset()

+ 183 - 1
PDF Office/MultilingualResources/PDF Office.en.xlf

@@ -59,7 +59,189 @@
       <tool tool-id="MultilingualAppToolkit" tool-name="Multilingual App Toolkit" tool-version="4.1.12.0" tool-company="Microsoft" />
     </header>
     <body>
-      <group id="PDF OFFICE/STRINGS/MAINPAGE/MAINPAGE.RESX" datatype="resx" />
+      <group id="PDF OFFICE/STRINGS/MAINPAGE/MAINPAGE.RESX" datatype="resx">
+        <trans-unit id="Merge_AddFiles" translate="yes" xml:space="preserve">
+          <source>Add Files</source>
+          <target state="new">Add Files</target>
+        </trans-unit>
+        <trans-unit id="Merge_AddOpenFile" translate="yes" xml:space="preserve">
+          <source>Add an Open File</source>
+          <target state="new">Add an Open File</target>
+        </trans-unit>
+        <trans-unit id="Merge_Hint" translate="yes" xml:space="preserve">
+          <source>Selected files
+Drop files here or Click “Add Files” at bottom right button. 
+Drag files to reorder as you need.</source>
+          <target state="new">Selected files
+Drop files here or Click “Add Files” at bottom right button. 
+Drag files to reorder as you need.</target>
+        </trans-unit>
+        <trans-unit id="Merge_ItemPages" translate="yes" xml:space="preserve">
+          <source>Pages</source>
+          <target state="new">Pages</target>
+        </trans-unit>
+        <trans-unit id="Merge_No" translate="yes" xml:space="preserve">
+          <source>Cancel</source>
+          <target state="new">Cancel</target>
+        </trans-unit>
+        <trans-unit id="Merge_TitleFileName" translate="yes" xml:space="preserve">
+          <source>File Name</source>
+          <target state="new">File Name</target>
+        </trans-unit>
+        <trans-unit id="Merge_TitlePageRange" translate="yes" xml:space="preserve">
+          <source>Page Range</source>
+          <target state="new">Page Range</target>
+        </trans-unit>
+        <trans-unit id="Merge_TitleSize" translate="yes" xml:space="preserve">
+          <source>Size</source>
+          <target state="new">Size</target>
+        </trans-unit>
+        <trans-unit id="Merge_Yes" translate="yes" xml:space="preserve">
+          <source>Merge</source>
+          <target state="new">Merge</target>
+        </trans-unit>
+        <trans-unit id="Outline_Add" translate="yes" xml:space="preserve">
+          <source>Add Item</source>
+          <target state="new">Add Item</target>
+        </trans-unit>
+        <trans-unit id="Outline_AddLevel" translate="yes" xml:space="preserve">
+          <source>Add To Higher Level</source>
+          <target state="new">Add To Higher Level</target>
+        </trans-unit>
+        <trans-unit id="Outline_AddSub" translate="yes" xml:space="preserve">
+          <source>Add Sub-Item</source>
+          <target state="new">Add Sub-Item</target>
+        </trans-unit>
+        <trans-unit id="Outline_Change" translate="yes" xml:space="preserve">
+          <source>Change Destination</source>
+          <target state="new">Change Destination</target>
+        </trans-unit>
+        <trans-unit id="Outline_Collapse" translate="yes" xml:space="preserve">
+          <source>Collapse All</source>
+          <target state="new">Collapse All</target>
+        </trans-unit>
+        <trans-unit id="Outline_Delete" translate="yes" xml:space="preserve">
+          <source>Delete</source>
+          <target state="new">Delete</target>
+        </trans-unit>
+        <trans-unit id="Outline_DialogContent" translate="yes" xml:space="preserve">
+          <source>Are you sure you want to set the destination as the current location?</source>
+          <target state="new">Are you sure you want to set the destination as the current location?</target>
+        </trans-unit>
+        <trans-unit id="Outline_DialogNO" translate="yes" xml:space="preserve">
+          <source>No</source>
+          <target state="new">No</target>
+        </trans-unit>
+        <trans-unit id="Outline_DialogYes" translate="yes" xml:space="preserve">
+          <source>Yes</source>
+          <target state="new">Yes</target>
+        </trans-unit>
+        <trans-unit id="Outline_Down" translate="yes" xml:space="preserve">
+          <source>Demote</source>
+          <target state="new">Demote</target>
+        </trans-unit>
+        <trans-unit id="Outline_Expand" translate="yes" xml:space="preserve">
+          <source>Expand All</source>
+          <target state="new">Expand All</target>
+        </trans-unit>
+        <trans-unit id="Outline_RemoveAll" translate="yes" xml:space="preserve">
+          <source>Remove All Outlines</source>
+          <target state="new">Remove All Outlines</target>
+        </trans-unit>
+        <trans-unit id="Outline_Rename" translate="yes" xml:space="preserve">
+          <source>Rename</source>
+          <target state="new">Rename</target>
+        </trans-unit>
+        <trans-unit id="Outline_Title" translate="yes" xml:space="preserve">
+          <source>Outline</source>
+          <target state="new">Outline</target>
+        </trans-unit>
+        <trans-unit id="Outline_Up" translate="yes" xml:space="preserve">
+          <source>Promote</source>
+          <target state="new">Promote</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogClear" translate="yes" xml:space="preserve">
+          <source>Clear</source>
+          <target state="new">Clear</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogDraw" translate="yes" xml:space="preserve">
+          <source>Drawing</source>
+          <target state="new">Drawing</target>
+          <note from="MultilingualBuild" annotates="source" priority="2">手绘分类</note>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogDrawHint" translate="yes" xml:space="preserve">
+          <source>Sign here</source>
+          <target state="new">Sign here</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogNo" translate="yes" xml:space="preserve">
+          <source>Cancel</source>
+          <target state="new">Cancel</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogPicture" translate="yes" xml:space="preserve">
+          <source>Image</source>
+          <target state="new">Image</target>
+          <note from="MultilingualBuild" annotates="source" priority="2">图片分类</note>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogPictureHint" translate="yes" xml:space="preserve">
+          <source>Select image file</source>
+          <target state="new">Select image file</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogPictureReBkg" translate="yes" xml:space="preserve">
+          <source>Remove Background</source>
+          <target state="new">Remove Background</target>
+          <note from="MultilingualBuild" annotates="source" priority="2">去背功能按钮描述</note>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogPictureReBkgHint" translate="yes" xml:space="preserve">
+          <source>Remove white background from images</source>
+          <target state="new">Remove white background from images</target>
+          <note from="MultilingualBuild" annotates="source" priority="2">去背功能按钮悬浮提示</note>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogPictureReselect" translate="yes" xml:space="preserve">
+          <source>Reselect</source>
+          <target state="new">Reselect</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogText" translate="yes" xml:space="preserve">
+          <source>Keyboard</source>
+          <target state="new">Keyboard</target>
+          <note from="MultilingualBuild" annotates="source" priority="2">文字分类</note>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogTextHint" translate="yes" xml:space="preserve">
+          <source>Enter your signature here</source>
+          <target state="new">Enter your signature here</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogTitle" translate="yes" xml:space="preserve">
+          <source>Create New Signature</source>
+          <target state="new">Create New Signature</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogYes" translate="yes" xml:space="preserve">
+          <source>Apply</source>
+          <target state="new">Apply</target>
+        </trans-unit>
+        <trans-unit id="Signatur_Title" translate="yes" xml:space="preserve">
+          <source>Signature</source>
+          <target state="new">Signature</target>
+        </trans-unit>
+        <trans-unit id="Stamp_Title" translate="yes" xml:space="preserve">
+          <source>Stamp</source>
+          <target state="new">Stamp</target>
+        </trans-unit>
+        <trans-unit id="WritableComboBox_AllPage" translate="yes" xml:space="preserve">
+          <source>All pages</source>
+          <target state="new">All pages</target>
+        </trans-unit>
+        <trans-unit id="WritableComboBox_CustomRange" translate="yes" xml:space="preserve">
+          <source>Custom Range</source>
+          <target state="new">Custom Range</target>
+        </trans-unit>
+        <trans-unit id="WritableComboBox_EvenPage" translate="yes" xml:space="preserve">
+          <source>Even Pages</source>
+          <target state="new">Even Pages</target>
+        </trans-unit>
+        <trans-unit id="WritableComboBox_OddPage" translate="yes" xml:space="preserve">
+          <source>Odd Pages</source>
+          <target state="new">Odd Pages</target>
+        </trans-unit>
+      </group>
     </body>
   </file>
   <file datatype="xml" source-language="en-US" target-language="en" original="PDF OFFICE/STRINGS/SERVICE/SERVICE.RESX" tool-id="MultilingualAppToolkit" product-name="n/a" product-version="n/a" build-num="n/a">

+ 183 - 1
PDF Office/MultilingualResources/PDF Office.zh-Hans.xlf

@@ -59,7 +59,189 @@
       <tool tool-id="MultilingualAppToolkit" tool-name="Multilingual App Toolkit" tool-version="4.1.12.0" tool-company="Microsoft" />
     </header>
     <body>
-      <group id="PDF OFFICE/STRINGS/MAINPAGE/MAINPAGE.RESX" datatype="resx" />
+      <group id="PDF OFFICE/STRINGS/MAINPAGE/MAINPAGE.RESX" datatype="resx">
+        <trans-unit id="Merge_AddFiles" translate="yes" xml:space="preserve">
+          <source>Add Files</source>
+          <target state="new">Add Files</target>
+        </trans-unit>
+        <trans-unit id="Merge_AddOpenFile" translate="yes" xml:space="preserve">
+          <source>Add an Open File</source>
+          <target state="new">Add an Open File</target>
+        </trans-unit>
+        <trans-unit id="Merge_Hint" translate="yes" xml:space="preserve">
+          <source>Selected files
+Drop files here or Click “Add Files” at bottom right button. 
+Drag files to reorder as you need.</source>
+          <target state="new">Selected files
+Drop files here or Click “Add Files” at bottom right button. 
+Drag files to reorder as you need.</target>
+        </trans-unit>
+        <trans-unit id="Merge_ItemPages" translate="yes" xml:space="preserve">
+          <source>Pages</source>
+          <target state="new">Pages</target>
+        </trans-unit>
+        <trans-unit id="Merge_No" translate="yes" xml:space="preserve">
+          <source>Cancel</source>
+          <target state="new">Cancel</target>
+        </trans-unit>
+        <trans-unit id="Merge_TitleFileName" translate="yes" xml:space="preserve">
+          <source>File Name</source>
+          <target state="new">File Name</target>
+        </trans-unit>
+        <trans-unit id="Merge_TitlePageRange" translate="yes" xml:space="preserve">
+          <source>Page Range</source>
+          <target state="new">Page Range</target>
+        </trans-unit>
+        <trans-unit id="Merge_TitleSize" translate="yes" xml:space="preserve">
+          <source>Size</source>
+          <target state="new">Size</target>
+        </trans-unit>
+        <trans-unit id="Merge_Yes" translate="yes" xml:space="preserve">
+          <source>Merge</source>
+          <target state="new">Merge</target>
+        </trans-unit>
+        <trans-unit id="Outline_Add" translate="yes" xml:space="preserve">
+          <source>Add Item</source>
+          <target state="new">Add Item</target>
+        </trans-unit>
+        <trans-unit id="Outline_AddLevel" translate="yes" xml:space="preserve">
+          <source>Add To Higher Level</source>
+          <target state="new">Add To Higher Level</target>
+        </trans-unit>
+        <trans-unit id="Outline_AddSub" translate="yes" xml:space="preserve">
+          <source>Add Sub-Item</source>
+          <target state="new">Add Sub-Item</target>
+        </trans-unit>
+        <trans-unit id="Outline_Change" translate="yes" xml:space="preserve">
+          <source>Change Destination</source>
+          <target state="new">Change Destination</target>
+        </trans-unit>
+        <trans-unit id="Outline_Collapse" translate="yes" xml:space="preserve">
+          <source>Collapse All</source>
+          <target state="new">Collapse All</target>
+        </trans-unit>
+        <trans-unit id="Outline_Delete" translate="yes" xml:space="preserve">
+          <source>Delete</source>
+          <target state="new">Delete</target>
+        </trans-unit>
+        <trans-unit id="Outline_DialogContent" translate="yes" xml:space="preserve">
+          <source>Are you sure you want to set the destination as the current location?</source>
+          <target state="new">Are you sure you want to set the destination as the current location?</target>
+        </trans-unit>
+        <trans-unit id="Outline_DialogNO" translate="yes" xml:space="preserve">
+          <source>No</source>
+          <target state="new">No</target>
+        </trans-unit>
+        <trans-unit id="Outline_DialogYes" translate="yes" xml:space="preserve">
+          <source>Yes</source>
+          <target state="new">Yes</target>
+        </trans-unit>
+        <trans-unit id="Outline_Down" translate="yes" xml:space="preserve">
+          <source>Demote</source>
+          <target state="new">Demote</target>
+        </trans-unit>
+        <trans-unit id="Outline_Expand" translate="yes" xml:space="preserve">
+          <source>Expand All</source>
+          <target state="new">Expand All</target>
+        </trans-unit>
+        <trans-unit id="Outline_RemoveAll" translate="yes" xml:space="preserve">
+          <source>Remove All Outlines</source>
+          <target state="new">Remove All Outlines</target>
+        </trans-unit>
+        <trans-unit id="Outline_Rename" translate="yes" xml:space="preserve">
+          <source>Rename</source>
+          <target state="new">Rename</target>
+        </trans-unit>
+        <trans-unit id="Outline_Title" translate="yes" xml:space="preserve">
+          <source>Outline</source>
+          <target state="new">Outline</target>
+        </trans-unit>
+        <trans-unit id="Outline_Up" translate="yes" xml:space="preserve">
+          <source>Promote</source>
+          <target state="new">Promote</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogClear" translate="yes" xml:space="preserve">
+          <source>Clear</source>
+          <target state="new">Clear</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogDraw" translate="yes" xml:space="preserve">
+          <source>Drawing</source>
+          <target state="new">Drawing</target>
+          <note from="MultilingualBuild" annotates="source" priority="2">手绘分类</note>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogDrawHint" translate="yes" xml:space="preserve">
+          <source>Sign here</source>
+          <target state="new">Sign here</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogNo" translate="yes" xml:space="preserve">
+          <source>Cancel</source>
+          <target state="new">Cancel</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogPicture" translate="yes" xml:space="preserve">
+          <source>Image</source>
+          <target state="new">Image</target>
+          <note from="MultilingualBuild" annotates="source" priority="2">图片分类</note>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogPictureHint" translate="yes" xml:space="preserve">
+          <source>Select image file</source>
+          <target state="new">Select image file</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogPictureReBkg" translate="yes" xml:space="preserve">
+          <source>Remove Background</source>
+          <target state="new">Remove Background</target>
+          <note from="MultilingualBuild" annotates="source" priority="2">去背功能按钮描述</note>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogPictureReBkgHint" translate="yes" xml:space="preserve">
+          <source>Remove white background from images</source>
+          <target state="new">Remove white background from images</target>
+          <note from="MultilingualBuild" annotates="source" priority="2">去背功能按钮悬浮提示</note>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogPictureReselect" translate="yes" xml:space="preserve">
+          <source>Reselect</source>
+          <target state="new">Reselect</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogText" translate="yes" xml:space="preserve">
+          <source>Keyboard</source>
+          <target state="new">Keyboard</target>
+          <note from="MultilingualBuild" annotates="source" priority="2">文字分类</note>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogTextHint" translate="yes" xml:space="preserve">
+          <source>Enter your signature here</source>
+          <target state="new">Enter your signature here</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogTitle" translate="yes" xml:space="preserve">
+          <source>Create New Signature</source>
+          <target state="new">Create New Signature</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogYes" translate="yes" xml:space="preserve">
+          <source>Apply</source>
+          <target state="new">Apply</target>
+        </trans-unit>
+        <trans-unit id="Signatur_Title" translate="yes" xml:space="preserve">
+          <source>Signature</source>
+          <target state="new">Signature</target>
+        </trans-unit>
+        <trans-unit id="Stamp_Title" translate="yes" xml:space="preserve">
+          <source>Stamp</source>
+          <target state="new">Stamp</target>
+        </trans-unit>
+        <trans-unit id="WritableComboBox_AllPage" translate="yes" xml:space="preserve">
+          <source>All pages</source>
+          <target state="new">All pages</target>
+        </trans-unit>
+        <trans-unit id="WritableComboBox_CustomRange" translate="yes" xml:space="preserve">
+          <source>Custom Range</source>
+          <target state="new">Custom Range</target>
+        </trans-unit>
+        <trans-unit id="WritableComboBox_EvenPage" translate="yes" xml:space="preserve">
+          <source>Even Pages</source>
+          <target state="new">Even Pages</target>
+        </trans-unit>
+        <trans-unit id="WritableComboBox_OddPage" translate="yes" xml:space="preserve">
+          <source>Odd Pages</source>
+          <target state="new">Odd Pages</target>
+        </trans-unit>
+      </group>
     </body>
   </file>
   <file datatype="xml" source-language="en-US" target-language="zh-Hans" original="PDF OFFICE/STRINGS/SERVICE/SERVICE.RESX" tool-id="MultilingualAppToolkit" product-name="n/a" product-version="n/a" build-num="n/a">

+ 183 - 1
PDF Office/MultilingualResources/PDF Office.zh-Hant.xlf

@@ -59,7 +59,189 @@
       <tool tool-id="MultilingualAppToolkit" tool-name="Multilingual App Toolkit" tool-version="4.1.12.0" tool-company="Microsoft" />
     </header>
     <body>
-      <group id="PDF OFFICE/STRINGS/MAINPAGE/MAINPAGE.RESX" datatype="resx" />
+      <group id="PDF OFFICE/STRINGS/MAINPAGE/MAINPAGE.RESX" datatype="resx">
+        <trans-unit id="Merge_AddFiles" translate="yes" xml:space="preserve">
+          <source>Add Files</source>
+          <target state="new">Add Files</target>
+        </trans-unit>
+        <trans-unit id="Merge_AddOpenFile" translate="yes" xml:space="preserve">
+          <source>Add an Open File</source>
+          <target state="new">Add an Open File</target>
+        </trans-unit>
+        <trans-unit id="Merge_Hint" translate="yes" xml:space="preserve">
+          <source>Selected files
+Drop files here or Click “Add Files” at bottom right button. 
+Drag files to reorder as you need.</source>
+          <target state="new">Selected files
+Drop files here or Click “Add Files” at bottom right button. 
+Drag files to reorder as you need.</target>
+        </trans-unit>
+        <trans-unit id="Merge_ItemPages" translate="yes" xml:space="preserve">
+          <source>Pages</source>
+          <target state="new">Pages</target>
+        </trans-unit>
+        <trans-unit id="Merge_No" translate="yes" xml:space="preserve">
+          <source>Cancel</source>
+          <target state="new">Cancel</target>
+        </trans-unit>
+        <trans-unit id="Merge_TitleFileName" translate="yes" xml:space="preserve">
+          <source>File Name</source>
+          <target state="new">File Name</target>
+        </trans-unit>
+        <trans-unit id="Merge_TitlePageRange" translate="yes" xml:space="preserve">
+          <source>Page Range</source>
+          <target state="new">Page Range</target>
+        </trans-unit>
+        <trans-unit id="Merge_TitleSize" translate="yes" xml:space="preserve">
+          <source>Size</source>
+          <target state="new">Size</target>
+        </trans-unit>
+        <trans-unit id="Merge_Yes" translate="yes" xml:space="preserve">
+          <source>Merge</source>
+          <target state="new">Merge</target>
+        </trans-unit>
+        <trans-unit id="Outline_Add" translate="yes" xml:space="preserve">
+          <source>Add Item</source>
+          <target state="new">Add Item</target>
+        </trans-unit>
+        <trans-unit id="Outline_AddLevel" translate="yes" xml:space="preserve">
+          <source>Add To Higher Level</source>
+          <target state="new">Add To Higher Level</target>
+        </trans-unit>
+        <trans-unit id="Outline_AddSub" translate="yes" xml:space="preserve">
+          <source>Add Sub-Item</source>
+          <target state="new">Add Sub-Item</target>
+        </trans-unit>
+        <trans-unit id="Outline_Change" translate="yes" xml:space="preserve">
+          <source>Change Destination</source>
+          <target state="new">Change Destination</target>
+        </trans-unit>
+        <trans-unit id="Outline_Collapse" translate="yes" xml:space="preserve">
+          <source>Collapse All</source>
+          <target state="new">Collapse All</target>
+        </trans-unit>
+        <trans-unit id="Outline_Delete" translate="yes" xml:space="preserve">
+          <source>Delete</source>
+          <target state="new">Delete</target>
+        </trans-unit>
+        <trans-unit id="Outline_DialogContent" translate="yes" xml:space="preserve">
+          <source>Are you sure you want to set the destination as the current location?</source>
+          <target state="new">Are you sure you want to set the destination as the current location?</target>
+        </trans-unit>
+        <trans-unit id="Outline_DialogNO" translate="yes" xml:space="preserve">
+          <source>No</source>
+          <target state="new">No</target>
+        </trans-unit>
+        <trans-unit id="Outline_DialogYes" translate="yes" xml:space="preserve">
+          <source>Yes</source>
+          <target state="new">Yes</target>
+        </trans-unit>
+        <trans-unit id="Outline_Down" translate="yes" xml:space="preserve">
+          <source>Demote</source>
+          <target state="new">Demote</target>
+        </trans-unit>
+        <trans-unit id="Outline_Expand" translate="yes" xml:space="preserve">
+          <source>Expand All</source>
+          <target state="new">Expand All</target>
+        </trans-unit>
+        <trans-unit id="Outline_RemoveAll" translate="yes" xml:space="preserve">
+          <source>Remove All Outlines</source>
+          <target state="new">Remove All Outlines</target>
+        </trans-unit>
+        <trans-unit id="Outline_Rename" translate="yes" xml:space="preserve">
+          <source>Rename</source>
+          <target state="new">Rename</target>
+        </trans-unit>
+        <trans-unit id="Outline_Title" translate="yes" xml:space="preserve">
+          <source>Outline</source>
+          <target state="new">Outline</target>
+        </trans-unit>
+        <trans-unit id="Outline_Up" translate="yes" xml:space="preserve">
+          <source>Promote</source>
+          <target state="new">Promote</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogClear" translate="yes" xml:space="preserve">
+          <source>Clear</source>
+          <target state="new">Clear</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogDraw" translate="yes" xml:space="preserve">
+          <source>Drawing</source>
+          <target state="new">Drawing</target>
+          <note from="MultilingualBuild" annotates="source" priority="2">手绘分类</note>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogDrawHint" translate="yes" xml:space="preserve">
+          <source>Sign here</source>
+          <target state="new">Sign here</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogNo" translate="yes" xml:space="preserve">
+          <source>Cancel</source>
+          <target state="new">Cancel</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogPicture" translate="yes" xml:space="preserve">
+          <source>Image</source>
+          <target state="new">Image</target>
+          <note from="MultilingualBuild" annotates="source" priority="2">图片分类</note>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogPictureHint" translate="yes" xml:space="preserve">
+          <source>Select image file</source>
+          <target state="new">Select image file</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogPictureReBkg" translate="yes" xml:space="preserve">
+          <source>Remove Background</source>
+          <target state="new">Remove Background</target>
+          <note from="MultilingualBuild" annotates="source" priority="2">去背功能按钮描述</note>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogPictureReBkgHint" translate="yes" xml:space="preserve">
+          <source>Remove white background from images</source>
+          <target state="new">Remove white background from images</target>
+          <note from="MultilingualBuild" annotates="source" priority="2">去背功能按钮悬浮提示</note>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogPictureReselect" translate="yes" xml:space="preserve">
+          <source>Reselect</source>
+          <target state="new">Reselect</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogText" translate="yes" xml:space="preserve">
+          <source>Keyboard</source>
+          <target state="new">Keyboard</target>
+          <note from="MultilingualBuild" annotates="source" priority="2">文字分类</note>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogTextHint" translate="yes" xml:space="preserve">
+          <source>Enter your signature here</source>
+          <target state="new">Enter your signature here</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogTitle" translate="yes" xml:space="preserve">
+          <source>Create New Signature</source>
+          <target state="new">Create New Signature</target>
+        </trans-unit>
+        <trans-unit id="Signatur_DialogYes" translate="yes" xml:space="preserve">
+          <source>Apply</source>
+          <target state="new">Apply</target>
+        </trans-unit>
+        <trans-unit id="Signatur_Title" translate="yes" xml:space="preserve">
+          <source>Signature</source>
+          <target state="new">Signature</target>
+        </trans-unit>
+        <trans-unit id="Stamp_Title" translate="yes" xml:space="preserve">
+          <source>Stamp</source>
+          <target state="new">Stamp</target>
+        </trans-unit>
+        <trans-unit id="WritableComboBox_AllPage" translate="yes" xml:space="preserve">
+          <source>All pages</source>
+          <target state="new">All pages</target>
+        </trans-unit>
+        <trans-unit id="WritableComboBox_CustomRange" translate="yes" xml:space="preserve">
+          <source>Custom Range</source>
+          <target state="new">Custom Range</target>
+        </trans-unit>
+        <trans-unit id="WritableComboBox_EvenPage" translate="yes" xml:space="preserve">
+          <source>Even Pages</source>
+          <target state="new">Even Pages</target>
+        </trans-unit>
+        <trans-unit id="WritableComboBox_OddPage" translate="yes" xml:space="preserve">
+          <source>Odd Pages</source>
+          <target state="new">Odd Pages</target>
+        </trans-unit>
+      </group>
     </body>
   </file>
   <file datatype="xml" source-language="en-US" target-language="zh-Hant" original="PDF OFFICE/STRINGS/SERVICE/SERVICE.RESX" tool-id="MultilingualAppToolkit" product-name="n/a" product-version="n/a" build-num="n/a">

+ 41 - 9
PDF Office/PDF Office.csproj

@@ -151,6 +151,9 @@
     <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
       <HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
     </Reference>
+    <Reference Include="NTwain, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>packages\NTwain.3.7.2\lib\net462\NTwain.dll</HintPath>
+    </Reference>
     <Reference Include="office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
       <EmbedInteropTypes>True</EmbedInteropTypes>
     </Reference>
@@ -427,10 +430,23 @@
       <DesignTime>True</DesignTime>
       <AutoGen>True</AutoGen>
     </Compile>
-    <Compile Include="Strings\HomePage\HomePage.Designer.cs" />
-    <Compile Include="Strings\MainPage\MainPage.Designer.cs" />
-    <Compile Include="Strings\Service\Service.Designer.cs" />
+    <Compile Include="Strings\HomePage\HomePage.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>HomePage.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Strings\MainPage\MainPage.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>MainPage.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Strings\Service\Service.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Service.resx</DependentUpon>
+    </Compile>
     <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\CreateFromHtmlDialogViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\CreateFromScannerDialogsViewModel.cs" />
     <Compile Include="ViewModels\Dialog\PropertiesDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\Redaction\MarkSettingDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\Redaction\PageMarkDialogViewModel.cs" />
@@ -526,7 +542,7 @@
     <Compile Include="ViewModels\HomePanel\PDFTools\PDFToolsContentViewModel.cs" />
     <Compile Include="ViewModels\HomePanel\PDFTools\QuickToolsContentViewModel.cs" />
     <Compile Include="ViewModels\PropertyPanel\AnnotPanel\SignatureAnnotPropertyViewModel.cs" />
-    <Compile Include="ViewModels\PropertyPanel\AnnotPanel\SignatureCreateDialogViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\SignatureCreateDialogViewModel.cs" />
     <Compile Include="ViewModels\PropertyPanel\AnnotPanel\SnapshotEditMenuViewModel.cs" />
     <Compile Include="ViewModels\PropertyPanel\AnnotPanel\StickyNotePropertyViewModel.cs" />
     <Compile Include="ViewModels\PropertyPanel\PDFEdit\ImageEditPropertyViewModel.cs" />
@@ -678,6 +694,9 @@
     <Compile Include="Views\Dialog\HomePageToolsDialogs\CreateFromHtmlDialog.xaml.cs">
       <DependentUpon>CreateFromHtmlDialog.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\Dialog\HomePageToolsDialogs\CreateFromScannerDialogs.xaml.cs">
+      <DependentUpon>CreateFromScannerDialogs.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageBackground\HomePageBackgroundCreateBaseContent.xaml.cs">
       <DependentUpon>HomePageBackgroundCreateBaseContent.xaml</DependentUpon>
     </Compile>
@@ -1070,7 +1089,7 @@
     <Compile Include="Views\PropertyPanel\AnnotPanel\SignatureAnnotProperty.xaml.cs">
       <DependentUpon>SignatureAnnotProperty.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\PropertyPanel\AnnotPanel\SignatureCreateDialog.xaml.cs">
+    <Compile Include="Views\Dialog\SignatureCreateDialog.xaml.cs">
       <DependentUpon>SignatureCreateDialog.xaml</DependentUpon>
     </Compile>
     <Compile Include="Views\PropertyPanel\AnnotPanel\SnapshotEditMenu.xaml.cs">
@@ -1428,6 +1447,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\Dialog\HomePageToolsDialogs\CreateFromScannerDialogs.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
     <Page Include="Views\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageBackground\HomePageBackgroundCreateBaseContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -1855,7 +1878,7 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\PropertyPanel\AnnotPanel\SignatureCreateDialog.xaml">
+    <Page Include="Views\Dialog\SignatureCreateDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
@@ -2482,15 +2505,24 @@
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\HomePage\HomePage.en.resx" />
-    <EmbeddedResource Include="Strings\HomePage\HomePage.resx" />
+    <EmbeddedResource Include="Strings\HomePage\HomePage.resx">
+      <Generator>PublicResXFileCodeGenerator</Generator>
+      <LastGenOutput>HomePage.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
     <EmbeddedResource Include="Strings\HomePage\HomePage.zh-Hans.resx" />
     <EmbeddedResource Include="Strings\HomePage\HomePage.zh-Hant.resx" />
     <EmbeddedResource Include="Strings\MainPage\MainPage.en.resx" />
-    <EmbeddedResource Include="Strings\MainPage\MainPage.resx" />
+    <EmbeddedResource Include="Strings\MainPage\MainPage.resx">
+      <Generator>PublicResXFileCodeGenerator</Generator>
+      <LastGenOutput>MainPage.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
     <EmbeddedResource Include="Strings\MainPage\MainPage.zh-Hans.resx" />
     <EmbeddedResource Include="Strings\MainPage\MainPage.zh-Hant.resx" />
     <EmbeddedResource Include="Strings\Service\Service.en.resx" />
-    <EmbeddedResource Include="Strings\Service\Service.resx" />
+    <EmbeddedResource Include="Strings\Service\Service.resx">
+      <Generator>PublicResXFileCodeGenerator</Generator>
+      <LastGenOutput>Service.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
     <EmbeddedResource Include="Strings\Service\Service.zh-Hans.resx" />
     <EmbeddedResource Include="Strings\Service\Service.zh-Hant.resx" />
   </ItemGroup>

+ 4 - 4
PDF Office/Strings/HomePage/HomePage.Designer.cs

@@ -22,7 +22,7 @@ namespace PDF_Office.Strings.HomePage {
     [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class HomePage {
+    public class HomePage {
         
         private static global::System.Resources.ResourceManager resourceMan;
         
@@ -36,10 +36,10 @@ namespace PDF_Office.Strings.HomePage {
         ///   返回此类使用的缓存的 ResourceManager 实例。
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
+        public static global::System.Resources.ResourceManager ResourceManager {
             get {
                 if (object.ReferenceEquals(resourceMan, null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PDF_Office.String.HomePage.HomePage", typeof(HomePage).Assembly);
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PDF_Office.Strings.HomePage.HomePage", typeof(HomePage).Assembly);
                     resourceMan = temp;
                 }
                 return resourceMan;
@@ -51,7 +51,7 @@ namespace PDF_Office.Strings.HomePage {
         ///   使用此强类型资源类的所有资源查找执行重写。
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
+        public static global::System.Globalization.CultureInfo Culture {
             get {
                 return resourceCulture;
             }

+ 116 - 97
PDF Office/Strings/HomePage/HomePage.resx

@@ -1,101 +1,120 @@
 <?xml version="1.0" encoding="utf-8"?>
 <root>
-	<!-- 
-		Microsoft ResX Schema
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
 
-		Version 1.3
-
-		The primary goals of this format is to allow a simple XML format 
-		that is mostly human readable. The generation and parsing of the 
-		various data types are done through the TypeConverter classes 
-		associated with the data types.
-
-		Example:
-
-		... ado.net/XML headers & schema ...
-		<resheader name="resmimetype">text/microsoft-resx</resheader>
-		<resheader name="version">1.3</resheader>
-		<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-		<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-		<data name="Name1">this is my long string</data>
-		<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-		<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-			[base64 mime encoded serialized .NET Framework object]
-		</data>
-		<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-			[base64 mime encoded string representing a byte array form of the .NET Framework object]
-		</data>
-
-		There are any number of "resheader" rows that contain simple 
-		name/value pairs.
-
-		Each data row contains a name, and value. The row also contains a 
-		type or mimetype. Type corresponds to a .NET class that support 
-		text/value conversion through the TypeConverter architecture. 
-		Classes that don't support this are serialized and stored with the 
-		mimetype set.
-
-		The mimetype is used for serialized objects, and tells the 
-		ResXResourceReader how to depersist the object. This is currently not 
-		extensible. For a given mimetype the value must be set accordingly:
-
-		Note - application/x-microsoft.net.object.binary.base64 is the format 
-		that the ResXResourceWriter will generate, however the reader can 
-		read any of the formats listed below.
-
-		mimetype: application/x-microsoft.net.object.binary.base64
-		value   : The object must be serialized with 
-			: System.Serialization.Formatters.Binary.BinaryFormatter
-			: and then encoded with base64 encoding.
-
-		mimetype: application/x-microsoft.net.object.soap.base64
-		value   : The object must be serialized with 
-			: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-			: and then encoded with base64 encoding.
-
-		mimetype: application/x-microsoft.net.object.bytearray.base64
-		value   : The object must be serialized into a byte array 
-			: using a System.ComponentModel.TypeConverter
-			: and then encoded with base64 encoding.
-	-->
-	
-	<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-		<xsd:element name="root" msdata:IsDataSet="true">
-			<xsd:complexType>
-				<xsd:choice maxOccurs="unbounded">
-					<xsd:element name="data">
-						<xsd:complexType>
-							<xsd:sequence>
-								<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-								<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-							</xsd:sequence>
-							<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
-							<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-							<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-						</xsd:complexType>
-					</xsd:element>
-					<xsd:element name="resheader">
-						<xsd:complexType>
-							<xsd:sequence>
-								<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-							</xsd:sequence>
-							<xsd:attribute name="name" type="xsd:string" use="required" />
-						</xsd:complexType>
-					</xsd:element>
-				</xsd:choice>
-			</xsd:complexType>
-		</xsd:element>
-	</xsd:schema>
-	<resheader name="resmimetype">
-		<value>text/microsoft-resx</value>
-	</resheader>
-	<resheader name="version">
-		<value>1.3</value>
-	</resheader>
-	<resheader name="reader">
-		<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-	</resheader>
-	<resheader name="writer">
-		<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-	</resheader>
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <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>

+ 393 - 4
PDF Office/Strings/MainPage/MainPage.Designer.cs

@@ -22,7 +22,7 @@ namespace PDF_Office.Strings.MainPage {
     [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class MainPage {
+    public class MainPage {
         
         private static global::System.Resources.ResourceManager resourceMan;
         
@@ -36,10 +36,10 @@ namespace PDF_Office.Strings.MainPage {
         ///   返回此类使用的缓存的 ResourceManager 实例。
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
+        public static global::System.Resources.ResourceManager ResourceManager {
             get {
                 if (object.ReferenceEquals(resourceMan, null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PDF_Office.String.MainPage.MainPage", typeof(MainPage).Assembly);
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PDF_Office.Strings.MainPage.MainPage", typeof(MainPage).Assembly);
                     resourceMan = temp;
                 }
                 return resourceMan;
@@ -51,7 +51,7 @@ namespace PDF_Office.Strings.MainPage {
         ///   使用此强类型资源类的所有资源查找执行重写。
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
+        public static global::System.Globalization.CultureInfo Culture {
             get {
                 return resourceCulture;
             }
@@ -59,5 +59,394 @@ namespace PDF_Office.Strings.MainPage {
                 resourceCulture = value;
             }
         }
+        
+        /// <summary>
+        ///   查找类似 Add Files 的本地化字符串。
+        /// </summary>
+        public static string Merge_AddFiles {
+            get {
+                return ResourceManager.GetString("Merge_AddFiles", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Add an Open File 的本地化字符串。
+        /// </summary>
+        public static string Merge_AddOpenFile {
+            get {
+                return ResourceManager.GetString("Merge_AddOpenFile", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Selected files
+        ///Drop files here or Click “Add Files” at bottom right button. 
+        ///Drag files to reorder as you need. 的本地化字符串。
+        /// </summary>
+        public static string Merge_Hint {
+            get {
+                return ResourceManager.GetString("Merge_Hint", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Pages 的本地化字符串。
+        /// </summary>
+        public static string Merge_ItemPages {
+            get {
+                return ResourceManager.GetString("Merge_ItemPages", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Cancel 的本地化字符串。
+        /// </summary>
+        public static string Merge_No {
+            get {
+                return ResourceManager.GetString("Merge_No", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 File Name 的本地化字符串。
+        /// </summary>
+        public static string Merge_TitleFileName {
+            get {
+                return ResourceManager.GetString("Merge_TitleFileName", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Page Range 的本地化字符串。
+        /// </summary>
+        public static string Merge_TitlePageRange {
+            get {
+                return ResourceManager.GetString("Merge_TitlePageRange", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Size 的本地化字符串。
+        /// </summary>
+        public static string Merge_TitleSize {
+            get {
+                return ResourceManager.GetString("Merge_TitleSize", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Merge 的本地化字符串。
+        /// </summary>
+        public static string Merge_Yes {
+            get {
+                return ResourceManager.GetString("Merge_Yes", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Add Item 的本地化字符串。
+        /// </summary>
+        public static string Outline_Add {
+            get {
+                return ResourceManager.GetString("Outline_Add", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Add To Higher Level 的本地化字符串。
+        /// </summary>
+        public static string Outline_AddLevel {
+            get {
+                return ResourceManager.GetString("Outline_AddLevel", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Add Sub-Item 的本地化字符串。
+        /// </summary>
+        public static string Outline_AddSub {
+            get {
+                return ResourceManager.GetString("Outline_AddSub", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Change Destination 的本地化字符串。
+        /// </summary>
+        public static string Outline_Change {
+            get {
+                return ResourceManager.GetString("Outline_Change", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Collapse All 的本地化字符串。
+        /// </summary>
+        public static string Outline_Collapse {
+            get {
+                return ResourceManager.GetString("Outline_Collapse", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Delete 的本地化字符串。
+        /// </summary>
+        public static string Outline_Delete {
+            get {
+                return ResourceManager.GetString("Outline_Delete", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Are you sure you want to set the destination as the current location? 的本地化字符串。
+        /// </summary>
+        public static string Outline_DialogContent {
+            get {
+                return ResourceManager.GetString("Outline_DialogContent", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 No 的本地化字符串。
+        /// </summary>
+        public static string Outline_DialogNO {
+            get {
+                return ResourceManager.GetString("Outline_DialogNO", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Yes 的本地化字符串。
+        /// </summary>
+        public static string Outline_DialogYes {
+            get {
+                return ResourceManager.GetString("Outline_DialogYes", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Demote 的本地化字符串。
+        /// </summary>
+        public static string Outline_Down {
+            get {
+                return ResourceManager.GetString("Outline_Down", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Expand All 的本地化字符串。
+        /// </summary>
+        public static string Outline_Expand {
+            get {
+                return ResourceManager.GetString("Outline_Expand", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Remove All Outlines 的本地化字符串。
+        /// </summary>
+        public static string Outline_RemoveAll {
+            get {
+                return ResourceManager.GetString("Outline_RemoveAll", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Rename 的本地化字符串。
+        /// </summary>
+        public static string Outline_Rename {
+            get {
+                return ResourceManager.GetString("Outline_Rename", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Outline 的本地化字符串。
+        /// </summary>
+        public static string Outline_Title {
+            get {
+                return ResourceManager.GetString("Outline_Title", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Promote 的本地化字符串。
+        /// </summary>
+        public static string Outline_Up {
+            get {
+                return ResourceManager.GetString("Outline_Up", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Clear 的本地化字符串。
+        /// </summary>
+        public static string Signatur_DialogClear {
+            get {
+                return ResourceManager.GetString("Signatur_DialogClear", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Drawing 的本地化字符串。
+        /// </summary>
+        public static string Signatur_DialogDraw {
+            get {
+                return ResourceManager.GetString("Signatur_DialogDraw", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Sign here 的本地化字符串。
+        /// </summary>
+        public static string Signatur_DialogDrawHint {
+            get {
+                return ResourceManager.GetString("Signatur_DialogDrawHint", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Cancel 的本地化字符串。
+        /// </summary>
+        public static string Signatur_DialogNo {
+            get {
+                return ResourceManager.GetString("Signatur_DialogNo", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Image 的本地化字符串。
+        /// </summary>
+        public static string Signatur_DialogPicture {
+            get {
+                return ResourceManager.GetString("Signatur_DialogPicture", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Select image file 的本地化字符串。
+        /// </summary>
+        public static string Signatur_DialogPictureHint {
+            get {
+                return ResourceManager.GetString("Signatur_DialogPictureHint", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Remove Background 的本地化字符串。
+        /// </summary>
+        public static string Signatur_DialogPictureReBkg {
+            get {
+                return ResourceManager.GetString("Signatur_DialogPictureReBkg", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Remove white background from images 的本地化字符串。
+        /// </summary>
+        public static string Signatur_DialogPictureReBkgHint {
+            get {
+                return ResourceManager.GetString("Signatur_DialogPictureReBkgHint", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Reselect 的本地化字符串。
+        /// </summary>
+        public static string Signatur_DialogPictureReselect {
+            get {
+                return ResourceManager.GetString("Signatur_DialogPictureReselect", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Keyboard 的本地化字符串。
+        /// </summary>
+        public static string Signatur_DialogText {
+            get {
+                return ResourceManager.GetString("Signatur_DialogText", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Enter your signature here 的本地化字符串。
+        /// </summary>
+        public static string Signatur_DialogTextHint {
+            get {
+                return ResourceManager.GetString("Signatur_DialogTextHint", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Create New Signature 的本地化字符串。
+        /// </summary>
+        public static string Signatur_DialogTitle {
+            get {
+                return ResourceManager.GetString("Signatur_DialogTitle", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Apply 的本地化字符串。
+        /// </summary>
+        public static string Signatur_DialogYes {
+            get {
+                return ResourceManager.GetString("Signatur_DialogYes", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Signature 的本地化字符串。
+        /// </summary>
+        public static string Signatur_Title {
+            get {
+                return ResourceManager.GetString("Signatur_Title", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Stamp 的本地化字符串。
+        /// </summary>
+        public static string Stamp_Title {
+            get {
+                return ResourceManager.GetString("Stamp_Title", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 All pages 的本地化字符串。
+        /// </summary>
+        public static string WritableComboBox_AllPage {
+            get {
+                return ResourceManager.GetString("WritableComboBox_AllPage", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Custom Range 的本地化字符串。
+        /// </summary>
+        public static string WritableComboBox_CustomRange {
+            get {
+                return ResourceManager.GetString("WritableComboBox_CustomRange", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Even Pages 的本地化字符串。
+        /// </summary>
+        public static string WritableComboBox_EvenPage {
+            get {
+                return ResourceManager.GetString("WritableComboBox_EvenPage", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Odd Pages 的本地化字符串。
+        /// </summary>
+        public static string WritableComboBox_OddPage {
+            get {
+                return ResourceManager.GetString("WritableComboBox_OddPage", resourceCulture);
+            }
+        }
     }
 }

+ 252 - 97
PDF Office/Strings/MainPage/MainPage.resx

@@ -1,101 +1,256 @@
 <?xml version="1.0" encoding="utf-8"?>
 <root>
-	<!-- 
-		Microsoft ResX Schema
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
 
-		Version 1.3
-
-		The primary goals of this format is to allow a simple XML format 
-		that is mostly human readable. The generation and parsing of the 
-		various data types are done through the TypeConverter classes 
-		associated with the data types.
-
-		Example:
-
-		... ado.net/XML headers & schema ...
-		<resheader name="resmimetype">text/microsoft-resx</resheader>
-		<resheader name="version">1.3</resheader>
-		<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-		<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-		<data name="Name1">this is my long string</data>
-		<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-		<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-			[base64 mime encoded serialized .NET Framework object]
-		</data>
-		<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-			[base64 mime encoded string representing a byte array form of the .NET Framework object]
-		</data>
-
-		There are any number of "resheader" rows that contain simple 
-		name/value pairs.
-
-		Each data row contains a name, and value. The row also contains a 
-		type or mimetype. Type corresponds to a .NET class that support 
-		text/value conversion through the TypeConverter architecture. 
-		Classes that don't support this are serialized and stored with the 
-		mimetype set.
-
-		The mimetype is used for serialized objects, and tells the 
-		ResXResourceReader how to depersist the object. This is currently not 
-		extensible. For a given mimetype the value must be set accordingly:
-
-		Note - application/x-microsoft.net.object.binary.base64 is the format 
-		that the ResXResourceWriter will generate, however the reader can 
-		read any of the formats listed below.
-
-		mimetype: application/x-microsoft.net.object.binary.base64
-		value   : The object must be serialized with 
-			: System.Serialization.Formatters.Binary.BinaryFormatter
-			: and then encoded with base64 encoding.
-
-		mimetype: application/x-microsoft.net.object.soap.base64
-		value   : The object must be serialized with 
-			: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-			: and then encoded with base64 encoding.
-
-		mimetype: application/x-microsoft.net.object.bytearray.base64
-		value   : The object must be serialized into a byte array 
-			: using a System.ComponentModel.TypeConverter
-			: and then encoded with base64 encoding.
-	-->
-	
-	<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-		<xsd:element name="root" msdata:IsDataSet="true">
-			<xsd:complexType>
-				<xsd:choice maxOccurs="unbounded">
-					<xsd:element name="data">
-						<xsd:complexType>
-							<xsd:sequence>
-								<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-								<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-							</xsd:sequence>
-							<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
-							<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-							<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-						</xsd:complexType>
-					</xsd:element>
-					<xsd:element name="resheader">
-						<xsd:complexType>
-							<xsd:sequence>
-								<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-							</xsd:sequence>
-							<xsd:attribute name="name" type="xsd:string" use="required" />
-						</xsd:complexType>
-					</xsd:element>
-				</xsd:choice>
-			</xsd:complexType>
-		</xsd:element>
-	</xsd:schema>
-	<resheader name="resmimetype">
-		<value>text/microsoft-resx</value>
-	</resheader>
-	<resheader name="version">
-		<value>1.3</value>
-	</resheader>
-	<resheader name="reader">
-		<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-	</resheader>
-	<resheader name="writer">
-		<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-	</resheader>
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <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>
+  <data name="Merge_AddFiles" xml:space="preserve">
+    <value>Add Files</value>
+  </data>
+  <data name="Merge_AddOpenFile" xml:space="preserve">
+    <value>Add an Open File</value>
+  </data>
+  <data name="Merge_Hint" xml:space="preserve">
+    <value>Selected files
+Drop files here or Click “Add Files” at bottom right button. 
+Drag files to reorder as you need.</value>
+  </data>
+  <data name="Merge_ItemPages" xml:space="preserve">
+    <value>Pages</value>
+  </data>
+  <data name="Merge_No" xml:space="preserve">
+    <value>Cancel</value>
+  </data>
+  <data name="Merge_TitleFileName" xml:space="preserve">
+    <value>File Name</value>
+  </data>
+  <data name="Merge_TitlePageRange" xml:space="preserve">
+    <value>Page Range</value>
+  </data>
+  <data name="Merge_TitleSize" xml:space="preserve">
+    <value>Size</value>
+  </data>
+  <data name="Merge_Yes" xml:space="preserve">
+    <value>Merge</value>
+  </data>
+  <data name="Outline_Add" xml:space="preserve">
+    <value>Add Item</value>
+  </data>
+  <data name="Outline_AddLevel" xml:space="preserve">
+    <value>Add To Higher Level</value>
+  </data>
+  <data name="Outline_AddSub" xml:space="preserve">
+    <value>Add Sub-Item</value>
+  </data>
+  <data name="Outline_Change" xml:space="preserve">
+    <value>Change Destination</value>
+  </data>
+  <data name="Outline_Collapse" xml:space="preserve">
+    <value>Collapse All</value>
+  </data>
+  <data name="Outline_Delete" xml:space="preserve">
+    <value>Delete</value>
+  </data>
+  <data name="Outline_DialogContent" xml:space="preserve">
+    <value>Are you sure you want to set the destination as the current location?</value>
+  </data>
+  <data name="Outline_DialogNO" xml:space="preserve">
+    <value>No</value>
+  </data>
+  <data name="Outline_DialogYes" xml:space="preserve">
+    <value>Yes</value>
+  </data>
+  <data name="Outline_Down" xml:space="preserve">
+    <value>Demote</value>
+  </data>
+  <data name="Outline_Expand" xml:space="preserve">
+    <value>Expand All</value>
+  </data>
+  <data name="Outline_RemoveAll" xml:space="preserve">
+    <value>Remove All Outlines</value>
+  </data>
+  <data name="Outline_Rename" xml:space="preserve">
+    <value>Rename</value>
+  </data>
+  <data name="Outline_Title" xml:space="preserve">
+    <value>Outline</value>
+  </data>
+  <data name="Outline_Up" xml:space="preserve">
+    <value>Promote</value>
+  </data>
+  <data name="Signatur_DialogClear" xml:space="preserve">
+    <value>Clear</value>
+  </data>
+  <data name="Signatur_DialogDraw" xml:space="preserve">
+    <value>Drawing</value>
+    <comment>手绘分类</comment>
+  </data>
+  <data name="Signatur_DialogDrawHint" xml:space="preserve">
+    <value>Sign here</value>
+  </data>
+  <data name="Signatur_DialogNo" xml:space="preserve">
+    <value>Cancel</value>
+  </data>
+  <data name="Signatur_DialogPicture" xml:space="preserve">
+    <value>Image</value>
+    <comment>图片分类</comment>
+  </data>
+  <data name="Signatur_DialogPictureHint" xml:space="preserve">
+    <value>Select image file</value>
+  </data>
+  <data name="Signatur_DialogPictureReBkg" xml:space="preserve">
+    <value>Remove Background</value>
+    <comment>去背功能按钮描述</comment>
+  </data>
+  <data name="Signatur_DialogPictureReBkgHint" xml:space="preserve">
+    <value>Remove white background from images</value>
+    <comment>去背功能按钮悬浮提示</comment>
+  </data>
+  <data name="Signatur_DialogPictureReselect" xml:space="preserve">
+    <value>Reselect</value>
+  </data>
+  <data name="Signatur_DialogText" xml:space="preserve">
+    <value>Keyboard</value>
+    <comment>文字分类</comment>
+  </data>
+  <data name="Signatur_DialogTextHint" xml:space="preserve">
+    <value>Enter your signature here</value>
+  </data>
+  <data name="Signatur_DialogTitle" xml:space="preserve">
+    <value>Create New Signature</value>
+  </data>
+  <data name="Signatur_DialogYes" xml:space="preserve">
+    <value>Apply</value>
+  </data>
+  <data name="Signatur_Title" xml:space="preserve">
+    <value>Signature</value>
+  </data>
+  <data name="Stamp_Title" xml:space="preserve">
+    <value>Stamp</value>
+  </data>
+  <data name="WritableComboBox_AllPage" xml:space="preserve">
+    <value>All pages</value>
+  </data>
+  <data name="WritableComboBox_CustomRange" xml:space="preserve">
+    <value>Custom Range</value>
+  </data>
+  <data name="WritableComboBox_EvenPage" xml:space="preserve">
+    <value>Even Pages</value>
+  </data>
+  <data name="WritableComboBox_OddPage" xml:space="preserve">
+    <value>Odd Pages</value>
+  </data>
 </root>

+ 4 - 4
PDF Office/Strings/Service/Service.Designer.cs

@@ -22,7 +22,7 @@ namespace PDF_Office.Strings.Service {
     [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Service {
+    public class Service {
         
         private static global::System.Resources.ResourceManager resourceMan;
         
@@ -36,10 +36,10 @@ namespace PDF_Office.Strings.Service {
         ///   返回此类使用的缓存的 ResourceManager 实例。
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
+        public static global::System.Resources.ResourceManager ResourceManager {
             get {
                 if (object.ReferenceEquals(resourceMan, null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PDF_Office.String.Service.Service", typeof(Service).Assembly);
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PDF_Office.Strings.Service.Service", typeof(Service).Assembly);
                     resourceMan = temp;
                 }
                 return resourceMan;
@@ -51,7 +51,7 @@ namespace PDF_Office.Strings.Service {
         ///   使用此强类型资源类的所有资源查找执行重写。
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
+        public static global::System.Globalization.CultureInfo Culture {
             get {
                 return resourceCulture;
             }

+ 271 - 0
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/CreateFromScannerDialogsViewModel.cs

@@ -0,0 +1,271 @@
+using NTwain;
+using NTwain.Data;
+using PDF_Office.Model;
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Interop;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+
+namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
+{
+
+    //扫描仪设备
+    public class ScannerItem : BindableBase
+    {
+        public DataSource DataSourceItem { get; set; }
+        public ScannerItem(DataSource dataSource)
+        {
+            DataSourceItem = dataSource;
+            ScannerName = dataSource.Name;
+        }
+        public string ScannerName { get; set; }
+    }
+
+    public class CreateFromScannerDialogsViewModel : BindableBase, IDialogAware
+    {
+
+        private List<ScannerItem> _scanners = new List<ScannerItem>();
+        public List<ScannerItem> Scanners
+        {
+            get { return _scanners; }
+            set => SetProperty(ref _scanners, value);
+        }
+        //图片
+        private ImageSource _img;
+        public ImageSource Img
+        {
+            get { return _img; }
+            set => SetProperty(ref _img, value);
+        }
+
+       //没有检测到扫描仪
+        private bool _isEmptyScanner;
+        public bool IsEmptyScanner
+        {
+            get { return _isEmptyScanner; }
+            set => SetProperty(ref _isEmptyScanner, value);
+        }
+
+        //没有生成图片
+        private bool isEmptyImg;
+        public bool IsEmptyImg
+        {
+            get { return isEmptyImg; }
+            set => SetProperty(ref isEmptyImg, value);
+        }
+
+        public string Title => "";
+        //图片路径
+        public string FilePath { get; private set; }
+        private bool IsScanner = false;
+        public event Action<IDialogResult> RequestClose;
+
+        private TwainSession twain;
+
+
+        public DelegateCommand CancelCommand { get; set; }
+        public DelegateCommand CreateCommand { get; set; }
+        public DelegateCommand<object> SelectedScannerCommand { get; set; }
+
+        public CreateFromScannerDialogsViewModel()
+        {
+            CancelCommand = new DelegateCommand(cancel);
+            CreateCommand = new DelegateCommand(createFile, CanExcuteCreateFile).ObservesProperty(() => Img);
+            SelectedScannerCommand = new DelegateCommand<object>(SelectedScanner);
+
+            SetupTwain();
+
+            if (Scanners.Count > 0)
+                IsEmptyScanner = false;
+            else
+                IsEmptyScanner = true;
+        }
+
+        //选择扫描仪
+        private void SelectedScanner(object obj)
+        {
+            if(obj != null)
+            {
+                if (twain.State == 4)
+                {
+                    twain.CurrentSource.Close();
+                }
+                Img = null;
+                OpenSaveScanner();
+                var result = obj as ScannerItem;
+                if (result.DataSourceItem.Open() != ReturnCode.Success)
+                    MessageBox.Show("连接失败");
+                else
+                {
+                    
+                }
+                Preview();
+            }
+            
+        }
+
+        //启动检测扫描仪
+        private void SetupTwain()
+        {
+            var appId = TWIdentity.CreateFromAssembly(DataGroups.Image, Assembly.GetEntryAssembly());
+            twain = new TwainSession(appId);
+            twain.Open();
+            //Todo:在程序32位时,可正常扫描;
+            //在程序64位时,不能正常获取扫描仪,并崩溃:找不到TWAINDSM.DLL模块。
+
+            foreach (var s in twain.Select(s => new { DS = s }))
+            {
+                var item = new ScannerItem(s.DS);
+                Scanners.Add(item);
+            }
+
+            twain.TransferError += (s, e) =>
+            {
+                CloseSaveScanner();
+               // MessageBox.Show("图片传输错误:" + e.Exception.Message);
+            };
+            twain.DataTransferred += _session_DataTransferred;
+            twain.SourceDisabled += (s, e) =>
+            {
+                //MessageBox.Show("源数据已清除");
+            };
+            twain.TransferReady += (s, e) =>
+            {
+                //MessageBox.Show("数据传输就绪");
+            };
+
+            twain.SynchronizationContext = System.Threading.SynchronizationContext.Current;
+        }
+
+        //生成图片+预览图片
+        private void _session_DataTransferred(object sender, DataTransferredEventArgs e)
+        {
+            if (IsScanner)
+            {
+                string docPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
+                FilePath = docPath + "\\" + DateTime.Now.ToString("yyyy-MM-dd_hh-mm-ss") + ".png";
+
+                var encoder = new PngBitmapEncoder();
+                encoder.Frames.Add(BitmapFrame.Create(e.GetNativeImageStream().ConvertToWpfBitmap(300, 0)));
+                var test = encoder.Frames[0];
+                FileStream fileStream = new FileStream(FilePath, FileMode.Create, FileAccess.ReadWrite);
+                encoder.Save(fileStream);
+                fileStream.Close();
+                CloseSaveScanner();
+            }
+
+            ImageSource img = GenerateThumbnail(e);
+            if (img != null)
+            {
+                App.Current.Dispatcher.BeginInvoke(new Action(() =>
+                {
+                    Img = img;
+                }));
+            }
+        }
+
+        //图片缩略图
+        private ImageSource GenerateThumbnail(DataTransferredEventArgs e)
+        {
+            BitmapSource img = null;
+
+            switch (e.TransferType)
+            {
+                case XferMech.Native:
+                    using (var stream = e.GetNativeImageStream())
+                    {
+                        if (stream != null)
+                        {
+                            // twain.CurrentSource.Capabilities.ICapYResolution.SetValue();
+                            img = stream.ConvertToWpfBitmap(300, 0);
+                        }
+                    }
+                    break;
+                case XferMech.File:
+                    img = new BitmapImage(new Uri(e.FileDataPath));
+                    if (img.CanFreeze)
+                    {
+                        img.Freeze();
+                    }
+                    break;
+                case XferMech.Memory:
+                    // TODO: build current image from multiple data-xferred event
+                    break;
+            }
+            return img;
+        }
+
+        //预览图片
+        private void Preview()
+        {
+            if (twain.CurrentSource == null) return;
+
+            var windowsPtr = new WindowInteropHelper(Window.GetWindow(App.Current.MainWindow)).Handle;
+            twain.CurrentSource.Enable(SourceEnableMode.NoUI, false, windowsPtr);
+        }
+
+        private void CloseSaveScanner()
+        {
+            IsScanner = false;
+        }
+
+        private void OpenSaveScanner()
+        {
+            IsScanner = true;
+        }
+        /// <summary>
+        /// 是否可以创建
+        /// </summary>
+        /// <returns></returns>
+        private bool CanExcuteCreateFile()
+        {
+            if (Img == null)
+                IsEmptyImg = true;
+            else
+                IsEmptyImg = false;
+
+            return (Img != null);
+        }
+
+        //扫描,创建文件
+        private void createFile()
+        {
+            DialogParameters valuePairs = new DialogParameters();
+            valuePairs.Add(ParameterNames.DataModel, FilePath);
+            RequestClose.Invoke(new DialogResult(ButtonResult.OK, valuePairs));
+        }
+
+        private void cancel()
+        {
+            RequestClose.Invoke(new DialogResult(ButtonResult.Cancel));
+        }
+
+        #region 框架
+        public bool CanCloseDialog()
+        {
+            return true;
+        }
+
+        public void OnDialogClosed()
+        {
+
+        }
+
+        public void OnDialogOpened(IDialogParameters parameters)
+        {
+
+        }
+        #endregion
+
+    }
+}

PDF Office/ViewModels/PropertyPanel/AnnotPanel/SignatureCreateDialogViewModel.cs → PDF Office/ViewModels/Dialog/SignatureCreateDialogViewModel.cs


+ 14 - 2
PDF Office/ViewModels/Dialog/ToolsDialogs/MergeDialogViewModel.cs

@@ -103,6 +103,16 @@ namespace PDF_Office.ViewModels.Dialog.ToolsDialogs
                 SetProperty(ref inputHeight, value);
             }
         }
+        private int comboBoxSelectedIndex=0;
+
+        public int ComboBoxSelectedIndex
+        {
+            get { return comboBoxSelectedIndex; }
+            set
+            {
+                SetProperty(ref comboBoxSelectedIndex, value);
+            }
+        }
 
 
         public MergeDialogViewModel(IDialogService dialogService)
@@ -140,10 +150,12 @@ namespace PDF_Office.ViewModels.Dialog.ToolsDialogs
             {
                 case 0:
                     //打开文件
+                    ComboBoxSelectedIndex = 0;//打开文件弹窗会影响UI更新,所以手动更新
                     AddFiles(OpenFile());
                     break;
                 case 1:
                     //打开文件夹
+                    ComboBoxSelectedIndex = 1;//打开文件夹弹窗会影响UI更新,所以手动更新
                     AddFiles(OpenFileFolder());
                     break;
                 case 2:
@@ -399,7 +411,7 @@ namespace PDF_Office.ViewModels.Dialog.ToolsDialogs
                     };
 
                     mergeObject.DocName = Path.GetFileName(mergeObject.FilePath);
-                    mergeObject.DocPageCount = 1 + "页";
+                    mergeObject.DocPageCount = 1 + " " + App.MainPageLoader.GetString("Merge_ItemPages");
                     mergeObject.SDKPageCount = 1;
                     mergeObject.DocSize = CommonHelper.GetFileSize(mergeObject.FilePath);
                     mergeObject.DocThumbnail = new BitmapImage(new Uri(mergeObject.FilePath)); ;
@@ -427,7 +439,7 @@ namespace PDF_Office.ViewModels.Dialog.ToolsDialogs
                         continue;
                     }
                     mergeObject.DocName = doc.FileName;
-                    mergeObject.DocPageCount = doc.PageCount.ToString() + "页";
+                    mergeObject.DocPageCount = doc.PageCount.ToString() +" "+ App.MainPageLoader.GetString("Merge_ItemPages");
                     mergeObject.SDKPageCount = doc.PageCount;
                     mergeObject.DocSize = CommonHelper.GetFileSize(mergeObject.FilePath);
 

+ 10 - 1
PDF Office/ViewModels/HomeContentViewModel.cs

@@ -167,7 +167,16 @@ namespace PDF_Office.ViewModels
         /// </summary>
         private void createFromScanner()
         {
-
+            dialog.ShowDialog(DialogNames.CreateFromScannerDialogs, async e => {
+                if (e.Result == ButtonResult.OK)
+                {
+                    IsLoading = Visibility.Visible;
+                    var model = e.Parameters.GetValue<string>(ParameterNames.DataModel);
+                    mainContentViewModel.CreateFile(model);
+                    IsLoading = Visibility.Collapsed;
+                    
+                }
+            });
         }
 
         /// <summary>

+ 52 - 0
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Command.cs

@@ -428,6 +428,9 @@ namespace PDF_Office.ViewModels.Tools
                             {
                                 var selectedAnnot = e.AnnotEventArgsList[0];
                                 PopMenuCheckedLineDash(selectedAnnot);
+                                PopMenuCheckedFontFamily(selectedAnnot);
+                                PopMenuCheckedTextAglin(selectedAnnot);
+
                                 switch (selectedAnnot.EventType)
                                 {
                                     case AnnotArgsType.AnnotHighlight:
@@ -461,10 +464,12 @@ namespace PDF_Office.ViewModels.Tools
                                     case AnnotArgsType.AnnotSquare:
                                     case AnnotArgsType.AnnotCircle:
                                         ShapeAnnotPopMenu.SetVisual("ShapeDirect", false);
+                                        ShapeAnnotPopMenu.SetVisual("ShapeFillColor", true);
                                         e.PopupMenu = ShapeAnnotPopMenu.OpenMenu(selectedAnnot, sender);
                                         break;
 
                                     case AnnotArgsType.AnnotLine:
+                                        ShapeAnnotPopMenu.SetVisual("ShapeFillColor", false);
                                         ShapeAnnotPopMenu.SetVisual("ShapeDirect", true);
                                         e.PopupMenu = ShapeAnnotPopMenu.OpenMenu(selectedAnnot, sender);
                                         break;
@@ -526,6 +531,53 @@ namespace PDF_Office.ViewModels.Tools
             }
         }
 
+        //右键菜单,选中字体样式按钮状态
+        private void PopMenuCheckedFontFamily(AnnotHandlerEventArgs annot)
+        {
+            if (annot != null)
+            {
+                if (annot.EventType == AnnotArgsType.AnnotFreeText)
+                {
+                    var freeText = annot as FreeTextAnnotArgs;
+                    FreeTextAnnotPopMenu.SetIsChecked(freeText.FontFamily.ToString(), true);
+                }
+            }
+        }
+
+        //右键菜单,选中文本内容对齐按钮状态
+        private void PopMenuCheckedTextAglin(AnnotHandlerEventArgs annot)
+        {
+            if (annot != null)
+            {
+                if (annot.EventType == AnnotArgsType.AnnotFreeText)
+                {
+                    var freeText = annot as FreeTextAnnotArgs;
+                    switch(freeText.Align)
+                    {
+                        case TextAlignment.Left:
+                            FreeTextAnnotPopMenu.SetIsChecked("FreeTextAglinLeft", true);
+                            break;
+                        case TextAlignment.Center:
+                            FreeTextAnnotPopMenu.SetIsChecked("FreeTextAglinCenter", true);
+                            break;
+                        case TextAlignment.Right:
+                            FreeTextAnnotPopMenu.SetIsChecked("FreeTextAglinRight", true);
+                            break;
+                        case TextAlignment.Justify:
+                            FreeTextAnnotPopMenu.SetIsChecked("FreeTextAglinJustify", true);
+                            break;
+                        default:
+                            FreeTextAnnotPopMenu.SetIsChecked("FreeTextAglinLeft", false);
+                            FreeTextAnnotPopMenu.SetIsChecked("FreeTextAglinCenter", false);
+                            FreeTextAnnotPopMenu.SetIsChecked("FreeTextAglinRight", false);
+                            FreeTextAnnotPopMenu.SetIsChecked("FreeTextAglinJustify", false);
+                            break;
+                    }
+
+                }
+            }
+        }
+
         //右键菜单,选中虚实线按钮状态
         private void PopMenuCheckedLineDash(AnnotHandlerEventArgs annot)
         {

+ 369 - 53
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Function.cs

@@ -271,11 +271,20 @@ namespace PDF_Office.ViewModels.Tools
                 highlightArgs.Transparency = highLightOpacity;
                 highlightArgs.Color = (highLightColor as SolidColorBrush).Color;
 
-                if (highlightArgs != null)
+                var defaultAnnot = SettingHelper.GetAnnotDefaultProperty(highlightArgs.EventType);
+                if (defaultAnnot == null)
                 {
-                    selectedArgs = new List<AnnotHandlerEventArgs>();
-                    selectedArgs.Add(highlightArgs);
+                    defaultAnnot = new DefaultAnnotProperty();
+                    defaultAnnot.AnnotToolType = highlightArgs.EventType;
+                    defaultAnnot.ForgoundColor = (highLightColor as SolidColorBrush).Color;
+                    defaultAnnot.Opacity = 1;
+                    Settings.Default.Save();
                 }
+
+                highLightOpacity = highlightArgs.Transparency = defaultAnnot.Opacity;
+
+                selectedArgs = new List<AnnotHandlerEventArgs>();
+                selectedArgs.Add(highlightArgs);
             }
             else
             {
@@ -328,11 +337,20 @@ namespace PDF_Office.ViewModels.Tools
                 underlineArgs.Transparency = UnderLineOpacity;
                 underlineArgs.Color = (UnderLineColor as SolidColorBrush).Color;
 
-                if (underlineArgs != null)
+                var defaultAnnot = SettingHelper.GetAnnotDefaultProperty(underlineArgs.EventType);
+                if (defaultAnnot == null)
                 {
-                    selectedArgs = new List<AnnotHandlerEventArgs>();
-                    selectedArgs.Add(underlineArgs);
+                    defaultAnnot = new DefaultAnnotProperty();
+                    defaultAnnot.AnnotToolType = underlineArgs.EventType;
+                    defaultAnnot.ForgoundColor = (UnderLineColor as SolidColorBrush).Color;
+                    defaultAnnot.Opacity = 1;
+                    Settings.Default.Save();
                 }
+
+                UnderLineOpacity = underlineArgs.Transparency = defaultAnnot.Opacity;
+
+                selectedArgs = new List<AnnotHandlerEventArgs>();
+                selectedArgs.Add(underlineArgs);
             }
             else
             {
@@ -358,11 +376,21 @@ namespace PDF_Office.ViewModels.Tools
                 squigglyArgs.Transparency = SquigglyOpacity;
                 squigglyArgs.Color = (squigglyColor as SolidColorBrush).Color;
 
-                if (squigglyArgs != null)
+                var defaultAnnot = SettingHelper.GetAnnotDefaultProperty(squigglyArgs.EventType);
+                if (defaultAnnot == null)
                 {
-                    selectedArgs = new List<AnnotHandlerEventArgs>();
-                    selectedArgs.Add(squigglyArgs);
+                    defaultAnnot = new DefaultAnnotProperty();
+                    defaultAnnot.AnnotToolType = squigglyArgs.EventType;
+                    defaultAnnot.ForgoundColor = (squigglyColor as SolidColorBrush).Color;
+                    defaultAnnot.Opacity = 1;
+                    Settings.Default.Save();
                 }
+
+                SquigglyOpacity = squigglyArgs.Transparency = defaultAnnot.Opacity;
+                
+
+                selectedArgs = new List<AnnotHandlerEventArgs>();
+                selectedArgs.Add(squigglyArgs);
             }
             else
             {
@@ -388,11 +416,20 @@ namespace PDF_Office.ViewModels.Tools
                 strikeoutArgs.Transparency = strikeoutOpacity;
                 strikeoutArgs.Color = (strikeoutColor as SolidColorBrush).Color;
 
-                if (strikeoutArgs != null)
+                var defaultAnnot = SettingHelper.GetAnnotDefaultProperty(strikeoutArgs.EventType);
+                if (defaultAnnot == null)
                 {
-                    selectedArgs = new List<AnnotHandlerEventArgs>();
-                    selectedArgs.Add(strikeoutArgs);
+                    defaultAnnot = new DefaultAnnotProperty();
+                    defaultAnnot.AnnotToolType = strikeoutArgs.EventType;
+                    defaultAnnot.ForgoundColor = (strikeoutColor as SolidColorBrush).Color;
+                    defaultAnnot.Opacity = 1;
+                    Settings.Default.Save();
                 }
+
+                strikeoutArgs.Transparency = defaultAnnot.Opacity;
+
+                selectedArgs = new List<AnnotHandlerEventArgs>();
+                selectedArgs.Add(strikeoutArgs);
             }
             else
             {
@@ -425,14 +462,35 @@ namespace PDF_Office.ViewModels.Tools
                     freehandArgs.InkColor = Color.FromRgb(0x38, 0xE0, 0x2E);
                 }
 
-                freehandArgs.Transparency = 1;
-                freehandArgs.LineWidth = 2;
+                var defaultAnnot = SettingHelper.GetAnnotDefaultProperty(freehandArgs.EventType);
+                if (defaultAnnot == null)
+                {
+                    defaultAnnot = new DefaultAnnotProperty();
+                    defaultAnnot.AnnotToolType = freehandArgs.EventType;
+                    defaultAnnot.ForgoundColor = annotate.FreeHandColor;
+                    defaultAnnot.Opacity = 1;
+                    Settings.Default.Save();
+                }
+
+                freehandArgs.Transparency = defaultAnnot.Opacity;
+                freehandArgs.LineWidth = defaultAnnot.Thickness;
 
-                if (freehandArgs != null)
+                if (defaultAnnot.DashArray == null || defaultAnnot.DashArray.Count == 0)
                 {
-                    selectedArgs = new List<AnnotHandlerEventArgs>();
-                    selectedArgs.Add(freehandArgs);
+                    freehandArgs.LineDash = DashStyles.Solid;
+                }
+                else
+                {
+                    var collect = new DoubleCollection();
+                    foreach (var item in defaultAnnot.DashArray)
+                    {
+                        collect.Add(item);
+                    }
+                    freehandArgs.LineDash.Dashes = collect;
                 }
+
+                selectedArgs = new List<AnnotHandlerEventArgs>();
+                selectedArgs.Add(freehandArgs);
             }
             else
             {
@@ -467,15 +525,34 @@ namespace PDF_Office.ViewModels.Tools
                     freetextArgs.FontColor = Colors.Black;
                 }
 
-                freetextArgs.Align = TextAlignment.Left;
-                freetextArgs.BgColor = Colors.Transparent;
-                freetextArgs.FontFamily = new FontFamily(Settings.Default.AppProperties.Annotate.TextFontFamaily);
-                freetextArgs.FontColor = Colors.Black;
-                freetextArgs.FontSize = 14;
-                freetextArgs.Transparency = 1;
-                freetextArgs.LineColor = Colors.Black;
-                freetextArgs.LineWidth = 0;
-                freetextArgs.TextContent = string.Empty;
+                var defaultAnnot = SettingHelper.GetAnnotDefaultProperty(freetextArgs.EventType);
+                if (defaultAnnot == null)
+                {
+                    defaultAnnot = new DefaultAnnotProperty();
+                    defaultAnnot.AnnotToolType = freetextArgs.EventType;
+                    defaultAnnot.ForgoundColor = freetextArgs.FontColor;
+                    defaultAnnot.BorderColor = Colors.Transparent;
+                    defaultAnnot.BackgroundColor = Colors.Transparent;
+                    defaultAnnot.Opacity = 1;
+                    defaultAnnot.FontFamily = Settings.Default.AppProperties.Annotate.TextFontFamaily;
+                    defaultAnnot.FontSize = 14;
+                    defaultAnnot.TextAlign = TextAlignment.Left;
+                    defaultAnnot.Thickness = 0;
+                    defaultAnnot.NoteText = string.Empty;
+
+                    Settings.Default.Save();
+                }
+
+                freetextArgs.FontColor = defaultAnnot.ForgoundColor;
+                freetextArgs.LineColor = defaultAnnot.BorderColor;
+                freetextArgs.BgColor = defaultAnnot.BackgroundColor;
+                freetextArgs.Transparency = defaultAnnot.Opacity;
+                freetextArgs.FontFamily = new FontFamily(defaultAnnot.FontFamily);
+                freetextArgs.FontSize = defaultAnnot.FontSize;
+                freetextArgs.FontWeight = defaultAnnot.FontWeight;
+                freetextArgs.FontStyle = defaultAnnot.FontStyle;
+                freetextArgs.LineWidth = defaultAnnot.Thickness;
+
 
                 int align = (int)Settings.Default.AppProperties.Annotate.TextAlign;
 
@@ -486,6 +563,8 @@ namespace PDF_Office.ViewModels.Tools
                 else
                     textAlignment = TextAlignment.Right;
 
+                freetextArgs.Align = textAlignment;
+
                 if (freetextArgs != null)
                 {
                     selectedArgs = new List<AnnotHandlerEventArgs>();
@@ -522,8 +601,18 @@ namespace PDF_Office.ViewModels.Tools
                 {
                     stickyAnnotArgs.Color = Color.FromRgb(0xFF, 0x81, 0x33);
                 }
-                stickyAnnotArgs.StickyNote = string.Empty;
-                stickyAnnotArgs.Transparency = 1;
+
+                var defaultAnnot = SettingHelper.GetAnnotDefaultProperty(stickyAnnotArgs.EventType);
+                if (defaultAnnot == null)
+                {
+                    defaultAnnot = new DefaultAnnotProperty();
+                    defaultAnnot.AnnotToolType = stickyAnnotArgs.EventType;
+                    defaultAnnot.NoteText = string.Empty;
+                    defaultAnnot.Opacity = 1;
+                    Settings.Default.Save();
+                }
+
+                stickyAnnotArgs.Transparency = defaultAnnot.Opacity;
 
                 if (stickyAnnotArgs != null)
                 {
@@ -568,10 +657,33 @@ namespace PDF_Office.ViewModels.Tools
                     squareArgs.BgColor = Colors.Red;
                 }
 
-                squareArgs.LineWidth = 1;
-                squareArgs.Transparency = 1;
-                squareArgs.LineDash = DashStyles.Solid;
-                squareArgs.Content = string.Empty;
+                var defaultAnnot = SettingHelper.GetAnnotDefaultProperty(squareArgs.EventType);
+                if (defaultAnnot == null)
+                {
+                    defaultAnnot = new DefaultAnnotProperty();
+                    defaultAnnot.AnnotToolType = squareArgs.EventType;
+                    defaultAnnot.Thickness = 1;
+                    defaultAnnot.Opacity = 1;
+                    Settings.Default.Save();
+                }
+
+                squareArgs.LineWidth = defaultAnnot.Thickness;
+                squareArgs.Transparency = defaultAnnot.Opacity;
+
+                if (defaultAnnot.DashArray == null || defaultAnnot.DashArray.Count == 0)
+                {
+                    squareArgs.LineDash = DashStyles.Solid;
+                }
+                else
+                {
+                    var collect = new DoubleCollection();
+                    foreach (var item in defaultAnnot.DashArray)
+                    {
+                        collect.Add(item);
+                    }
+                    squareArgs.LineDash.Dashes = collect;
+                }
+
                 if (squareArgs != null)
                 {
                     selectedArgs = new List<AnnotHandlerEventArgs>();
@@ -611,10 +723,35 @@ namespace PDF_Office.ViewModels.Tools
                     circleAnnotArgs.BgColor = Colors.Red;
                 }
 
-                circleAnnotArgs.LineWidth = 1;
-                circleAnnotArgs.Transparency = 1;
-                circleAnnotArgs.LineDash = DashStyles.Solid;
-                circleAnnotArgs.Content = string.Empty;
+                var defaultAnnot = SettingHelper.GetAnnotDefaultProperty(circleAnnotArgs.EventType);
+                if (defaultAnnot == null)
+                {
+                    defaultAnnot = new DefaultAnnotProperty();
+                    defaultAnnot.AnnotToolType = circleAnnotArgs.EventType;
+                    defaultAnnot.Thickness = 1;
+                    defaultAnnot.Opacity = 1;
+                    defaultAnnot.NoteText = string.Empty;
+                    defaultAnnot.DashArray = null;
+                    Settings.Default.Save();
+                }
+
+                circleAnnotArgs.LineWidth = defaultAnnot.Thickness;
+                circleAnnotArgs.Transparency = defaultAnnot.Opacity;
+
+                if(defaultAnnot.DashArray == null || defaultAnnot.DashArray.Count == 0)
+                {
+                    circleAnnotArgs.LineDash = DashStyles.Solid;
+                }
+                else
+                {
+                    var collect = new DoubleCollection();
+                    foreach(var item in defaultAnnot.DashArray)
+                    {
+                        collect.Add(item);
+                    }
+                    circleAnnotArgs.LineDash.Dashes = collect;
+                }
+                
 
                 if (circleAnnotArgs != null)
                 {
@@ -662,10 +799,37 @@ namespace PDF_Office.ViewModels.Tools
                 {
                     lineArgs.TailLineType = C_LINE_TYPE.LINETYPE_ARROW;
                 }
+
+                var defaultAnnot = SettingHelper.GetAnnotDefaultProperty(lineArgs.EventType);
+                if (defaultAnnot == null)
+                {
+                    defaultAnnot = new DefaultAnnotProperty();
+                    defaultAnnot.AnnotToolType = lineArgs.EventType;
+                    defaultAnnot.Thickness = 1;
+                    defaultAnnot.Opacity = 1;
+                    defaultAnnot.NoteText = string.Empty;
+                    defaultAnnot.DashArray = null;
+                    Settings.Default.Save();
+                }
+
                 lineArgs.LineDash = DashStyles.Solid;
-                lineArgs.LineWidth = 1;
-                lineArgs.Transparency = 1;
-                lineArgs.Content = string.Empty;
+                lineArgs.LineWidth = defaultAnnot.Thickness;
+                lineArgs.Transparency = defaultAnnot.Opacity;
+
+                if (defaultAnnot.DashArray == null || defaultAnnot.DashArray.Count == 0)
+                {
+                    lineArgs.LineDash = DashStyles.Solid;
+                }
+                else
+                {
+                    var collect = new DoubleCollection();
+                    foreach (var item in defaultAnnot.DashArray)
+                    {
+                        collect.Add(item);
+                    }
+                    lineArgs.LineDash.Dashes = collect;
+                }
+
 
                 if (lineArgs != null)
                 {
@@ -1011,25 +1175,66 @@ namespace PDF_Office.ViewModels.Tools
                     if (annot is TextHighlightAnnotArgs)
                     {
                         var color = (annot as TextHighlightAnnotArgs).Color;
-                        Settings.Default.AppProperties.Annotate.HighLightColor = color;
                         HighLightColor = new SolidColorBrush(color);
+
+                        Settings.Default.AppProperties.Annotate.HighLightColor = color;
+
+                        var hightlight = GetAnnotDefault(AnnotArgsType.AnnotHighlight);
+                        hightlight.ForgoundColor = color;
+                        hightlight.Opacity = (annot as TextHighlightAnnotArgs).Transparency;
+                        SettingHelper.SetAnnotDefaultProperty(hightlight);
                     }
                     else if (annot is TextUnderlineAnnotArgs)
                     {
-                        var color = (annot as TextHighlightAnnotArgs).Color;
-                        Settings.Default.AppProperties.Annotate.UnderLineColor = color;
+                        var color = (annot as TextUnderlineAnnotArgs).Color;
                         UnderLineColor = new SolidColorBrush(color);
+
+                        Settings.Default.AppProperties.Annotate.UnderLineColor = color;
+
+                        var Underline = GetAnnotDefault(AnnotArgsType.AnnotUnderline);
+                        Underline.ForgoundColor = color;
+                        Underline.Opacity = (annot as TextUnderlineAnnotArgs).Transparency;
+                        SettingHelper.SetAnnotDefaultProperty(Underline);
                     }
                     else if (annot is TextStrikeoutAnnotArgs)
                     {
-                        var color = (annot as TextHighlightAnnotArgs).Color;
-                        Settings.Default.AppProperties.Annotate.StrikethroughColor = color;
+                        var color = (annot as TextStrikeoutAnnotArgs).Color;
                         StrikeoutColor = new SolidColorBrush(color);
+
+                        Settings.Default.AppProperties.Annotate.StrikethroughColor = color;
+
+                        var Strikeout = GetAnnotDefault(AnnotArgsType.AnnotStrikeout);
+                        Strikeout.ForgoundColor = color;
+                        Strikeout.Opacity = (annot as TextStrikeoutAnnotArgs).Transparency;
+                        SettingHelper.SetAnnotDefaultProperty(Strikeout);
                     }
                     else if (annot is FreehandAnnotArgs)
                     {
-                        var color = (annot as FreehandAnnotArgs).InkColor;
+                        var freeHand = annot as FreehandAnnotArgs;
+                        var color = freeHand.InkColor;
+
                         Settings.Default.AppProperties.Annotate.FreeHandColor = color;
+
+                        var FreehandDefault = GetAnnotDefault(AnnotArgsType.AnnotFreehand);
+                        FreehandDefault.ForgoundColor = color;
+                        FreehandDefault.Opacity = freeHand.Transparency;
+                        FreehandDefault.Thickness = freeHand.LineWidth;
+
+                        var isSolid = AnnotPropertyPanel.IsSolidStyle(freeHand.LineDash);
+                        if (isSolid)
+                        {
+                            FreehandDefault.DashArray = null;
+                        }
+                        else
+                        {
+                            FreehandDefault.DashArray = new List<double>();
+                            foreach (var item in freeHand.LineDash.Dashes)
+                            {
+                                FreehandDefault.DashArray.Add(item);
+                            }
+                        }
+
+                        SettingHelper.SetAnnotDefaultProperty(FreehandDefault);
                     }
                     else if (annot is FreeTextAnnotArgs)
                     {
@@ -1037,30 +1242,113 @@ namespace PDF_Office.ViewModels.Tools
                         Settings.Default.AppProperties.Annotate.TextAnnoteColor = freeText.FontColor;
                         Settings.Default.AppProperties.Annotate.TextFontFamaily = freeText.FontFamily.ToString();
                         Settings.Default.AppProperties.Annotate.TextAlign = freeText.Align;
+
+                        var FreeTextDefalut = GetAnnotDefault(AnnotArgsType.AnnotFreeText);
+                        FreeTextDefalut.ForgoundColor = freeText.FontColor;
+                        FreeTextDefalut.FontFamily = freeText.FontFamily.ToString();
+                        FreeTextDefalut.TextAlign = freeText.Align;
+                        FreeTextDefalut.FontSize = freeText.FontSize;
+                        FreeTextDefalut.FontWeight = freeText.FontWeight;
+                        FreeTextDefalut.FontStyle = freeText.FontStyle;
+                        FreeTextDefalut.BackgroundColor = freeText.BgColor;
+                        FreeTextDefalut.Opacity = (annot as FreeTextAnnotArgs).Transparency;
+                        SettingHelper.SetAnnotDefaultProperty(FreeTextDefalut);
                     }
                     else if (annot is StickyAnnotArgs)
                     {
                         var color = (annot as StickyAnnotArgs).Color;
                         Settings.Default.AppProperties.Annotate.NoteAnnoteColor = color;
+                        var StickyDefalut = GetAnnotDefault(AnnotArgsType.AnnotSticky);
+                        StickyDefalut.ForgoundColor = color;
+
+                        SettingHelper.SetAnnotDefaultProperty(StickyDefalut);
                     }
                     else if (annot is SquareAnnotArgs)
                     {
-                        var bgColor = (annot as SquareAnnotArgs).BgColor;
+                        var square = annot as SquareAnnotArgs;
+                        var bgColor = square.BgColor;
                         Settings.Default.AppProperties.Annotate.RectangleFillColor = bgColor;
-                        var borderColor = (annot as SquareAnnotArgs).LineColor;
+                        var borderColor = square.LineColor;
                         Settings.Default.AppProperties.Annotate.RectangleBorderColor = borderColor;
+
+                        var SquareDefalut = GetAnnotDefault(AnnotArgsType.AnnotSquare);
+                        SquareDefalut.BorderColor = borderColor;
+                        SquareDefalut.BackgroundColor = bgColor;
+                        SquareDefalut.Opacity = square.Transparency;
+                        SquareDefalut.Thickness = square.LineWidth;
+
+                        var isSolid = AnnotPropertyPanel.IsSolidStyle(square.LineDash);
+                        if (isSolid)
+                        {
+                            SquareDefalut.DashArray = null;
+                        }
+                        else
+                        {
+                            SquareDefalut.DashArray = new List<double>();
+                            foreach (var item in square.LineDash.Dashes)
+                            {
+                                SquareDefalut.DashArray.Add(item);
+                            }
+                        }
+
+                        SettingHelper.SetAnnotDefaultProperty(SquareDefalut);
                     }
                     else if (annot is CircleAnnotArgs)
                     {
-                        var bgColor = (annot as CircleAnnotArgs).BgColor;
+                        var circle = annot as CircleAnnotArgs;
+                        var bgColor = circle.BgColor;
                         Settings.Default.AppProperties.Annotate.CircleFillColor = bgColor;
-                        var borderColor = (annot as CircleAnnotArgs).LineColor;
+                        var borderColor = circle.LineColor;
                         Settings.Default.AppProperties.Annotate.CircleBorderColor = borderColor;
+
+                        var CircleDefalut = GetAnnotDefault(AnnotArgsType.AnnotCircle);
+                        CircleDefalut.BorderColor = borderColor;
+                        CircleDefalut.BackgroundColor = bgColor;
+                        CircleDefalut.Opacity = circle.Transparency;
+                        CircleDefalut.Thickness = circle.LineWidth;
+
+                        var isSolid = AnnotPropertyPanel.IsSolidStyle(circle.LineDash);
+                        if (isSolid)
+                        {
+                            CircleDefalut.DashArray = null;
+                        }
+                        else
+                        {
+                            CircleDefalut.DashArray = new List<double>();
+                            foreach (var item in circle.LineDash.Dashes)
+                            {
+                                CircleDefalut.DashArray.Add(item);
+                            }
+                        }
+
+                        SettingHelper.SetAnnotDefaultProperty(CircleDefalut);
                     }
                     else if (annot is LineAnnotArgs)
                     {
+                        var line = (annot as LineAnnotArgs);
                         var color = (annot as LineAnnotArgs).LineColor;
                         Settings.Default.AppProperties.Annotate.LineColor = color;
+
+                        var lineDefalut = GetAnnotDefault(AnnotArgsType.AnnotLine);
+                        lineDefalut.BorderColor = color;
+                        lineDefalut.Opacity = (annot as LineAnnotArgs).Transparency;
+                        lineDefalut.Thickness = (annot as LineAnnotArgs).LineWidth;
+
+                        var isSolid = AnnotPropertyPanel.IsSolidStyle(line.LineDash);
+                        if (isSolid)
+                        {
+                            lineDefalut.DashArray = null;
+                        }
+                        else
+                        {
+                            lineDefalut.DashArray = new List<double>();
+                            foreach (var item in line.LineDash.Dashes)
+                            {
+                                lineDefalut.DashArray.Add(item);
+                            }
+                        }
+
+                        SettingHelper.SetAnnotDefaultProperty(lineDefalut);
                     }
 
                     Settings.Default.Save();
@@ -1068,6 +1356,17 @@ namespace PDF_Office.ViewModels.Tools
             }
         }
 
+        private DefaultAnnotProperty GetAnnotDefault(AnnotArgsType annotArgsType)
+        {
+            var Annot = SettingHelper.GetAnnotDefaultProperty(annotArgsType);
+            if (Annot == null)
+            {
+                Annot = new DefaultAnnotProperty();
+                Annot.AnnotToolType = annotArgsType;
+            }
+            return Annot;
+        }
+
         private System.Windows.Controls.Primitives.Popup popup = null;
 
         //更改颜色
@@ -1080,7 +1379,7 @@ namespace PDF_Office.ViewModels.Tools
                 if (annot != null)
                 {
                     var item = new ColorDropBoxPop();
-                    item.DataContext = annot;
+                    item.DataContext = menu;
                     item.ColorSelected -= AnnotMenu_ColorSelected;
                     item.ColorSelected += AnnotMenu_ColorSelected;
 
@@ -1131,7 +1430,10 @@ namespace PDF_Office.ViewModels.Tools
         {
             if (sender != null)
             {
-                var annot = (sender as FrameworkElement).DataContext as AnnotHandlerEventArgs;
+                var menu = (sender as FrameworkElement).DataContext as CusMenuItem;
+                if (menu == null) return;
+
+                var annot = menu.Parameter as AnnotHandlerEventArgs;
                 if (annot != null)
                 {
                     if (annot is FreehandAnnotArgs || annot is StickyAnnotArgs || annot is LineAnnotArgs)
@@ -1143,13 +1445,21 @@ namespace PDF_Office.ViewModels.Tools
                     else if (annot is FreeTextAnnotArgs)
                     {
                         var AnnotEvent = AnnotAttribEvent.GetAnnotAttribEvent(annot, annot.GetAnnotAttrib());
-                        AnnotEvent?.UpdateAttrib(AnnotAttrib.FontColor, e);
+                        if (menu.tag.ToString() == "FontColor")
+                            AnnotEvent?.UpdateAttrib(AnnotAttrib.FontColor, e);
+                        else
+                            AnnotEvent?.UpdateAttrib(AnnotAttrib.FillColor, e);
+
                         AnnotEvent?.UpdateAnnot();
                     }
                     else if (annot is SquareAnnotArgs || annot is CircleAnnotArgs)
                     {
                         var AnnotEvent = AnnotAttribEvent.GetAnnotAttribEvent(annot, annot.GetAnnotAttrib());
-                        AnnotEvent?.UpdateAttrib(AnnotAttrib.FillColor, e);
+                        if (menu.tag.ToString() == "FillColor")
+                            AnnotEvent?.UpdateAttrib(AnnotAttrib.FillColor, e);
+                        else
+                            AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, e);
+
                         AnnotEvent?.UpdateAnnot();
                     }
                     else if (annot is TextHighlightAnnotArgs || annot is TextUnderlineAnnotArgs || annot is TextStrikeoutAnnotArgs)
@@ -1159,6 +1469,7 @@ namespace PDF_Office.ViewModels.Tools
                         AnnotEvent?.UpdateAnnot();
                     }
                 }
+             
             }
         }
 
@@ -1269,6 +1580,11 @@ namespace PDF_Office.ViewModels.Tools
                     {
                         AnnotEvent?.UpdateAttrib(AnnotAttrib.TextAlign, TextAlignment.Right);
                     }
+                    else if (strTag == "Justify")
+                    {
+                        AnnotEvent?.UpdateAttrib(AnnotAttrib.TextAlign, TextAlignment.Justify);
+                    }
+
                     AnnotEvent?.UpdateAnnot();
                 }
             }

+ 65 - 35
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Layout.cs

@@ -5,6 +5,7 @@ using ComPDFKitViewer.PdfViewer;
 using PDF_Office.CustomControl;
 using PDF_Office.CustomControl.CompositeControl;
 using PDF_Office.Helper;
+using PDF_Office.Model.PropertyPanel.AnnotPanel;
 using Prism.Mvvm;
 using Prism.Regions;
 using System;
@@ -534,7 +535,8 @@ namespace PDF_Office.ViewModels.Tools
 
             menuItem = new MenuItem();
             menuItem.Name = "FreeHandColor";
-            menuItem.Header = "颜色...";
+            menuItem.Header = "边框颜色";
+            menuItem.Tag = "Color";
             pop.BindingEvent(pop.AddItem(menuItem), AnnotColorPalette_MenuCommand);
 
             menuItem = new MenuItem();
@@ -603,7 +605,14 @@ namespace PDF_Office.ViewModels.Tools
 
             menuItem = new MenuItem();
             menuItem.Name = "FreeTextColor";
-            menuItem.Header = "颜色...";
+            menuItem.Header = "字体颜色";
+            menuItem.Tag = "FontColor";
+            pop.BindingEvent(pop.AddItem(menuItem), AnnotColorPalette_MenuCommand);
+
+            menuItem = new MenuItem();
+            menuItem.Name = "FreeTextColor";
+            menuItem.Header = "填充颜色";
+            menuItem.Tag = "FillColor";
             pop.BindingEvent(pop.AddItem(menuItem), AnnotColorPalette_MenuCommand);
 
             menuItem = new MenuItem();
@@ -611,46 +620,60 @@ namespace PDF_Office.ViewModels.Tools
             menuItem.Header = "字体";
             pop.AddItem(menuItem);
 
-            menuItem = new MenuItem();
-            menuItem.Name = "FreeTextArial";
-            menuItem.Header = "楷体";
-            menuItem.Tag = "Arial";
-            pop.BindingEvent(pop.AddChild("FreeTextFontFamily", menuItem), FreeTextFontFamily_MenuCommand);
-
-            menuItem = new MenuItem();
-            menuItem.Name = "FreeTextCourier";
-            menuItem.Header = "Courier";
-            menuItem.Tag = "Courier";
-            pop.BindingEvent(pop.AddChild("FreeTextFontFamily", menuItem), FreeTextFontFamily_MenuCommand);
+            var family = TextFont.GetFamily();
 
-            menuItem = new MenuItem();
-            menuItem.Name = "FreeTextTimesRoman";
-            menuItem.Header = "Times New Roman";
-            menuItem.Tag = /*"Times New Roman"*/"Times";
-            pop.BindingEvent(pop.AddChild("FreeTextFontFamily", menuItem), FreeTextFontFamily_MenuCommand);
+            foreach (var item in family)
+            {
+                RadioButton familyRdioBtn = new RadioButton();
+                familyRdioBtn.Style = App.Current.Resources["MenuRadioBtnStyle"] as Style;
+                familyRdioBtn.Background = new SolidColorBrush(Colors.Transparent);
+                familyRdioBtn.Name = item.ValueStr;
+                familyRdioBtn.Tag = item.ValueStr;
+                familyRdioBtn.GroupName = "FontFamily";
+                familyRdioBtn.Content = item.Content;
+                pop.BindingEvent(pop.AddChild("FreeTextFontFamily", familyRdioBtn), FreeTextFontFamily_MenuCommand);
+            }
 
             menuItem = new MenuItem();
             menuItem.Name = "FreeTextAglin";
             menuItem.Header = "文本对齐";
             pop.AddItem(menuItem);
 
-            menuItem = new MenuItem();
-            menuItem.Name = "FreeTextAglinLeft";
-            menuItem.Header = "左对齐";
-            menuItem.Tag = "Left";
-            pop.BindingEvent(pop.AddChild("FreeTextAglin", menuItem), FreeTextAglin_MenuCommand);
+            var radioButton = new RadioButton();
+            radioButton.Style = App.Current.Resources["MenuRadioBtnStyle"] as Style;
+            radioButton.Background = new SolidColorBrush(Colors.Transparent);
+            radioButton.Name = "FreeTextAglinLeft";
+            radioButton.Tag = "Left";
+            radioButton.GroupName = "Aglin";
+            radioButton.Content = "左对齐";
+            pop.BindingEvent(pop.AddChild("FreeTextAglin", radioButton), FreeTextAglin_MenuCommand);
 
-            menuItem = new MenuItem();
-            menuItem.Name = "FreeTextAglinCenter";
-            menuItem.Header = "居中对齐";
-            menuItem.Tag = "Center";
-            pop.BindingEvent(pop.AddChild("FreeTextAglin", menuItem), FreeTextAglin_MenuCommand);
+            radioButton = new RadioButton();
+            radioButton.Style = App.Current.Resources["MenuRadioBtnStyle"] as Style;
+            radioButton.Background = new SolidColorBrush(Colors.Transparent);
+            radioButton.Name = "FreeTextAglinCenter";
+            radioButton.Tag = "Center";
+            radioButton.GroupName = "Aglin";
+            radioButton.Content = "居中对齐";
+            pop.BindingEvent(pop.AddChild("FreeTextAglin", radioButton), FreeTextAglin_MenuCommand);
 
-            menuItem = new MenuItem();
-            menuItem.Name = "FreeTextAglinRight";
-            menuItem.Header = "右对齐";
-            menuItem.Tag = "Right";
-            pop.BindingEvent(pop.AddChild("FreeTextAglin", menuItem), FreeTextAglin_MenuCommand);
+            radioButton = new RadioButton();
+            radioButton.Style = App.Current.Resources["MenuRadioBtnStyle"] as Style;
+            radioButton.Background = new SolidColorBrush(Colors.Transparent);
+            radioButton.Name = "FreeTextAglinRight";
+            radioButton.Tag = "Right";
+            radioButton.GroupName = "Aglin";
+            radioButton.Content = "右对齐";
+            pop.BindingEvent(pop.AddChild("FreeTextAglin", radioButton), FreeTextAglin_MenuCommand);
+
+            radioButton = new RadioButton();
+            radioButton.Style = App.Current.Resources["MenuRadioBtnStyle"] as Style;
+            radioButton.Background = new SolidColorBrush(Colors.Transparent);
+            radioButton.Name = "FreeTextAglinJustify";
+            radioButton.Tag = "Justify";
+            radioButton.GroupName = "Aglin";
+            radioButton.Content = "两端对齐";
+            pop.BindingEvent(pop.AddChild("FreeTextAglin", radioButton), FreeTextAglin_MenuCommand);
 
             menuItem = new MenuItem();
             menuItem.Name = "FreeHandDefault";
@@ -690,7 +713,7 @@ namespace PDF_Office.ViewModels.Tools
 
             menuItem = new MenuItem();
             menuItem.Name = "StrickNoteColor";
-            menuItem.Header = "颜色...";
+            menuItem.Header = "颜色";
             pop.BindingEvent(pop.AddItem(menuItem), AnnotColorPalette_MenuCommand);
 
             menuItem = new MenuItem();
@@ -735,7 +758,14 @@ namespace PDF_Office.ViewModels.Tools
 
             menuItem = new MenuItem();
             menuItem.Name = "ShapeColor";
-            menuItem.Header = "颜色...";
+            menuItem.Header = "边框颜色";
+            menuItem.Tag = "Color";
+            pop.BindingEvent(pop.AddItem(menuItem), AnnotColorPalette_MenuCommand);
+
+            menuItem = new MenuItem();
+            menuItem.Name = "ShapeFillColor";
+            menuItem.Header = "填充颜色";
+            menuItem.Tag = "FillColor";
             pop.BindingEvent(pop.AddItem(menuItem), AnnotColorPalette_MenuCommand);
 
             menuItem = new MenuItem();

+ 0 - 3
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Properties.cs

@@ -12,9 +12,6 @@ using Prism.Regions;
 using Prism.Services.Dialogs;
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using System.Windows.Media;
 
 namespace PDF_Office.ViewModels.Tools

+ 14 - 17
PDF Office/Views/BOTA/OutLineControl.xaml

@@ -8,8 +8,9 @@
     xmlns:local="clr-namespace:PDF_Office.Views.BOTA"
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:model="clr-namespace:PDF_Office.Model.BOTA"
-    x:Name="ttt"
+    xmlns:mainPageLoader="clr-namespace:PDF_Office.Strings.MainPage"
     d:DataContext="{d:DesignInstance Type=bota:OutLineControlViewModel}"
+    Loaded="UserControl_Loaded"
     mc:Ignorable="d">
     <UserControl.Resources>
         <ResourceDictionary>
@@ -32,8 +33,7 @@
                     VerticalAlignment="Center"
                     FontFamily="Segoe UI"
                     FontSize="14"
-                    FontWeight="SemiBold"
-                    Text="Outline" />
+                    FontWeight="SemiBold"/>
                 <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
                     <customcontrol:PathButton
                         x:Name="BtnAdd"
@@ -82,17 +82,14 @@
                                 <MenuItem
                                     Name="MenuExpandAll"
                                     Command="{Binding ExpandAllCommand}"
-                                    CommandParameter="{Binding Outlinelist}"
-                                    Header="一键展开" />
+                                    CommandParameter="{Binding Outlinelist}" />
                                 <MenuItem
                                     Name="MenuCollapseAll"
                                     Command="{Binding CollapseAllCommand}"
-                                    CommandParameter="{Binding Outlinelist}"
-                                    Header="一键折叠" />
+                                    CommandParameter="{Binding Outlinelist}"/>
                                 <MenuItem
                                     Name="MenuDeleteAll"
-                                    Command="{Binding DeleteAllCommand}"
-                                    Header="Delete All Outline" />
+                                    Command="{Binding DeleteAllCommand}" />
                             </ContextMenu>
                         </customcontrol:PathButton.ContextMenu>
                     </customcontrol:PathButton>
@@ -172,40 +169,40 @@
                                     <MenuItem
                                         x:Name="AddMenu"
                                         Click="AddMenu_Click"
-                                        Header="添加条目" />
+                                        Header="{x:Static mainPageLoader:MainPage.Outline_Add}" />
                                     <MenuItem
                                         x:Name="AddChlidMenu"
                                         Click="AddChlidMenu_Click"
-                                        Header="添加子条目" />
+                                        Header="{x:Static mainPageLoader:MainPage.Outline_AddSub}" />
                                     <MenuItem
                                         x:Name="AddParentMenu"
                                         Click="AddParentMenu_Click"
-                                        Header="添加上一级条目"
+                                        Header="{x:Static mainPageLoader:MainPage.Outline_AddLevel}"
                                         IsEnabled="{Binding CanAddParent}" />
 
                                     <MenuItem
                                         x:Name="DeleteMenu"
                                         Click="DeleteMenu_Click"
-                                        Header="删除" />
+                                        Header="{x:Static mainPageLoader:MainPage.Outline_Delete}" />
 
                                     <MenuItem
                                         x:Name="RenameMenu"
                                         Click="RenameMenu_Click"
-                                        Header="重命名" />
+                                        Header="{x:Static mainPageLoader:MainPage.Outline_Rename}" />
                                     <MenuItem
                                         x:Name="ChangeDestinationMenu"
                                         Click="ChangeDestinationMenu_Click"
-                                        Header="更改目标位置" />
+                                        Header="{x:Static mainPageLoader:MainPage.Outline_Change}" />
 
                                     <MenuItem
                                         x:Name="UpgradeMenu"
                                         Click="UpgradeMenu_Click"
-                                        Header="升级"
+                                        Header="{x:Static mainPageLoader:MainPage.Outline_Up}"
                                         IsEnabled="{Binding CanUp}" />
                                     <MenuItem
                                         x:Name="DowngradeMenu"
                                         Click="DowngradeMenu_Click"
-                                        Header="降级"
+                                        Header="{x:Static mainPageLoader:MainPage.Outline_Down}"
                                         IsEnabled="{Binding CanDown}" />
                                 </ContextMenu>
                             </Grid.ContextMenu>

+ 14 - 1
PDF Office/Views/BOTA/OutLineControl.xaml.cs

@@ -56,6 +56,11 @@ namespace PDF_Office.Views.BOTA
             InitializeComponent();
         }
 
+        private void LoadedLangText()
+        {
+
+        }
+
         private void BtnMore_Click(object sender, RoutedEventArgs e)
         {
             MenuMore.Placement = System.Windows.Controls.Primitives.PlacementMode.Bottom;
@@ -399,7 +404,7 @@ namespace PDF_Office.Views.BOTA
         private void ChangeDestinationMenu_Click(object sender, RoutedEventArgs e)
         {
             AlertsMessage alertsMessage = new AlertsMessage();
-            alertsMessage.ShowDialog("提示", "确定要将选定大纲的目标位置设置为当前位置吗?", "Cancel", "OK");
+            alertsMessage.ShowDialog("", App.MainPageLoader.GetString("Outline_DialogContent"), App.MainPageLoader.GetString("Outline_DialogNO"), App.MainPageLoader.GetString("Outline_DialogYes"));
             if (alertsMessage.result == ContentResult.Ok)
             {
                 (DataContext as OutLineControlViewModel).ChangeOutLineDestination((sender as MenuItem).DataContext as OutlineNode);
@@ -474,5 +479,13 @@ namespace PDF_Office.Views.BOTA
                 OutlineView.Focus();
             }
         }
+
+        private void UserControl_Loaded(object sender, RoutedEventArgs e)
+        {
+            TxtTitle.Text = App.MainPageLoader.GetString("Outline_Title");
+            MenuExpandAll.Header = App.MainPageLoader.GetString("Outline_Expand");
+            MenuCollapseAll.Header = App.MainPageLoader.GetString("Outline_Collapse");
+            MenuDeleteAll.Header = App.MainPageLoader.GetString("Outline_RemoveAll");
+        }
     }
 }

+ 200 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/CreateFromScannerDialogs.xaml

@@ -0,0 +1,200 @@
+<UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.CreateFromScannerDialogs"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:cus="clr-namespace:PDF_Office.CustomControl"
+             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
+             xmlns:prism="http://prismlibrary.com/" 
+             xmlns:dataconvert="clr-namespace:PDF_Office.DataConvert"
+             xmlns:local="clr-namespace:PDF_Office.Views.Dialog.HomePageToolsDialogs"
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800">
+    <UserControl.Resources>
+        <dataconvert:BoolToVisible x:Key="BoolToVisible"/>
+        <dataconvert:InvertBoolToVisibleConvert x:Key="InvertBoolToVisibleConvert"/>
+        <Style x:Key="ScannerListViewItemStyle" TargetType="{x:Type ListViewItem}">
+            <Setter Property="UIElement.SnapsToDevicePixels" Value="True" />
+            <Setter Property="Panel.Background" Value="#00FFFFFF" />
+            <Setter Property="Border.BorderBrush" Value="#00FFFFFF" />
+            <Setter Property="Border.BorderThickness" Value="1" />
+            <Setter Property="FrameworkElement.FocusVisualStyle">
+                <Setter.Value>
+                    <Style TargetType="{x:Type IFrameworkInputElement}">
+                        <Setter Property="Control.Template">
+                            <Setter.Value>
+                                <ControlTemplate>
+                                    <Rectangle
+                                    Margin="2"
+                                    SnapsToDevicePixels="True"
+                                    Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
+                                    StrokeDashArray="1 2"
+                                    StrokeThickness="1" />
+                                </ControlTemplate>
+                            </Setter.Value>
+                        </Setter>
+                    </Style>
+                </Setter.Value>
+            </Setter>
+            <Setter Property="Control.Template">
+                <Setter.Value>
+                    <ControlTemplate TargetType="{x:Type ListViewItem}">
+                        <Border
+                        Name="Bd"
+                        Padding="{TemplateBinding Control.Padding}"
+                        Background="{TemplateBinding Panel.Background}"
+                        BorderBrush="{TemplateBinding Border.BorderBrush}"
+                        BorderThickness="{TemplateBinding Border.BorderThickness}"
+                        SnapsToDevicePixels="True">
+                            <Grid>
+                                <Grid.ColumnDefinitions>
+                                    <ColumnDefinition Width="Auto" />
+                                    <ColumnDefinition />
+                                </Grid.ColumnDefinitions>
+                                <Grid
+                                x:Name="SelectedIcon"
+                                Margin="12.5,0,0.5,0"
+                                HorizontalAlignment="Left"
+                                VerticalAlignment="Center"
+                                Visibility="Collapsed">
+                                    <Rectangle
+                                    x:Name="Selectedrect"
+                                    Width="20"
+                                    Height="20"
+                                    HorizontalAlignment="Right"
+                                    VerticalAlignment="Top"
+                                    Fill="#FF477EDE" />
+                                    <Path
+                                    x:Name="MultiSelectCheck"
+                                    Width="15"
+                                    Height="15"
+                                    Margin="0,1,0,0"
+                                    HorizontalAlignment="Center"
+                                    VerticalAlignment="Center"
+                                    Data="M15.3493 0.596191L16.0564 1.3033L5.44979 11.9099L0.146484 6.6066L0.853591 5.89949L5.45004 10.496L15.3493 0.596191Z"
+                                    Fill="White" />
+                                </Grid>
+                                <ContentPresenter
+                                Grid.Column="1"
+                                Margin="0,0,0,0"
+                                HorizontalAlignment="Stretch"
+                                VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
+                                Content="{TemplateBinding ContentControl.Content}"
+                                ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
+                                ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
+                                SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
+                                <Rectangle
+                                Grid.Column="1"
+                                Height="1"
+                                HorizontalAlignment="Stretch"
+                                VerticalAlignment="Bottom"
+                                Fill="#C5CBD3" />
+                            </Grid>
+                        </Border>
+                        <ControlTemplate.Triggers>
+                            <MultiTrigger>
+                                <MultiTrigger.Conditions>
+                                    <Condition Property="UIElement.IsMouseOver" Value="True" />
+                                </MultiTrigger.Conditions>
+                                <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.hov.bg}" />
+                                <!--<Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A000000" />-->
+                            </MultiTrigger>
+                            <MultiTrigger>
+                                <MultiTrigger.Conditions>
+                                    <Condition Property="Selector.IsSelectionActive" Value="False" />
+                                    <Condition Property="Selector.IsSelected" Value="True" />
+                                </MultiTrigger.Conditions>
+                                <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
+                                <!--<Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A477EDE" />-->
+                                <!--<Setter TargetName="SelectedIcon" Property="Grid.Visibility" Value="Visible" />-->
+                            </MultiTrigger>
+                            <MultiTrigger>
+                                <MultiTrigger.Conditions>
+                                    <Condition Property="Selector.IsSelectionActive" Value="True" />
+                                    <Condition Property="Selector.IsSelected" Value="True" />
+                                </MultiTrigger.Conditions>
+                                <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
+                                <!--<Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A477EDE" />-->
+                                <!--<Setter TargetName="SelectedIcon" Property="Grid.Visibility" Value="Visible" />-->
+                            </MultiTrigger>
+                            <Trigger Property="UIElement.IsEnabled" Value="False">
+                                <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
+                            </Trigger>
+                        </ControlTemplate.Triggers>
+                    </ControlTemplate>
+                </Setter.Value>
+            </Setter>
+        </Style>
+        <DataTemplate x:Key="ScannerItemTemplate">
+            <TextBlock Text="{Binding ScannerName}">
+            </TextBlock>
+        </DataTemplate>
+    </UserControl.Resources>
+    <cus:DialogContent Header="Create PDF from scanner">
+        <Grid>
+            <Grid Height="406" Margin="16,0,16,0"
+                  Visibility="{Binding IsEmptyScanner,Converter={StaticResource InvertBoolToVisibleConvert}}"
+                  >
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="360"/>
+                    <ColumnDefinition Width="16"/>
+                    <ColumnDefinition Width="312"/>
+                </Grid.ColumnDefinitions>
+
+                <Border Background="{StaticResource color.sys.layout.mg}">
+                    <Grid>
+                        <Grid.RowDefinitions>
+                            <RowDefinition Height="Auto"/>
+                            <RowDefinition/>
+                        </Grid.RowDefinitions>
+                        <TextBlock Text="Scanners"/>
+                        <ListView Grid.Row="1" x:Name="listScanner" 
+                              ItemsSource="{Binding Scanners}"
+                              ItemContainerStyle="{StaticResource ScannerListViewItemStyle}"
+                              ItemTemplate="{StaticResource ScannerItemTemplate}"
+                              >
+                            <i:Interaction.Triggers>
+                                <i:EventTrigger EventName="SelectionChanged">
+                                    <i:InvokeCommandAction Command="{Binding SelectedScannerCommand}" CommandParameter="{Binding ElementName=listScanner,Path=SelectedItem}"/>
+                                </i:EventTrigger>
+                            </i:Interaction.Triggers>
+                        </ListView>
+                    </Grid>
+                </Border>
+                <Border Grid.Column="2" CornerRadius="6" BorderThickness="1" BorderBrush="{StaticResource color.sys.layout.divider}">
+                    <Grid>
+                        <Image  x:Name="ScannerImage" Source="{Binding Img}"
+                                Visibility="{Binding IsEmptyImg,Converter={StaticResource InvertBoolToVisibleConvert}}"
+                                >
+                        </Image>
+                        <TextBlock Text="NO Image" FontSize="25" HorizontalAlignment="Center" VerticalAlignment="Center"
+                                   Visibility="{Binding IsEmptyImg,Converter={StaticResource BoolToVisible}}"
+                                   />
+                    </Grid>
+                </Border>
+            </Grid>
+
+            <Grid Height="406" Margin="16,0,16,0" Visibility="{Binding IsEmptyScanner,Converter={StaticResource BoolToVisible}}">
+                <TextBlock Text="No Scanners" FontSize="30" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+            </Grid>
+        </Grid>
+        
+        <cus:DialogContent.BottmBar>
+            <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
+                <Button
+                    Width="80"
+                    Height="32"
+                    Command="{Binding CreateCommand}"
+                    Content="Scan"
+                    Style="{StaticResource Btn.cta}" />
+                <Button
+                    Width="80"
+                    Height="32"
+                    Margin="16,0"
+                    Command="{Binding CancelCommand}"
+                    Content="Cancel"
+                    Style="{StaticResource btn.sec}" />
+            </StackPanel>
+        </cus:DialogContent.BottmBar>
+    </cus:DialogContent>
+</UserControl>

+ 28 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/CreateFromScannerDialogs.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PDF_Office.Views.Dialog.HomePageToolsDialogs
+{
+    /// <summary>
+    /// CreateFromScannerDialogs.xaml 的交互逻辑
+    /// </summary>
+    public partial class CreateFromScannerDialogs : UserControl
+    {
+        public CreateFromScannerDialogs()
+        {
+            InitializeComponent();
+        }
+    }
+}

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 355 - 192
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePictureToPDFDialog.xaml


+ 17 - 15
PDF Office/Views/PropertyPanel/AnnotPanel/SignatureCreateDialog.xaml

@@ -6,6 +6,7 @@
              xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel" xmlns:cus="clr-namespace:PDF_Office.CustomControl" xmlns:annotpanel="clr-namespace:PDF_Office.ViewModels.PropertyPanel.AnnotPanel" xmlns:dataconvert="clr-namespace:PDF_Office.DataConvert" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" d:DataContext="{d:DesignInstance Type=annotpanel:SignatureCreateDialogViewModel}"
              xmlns:prism="http://prismlibrary.com/"
              prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
+             Loaded="UserControl_Loaded"
              Width="468"
              Height="392"
              mc:Ignorable="d" >
@@ -40,13 +41,13 @@
             </Setter>
         </Style>
     </UserControl.Resources>
-    <cus:DialogContent Header="新建签名">
+    <cus:DialogContent x:Name="DialogHeader">
         <cus:DialogContent.Content>
             <TabControl
                 BorderThickness="0"
                 Style="{StaticResource FormTabControl }"
                 SelectedIndex="{Binding TabItemIndex,Mode=TwoWay}">
-                <TabItem Header="Input">
+                <TabItem x:Name="InputItem">
                     <Grid>
                         <Grid.RowDefinitions>
                             <RowDefinition Height="*"/>
@@ -58,6 +59,7 @@
                             <ColumnDefinition Width="16"/>
                         </Grid.ColumnDefinitions>
                         <cus:TextBoxEx 
+                            x:Name="InPutTextBox"
                             FontFamily="{Binding ElementName=TextComBox,Path=SelectedValue, TargetNullValue=Segoe UI}" 
                             Background="{StaticResource color.sys.layout.mg}" Grid.Column="1" 
                             TextChanged="TextBoxEx_TextChanged"
@@ -65,7 +67,7 @@
                             HorizontalContentAlignment="Center" VerticalContentAlignment="Center"  
                             ShowClose="False" Text="{Binding InputText,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                             Foreground ="{Binding RadioButtonIndex,Converter={StaticResource IntToColorBrush}}"  />
-                        <Button Margin="0,0,8,24" Visibility="{Binding ShowTextButton}" Content="Clear"  Style="{StaticResource btn.sec}" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="24" Width="43" Command="{Binding ClearTextCommnad}" />
+                        <Button x:Name="BtnTextClear" Margin="0,0,8,24" Visibility="{Binding ShowTextButton}" Style="{StaticResource btn.sec}" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="24" Width="43" Command="{Binding ClearTextCommnad}" />
                         <ComboBox Grid.Row="1" Grid.Column="1" x:Name="TextComBox"
                         Width="200"
                         HorizontalAlignment="Left"
@@ -156,7 +158,7 @@
                         </StackPanel>
                     </Grid>
                 </TabItem>
-                <TabItem Header="Drawing">
+                <TabItem x:Name="DrawItem">
                     <Grid>
                         <Grid.RowDefinitions>
                             <RowDefinition Height="*"/>
@@ -179,9 +181,9 @@
                                             <Binding Path="IsMouseDown"/>
                                         </MultiBinding>
                                     </Grid.Visibility>
-                                    <TextBlock Text="此处绘制签名" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                                    <TextBlock x:Name="DrawHint" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                                 </Grid>
-                                <Button Style="{StaticResource btn.sec}" Margin="0,0,8,8" Width="43" Height="24" HorizontalAlignment="Right" VerticalAlignment="Bottom" Content="Clear" Command="{Binding ClearInkCanvasCommnad}" Visibility="{Binding ElementName=PlanGrid,Path=Visibility,Converter={StaticResource UnVisivleConvert}}"/>
+                                <Button x:Name="BtnDrawClear" Style="{StaticResource btn.sec}" Margin="0,0,8,8" Width="43" Height="24" HorizontalAlignment="Right" VerticalAlignment="Bottom" Command="{Binding ClearInkCanvasCommnad}" Visibility="{Binding ElementName=PlanGrid,Path=Visibility,Converter={StaticResource UnVisivleConvert}}"/>
                             </Grid>
                         </Border>
                         <ComboBox Grid.Row="1" Grid.Column="1" 
@@ -274,7 +276,7 @@
                         </StackPanel>
                     </Grid>
                 </TabItem>
-                <TabItem Header="Picture">
+                <TabItem x:Name="PictureItem">
                     <Grid>
                         <Grid.RowDefinitions>
                             <RowDefinition Height="*"/>
@@ -295,7 +297,7 @@
                                 IconPress="pack://application:,,,/PDF Office;component/Resources/Dialog/AddImageSuspend.png"  
                                 IconMouseOver="pack://application:,,,/PDF Office;component/Resources/Dialog/AddImageSuspend.png"   
                                 Command="{Binding OpenImageCommnad}"/>
-                                    <TextBlock Text="Select image file" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource color.sys.text.neutral.lv3}"/>
+                                    <TextBlock x:Name="ImageHint" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource color.sys.text.neutral.lv3}"/>
                                 </StackPanel>
                                 <Grid Visibility="{Binding ElementName=AddStackPanel,Path=Visibility,Converter={StaticResource UnVisivleConvert}}">
                                     <Grid.RowDefinitions>
@@ -303,20 +305,20 @@
                                         <RowDefinition Height="*"/>
                                     </Grid.RowDefinitions>
                                     <Image Grid.RowSpan="2" Width="200" Height="200" Source="{Binding ImagePreviewSource}" />
-                                    <Button Style="{StaticResource btn.sec}" Grid.Row="1" Width="60" Height="24" Margin="0,0,8,8" HorizontalAlignment="Right" VerticalAlignment="Bottom" Content="重新选择" Command="{Binding OpenImageCommnad}"/>
+                                    <Button x:Name="BtnPictureReselect" Style="{StaticResource btn.sec}" Grid.Row="1" Width="60" Height="24" Margin="0,0,8,8" HorizontalAlignment="Right" VerticalAlignment="Bottom" Command="{Binding OpenImageCommnad}"/>
                                 </Grid>
                             </Grid>
                         </Border>
                         <StackPanel Grid.Column="1"   Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
                             <CheckBox Width="20" Height="20" IsChecked="{Binding IsRemoveBackground}"/>
-                            <TextBlock Text="Clear background" FontSize="14" FontFamily="Segoe UI" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                            <TextBlock x:Name="BtnReBkg" FontSize="14" FontFamily="Segoe UI" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                             <cus:ImageButton Margin="8,0,0,0"
                                 Height="16" Width="16" IconHeight="16" IconWidth="16"  
                                 Icon="pack://application:,,,/PDF Office;component/Resources/Dialog/help.png"  
                                 IconPress="pack://application:,,,/PDF Office;component/Resources/Dialog/help.png"  
                                 IconMouseOver="pack://application:,,,/PDF Office;component/Resources/Dialog/help.png">
                                 <cus:ImageButton.ToolTip >
-                                    <ToolTip Style ="{StaticResource TriangleToolTipStyle}" Placement="Bottom" Content="Remove white background from images" >
+                                    <ToolTip Style ="{StaticResource TriangleToolTipStyle}" x:Name="BtnReBkgHint" Placement="Bottom" >
                                         <ToolTip.HorizontalOffset>
                                             <MultiBinding Converter="{StaticResource CenterToolTipConverter}">
                                                 <Binding RelativeSource="{RelativeSource Self}" Path="PlacementTarget.ActualWidth"/>
@@ -335,13 +337,13 @@
         <cus:DialogContent.BottmBar>
             <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                 <Button
+                    x:Name="BtnOK"
                     Style="{StaticResource Btn.cta}"
                     Grid.Column="0"
                     Width="80"
                     Height="32"
                     HorizontalAlignment="Right"
-                    Command="{Binding CreateCommnad}"
-                    Content="确定" >
+                    Command="{Binding CreateCommnad}">
                     <Button.IsEnabled>
                         <MultiBinding Converter="{StaticResource SignatureButtonConvert }" Mode="OneWay">
                             <Binding Path="TabItemIndex"/>
@@ -352,14 +354,14 @@
                     </Button.IsEnabled>
                 </Button>
                 <Button
+                   x:Name="BtnNo"
                     Style="{StaticResource btn.sec}"
                     Grid.Column="2"
                     Width="80"
                     Height="32"
                     Margin="16,0,16,0"
                     HorizontalAlignment="Left"
-                    Command="{Binding CancelCommand}"
-                    Content="取消" />
+                    Command="{Binding CancelCommand}"/>
             </StackPanel>
         </cus:DialogContent.BottmBar>
     </cus:DialogContent>

+ 21 - 0
PDF Office/Views/PropertyPanel/AnnotPanel/SignatureCreateDialog.xaml.cs

@@ -61,5 +61,26 @@ namespace PDF_Office.Views.PropertyPanel.AnnotPanel
         {
             (DataContext as SignatureCreateDialogViewModel).IsMouseDown = false;
         }
+
+        private void UserControl_Loaded(object sender, RoutedEventArgs e)
+        {
+            DialogHeader.Header = App.MainPageLoader.GetString("Signatur_DialogTitle");
+            BtnOK.Content = App.MainPageLoader.GetString("Signatur_DialogYes");
+            BtnNo.Content = App.MainPageLoader.GetString("Signatur_DialogNo");
+
+            InputItem.Header = App.MainPageLoader.GetString("Signatur_DialogText");
+            InPutTextBox.PlaceholderText = App.MainPageLoader.GetString("Signatur_DialogTextHint");
+            BtnTextClear.Content = App.MainPageLoader.GetString("Signatur_DialogClear");
+
+            DrawItem.Header = App.MainPageLoader.GetString("Signatur_DialogDraw");
+            DrawHint.Text = App.MainPageLoader.GetString("Signatur_DialogPictureHint");
+            BtnDrawClear.Content = App.MainPageLoader.GetString("Signatur_DialogClear");
+
+            PictureItem.Header = App.MainPageLoader.GetString("Signatur_DialogPicture");
+            BtnPictureReselect.Content= App.MainPageLoader.GetString("Signatur_DialogPictureReselect");
+            ImageHint.Text = App.MainPageLoader.GetString("Signatur_DialogPictureHint");
+            BtnReBkg.Text = App.MainPageLoader.GetString("Signatur_DialogPictureReBkg");
+            BtnReBkgHint.Content = App.MainPageLoader.GetString("Signatur_DialogPictureReBkgHint");
+        }
     }
 }

+ 28 - 27
PDF Office/Views/Dialog/ToolsDialogs/MergeDialog.xaml

@@ -9,6 +9,7 @@
              prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
              Width="818"
              Height="600"
+             Loaded="UserControl_Loaded"
              >
     <UserControl.Resources>
         <dataconvert:IndexConverter x:Key="IndexConverter"/>
@@ -75,9 +76,9 @@
     <Grid Background="{StaticResource color.sys.layout.anti}">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="16"/>
-            <ColumnDefinition Width="526"/>
+            <ColumnDefinition Width="*"/>
             <ColumnDefinition Width="16"/>
-            <ColumnDefinition Width="260"/>
+            <ColumnDefinition Width="0"/>
         </Grid.ColumnDefinitions>
         <Grid.RowDefinitions>
             <RowDefinition Height="16"/>
@@ -92,13 +93,13 @@
         <Border Grid.Column="1" Grid.Row="1"  Grid.RowSpan="2" Padding="50,6,50,6" Visibility="{Binding Visibility, Converter={StaticResource UnVisivleConvert}, ElementName=NoFileStackPanel}">
             <Grid>
                 <Grid.ColumnDefinitions>
-                    <ColumnDefinition Width="201"/>
+                    <ColumnDefinition Width="429"/>
                     <ColumnDefinition Width="160"/>
                     <ColumnDefinition Width="*"/>
                 </Grid.ColumnDefinitions>
-                <TextBlock Text="File Name"  FontFamily="Segoe UI" FontSize="12" FontWeight="Bold" Foreground="{StaticResource color.sys.text.neutral.lv1}"/>
-                <TextBlock Grid.Column="1"  Text="Page Range"  FontFamily="Segoe UI" FontSize="12" FontWeight="Bold" Foreground="{StaticResource color.sys.text.neutral.lv1}"/>
-                <TextBlock Grid.Column="2" Text="Size" HorizontalAlignment="Center"  FontFamily="Segoe UI" FontSize="12" FontWeight="Bold" Foreground="{StaticResource color.sys.text.neutral.lv1}"/>
+                <TextBlock x:Name="TitleFileName" FontFamily="Segoe UI" FontSize="12" FontWeight="Bold" Foreground="{StaticResource color.sys.text.neutral.lv1}"/>
+                <TextBlock x:Name="TitlePageRange" Grid.Column="1" FontFamily="Segoe UI" FontSize="12" FontWeight="Bold" Foreground="{StaticResource color.sys.text.neutral.lv1}"/>
+                <TextBlock x:Name="TitleSize" Grid.Column="2" HorizontalAlignment="Center"  FontFamily="Segoe UI" FontSize="12" FontWeight="Bold" Foreground="{StaticResource color.sys.text.neutral.lv1}"/>
             </Grid>
         </Border>
         <Border Grid.Column="1" Grid.Row="3">
@@ -115,9 +116,7 @@
                                 Icon="pack://application:,,,/PDF Office;component/Resources/Dialog/AddImage.png"  
                                 IconPress="pack://application:,,,/PDF Office;component/Resources/Dialog/AddImageSuspend.png"  
                                 IconMouseOver="pack://application:,,,/PDF Office;component/Resources/Dialog/AddImageSuspend.png"   Command="{Binding AddFilesCommand}" CommandParameter="0"/>
-                    <TextBlock Margin="0,8,0,0" Text="Selected files" FontSize="14" FontFamily="Segoe UI" 
-                               FontWeight="Regular" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                    <TextBlock Width="418" Margin="0,2,0,0" Text="Drop files here or Click Add Files at bottom right button. You can drag files to reorder as you need." 
+                    <TextBlock Width="418" Margin="0,2,0,0" x:Name="NoFileText"
                                FontSize="12" FontFamily="Segoe UI" HorizontalAlignment="Center" FontWeight="Regular"
                                Foreground="{StaticResource color.sys.text.neutral.lv3}"
                                TextAlignment="Center" VerticalAlignment="Center" TextWrapping="Wrap"/>
@@ -136,21 +135,21 @@
                 HorizontalContentAlignment="Stretch">
                     <ListView.ItemTemplate>
                         <DataTemplate  >
-                            <Border x:Name="BackgroundBorder" CornerRadius="8">
+                            <Border x:Name="BackgroundBorder" Background="Transparent" CornerRadius="8">
                                 <StackPanel  >
                                     <Line  X1="0"  X2="{Binding ActualWidth, ElementName=ContentPanel}" HorizontalAlignment="Stretch" StrokeThickness="1" Stroke="{StaticResource color.item-state.hov.bg}" VerticalAlignment="Bottom"/>
                                     <Grid x:Name="ContentPanel" Height="76" >
                                         <Grid.ColumnDefinitions>
-                                            <ColumnDefinition Width="40"/>
+                                            <ColumnDefinition Width="41"/>
                                             <ColumnDefinition Width="60"/>
                                             <ColumnDefinition Width="8"/>
-                                            <ColumnDefinition Width="133"/>
+                                            <ColumnDefinition Width="372"/>
                                             <ColumnDefinition Width="auto"/>
                                             <ColumnDefinition Width="16"/>
-                                            <ColumnDefinition Width="56"/>
-                                            <ColumnDefinition Width="17"/>
-                                            <ColumnDefinition Width="*"/>
-                                            <ColumnDefinition Width="17"/>
+                                            <ColumnDefinition Width="64"/>
+                                            <ColumnDefinition Width="16"/>
+                                            <ColumnDefinition Width="16"/>
+                                            <ColumnDefinition Width="43"/>
                                         </Grid.ColumnDefinitions>
                                         <Line   Margin="0,0,0,0" Grid.ColumnSpan="10" Visibility="{Binding IsForward, Converter={StaticResource BoolToVisible}}" X1="0"  X2="{Binding ActualWidth, ElementName=ContentPanel}" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" StrokeThickness="1" Stroke="{StaticResource color.sys.layout.accent}" />
 
@@ -201,7 +200,7 @@
                 </ListView>
             </Grid>
         </Border>
-        <Border Grid.Column="3" Grid.RowSpan="7" Background="{StaticResource color.sys.layout.mg}">
+        <Border Grid.Column="3" Grid.RowSpan="7" Background="{StaticResource color.sys.layout.mg}" Visibility="Collapsed">
             <Grid>
                 <Grid.RowDefinitions>
                     <RowDefinition Height="14"/>
@@ -265,16 +264,17 @@
                         <TextBlock Text="mm" VerticalAlignment="Center" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" Margin="8,0,0,0"/>
                     </StackPanel>
                 </StackPanel>
-                <StackPanel Grid.Column="1" Grid.Row="2"  HorizontalAlignment="Center" VerticalAlignment="Bottom">
-                    <Button x:Name="BtnMerge" Width="228" Content="Merge"  Height="32" Style="{StaticResource Btn.cta}" Command="{Binding MergeCommand}" IsEnabled="{Binding ElementName=NoFileStackPanel,Path=Visibility,Converter={StaticResource UnVisibleToBoolConvert}}"/>
-                    <Button Margin="0,16,0,0" Width="228" Content="Cancel" Height="32" Style="{StaticResource btn.sec}" Command="{Binding CancelCommand}"/>
-                </StackPanel>
             </Grid>
         </Border>
 
-        <ComboBox Grid.Column="1" SelectedIndex="0"  Grid.Row="5" Width="113" Height="32" HorizontalAlignment="Left" VerticalAlignment="Bottom" >
+        <StackPanel Grid.Column="1" Grid.Row="5"  Orientation="Horizontal" HorizontalAlignment="Right">
+            <Button x:Name="BtnMerge" Width="118" Content="Merge"  Height="32" Style="{StaticResource Btn.cta}" Command="{Binding MergeCommand}" IsEnabled="{Binding ElementName=NoFileStackPanel,Path=Visibility,Converter={StaticResource UnVisibleToBoolConvert}}"/>
+            <Button x:Name="BtnCancel" Margin="16,0,0,0" Width="118" Content="Cancel" Height="32" Style="{StaticResource btn.sec}" Command="{Binding CancelCommand}"/>
+        </StackPanel>
+        <StackPanel  Grid.Column="1" Grid.Row="5" Orientation="Horizontal" >
+            <ComboBox Grid.Column="1" SelectedIndex="{Binding ComboBoxSelectedIndex,Mode=TwoWay}"  Grid.Row="5" Width="113" Height="32" HorizontalAlignment="Left" VerticalAlignment="Bottom" >
             <ComboBoxItem Tag="0">
-                <TextBlock Text="Add Files" />
+                <TextBlock x:Name="AddComboBoxItemText" />
                 <i:Interaction.Triggers>
                     <i:EventTrigger EventName="PreviewMouseUp">
                         <i:InvokeCommandAction 
@@ -285,7 +285,7 @@
                 </i:Interaction.Triggers>
             </ComboBoxItem>
             <ComboBoxItem Tag="1" Visibility="Collapsed">
-                <TextBlock Text="添加文件夹"/>
+                <TextBlock  Text="添加文件夹"/>
                 <i:Interaction.Triggers>
                     <i:EventTrigger EventName="PreviewMouseUp">
                         <i:InvokeCommandAction 
@@ -296,7 +296,7 @@
                 </i:Interaction.Triggers>
             </ComboBoxItem>
             <ComboBoxItem Tag="2">
-                <TextBlock Text="添加已打开文件"/>
+                <TextBlock x:Name="AddOpenFileComboBoxItem"/>
                 <i:Interaction.Triggers>
                     <i:EventTrigger EventName="PreviewMouseUp">
                         <i:InvokeCommandAction 
@@ -308,8 +308,8 @@
 
             </ComboBoxItem>
         </ComboBox>
-        <Border BorderThickness="1" Width="32" Height="32" Grid.Column="1" Grid.Row="5" BorderBrush="{StaticResource color.btn.sec.border-color}" 
-            HorizontalAlignment="Right" VerticalAlignment="Bottom" CornerRadius="4">
+        <Border Margin="16,0,0,0" BorderThickness="1" Width="32" Height="32" Grid.Column="1" Grid.Row="5" BorderBrush="{StaticResource color.btn.sec.border-color}" 
+            HorizontalAlignment="Left" VerticalAlignment="Bottom" CornerRadius="4">
             <customcontrol:PathButton
             HorizontalAlignment="Center"
             VerticalAlignment="Center"
@@ -327,5 +327,6 @@
             MouseDownBorderBrush="{StaticResource color.item-state.sel.border.lv3}"
                     />
         </Border>
+        </StackPanel>
     </Grid>
 </UserControl>

+ 15 - 0
PDF Office/Views/Dialog/ToolsDialogs/MergeDialog.xaml.cs

@@ -296,5 +296,20 @@ namespace PDF_Office.Views.Dialog.ToolsDialogs
                 DragDropHelper.DragLeave();
             }
         }
+
+        private void UserControl_Loaded(object sender, RoutedEventArgs e)
+        {
+            NoFileText.Text = App.MainPageLoader.GetString("Merge_Hint");
+
+            TitleFileName.Text = App.MainPageLoader.GetString("Merge_TitleFileName");
+            TitlePageRange.Text = App.MainPageLoader.GetString("Merge_TitlePageRange");
+            TitleSize.Text = App.MainPageLoader.GetString("Merge_TitleSize");
+
+            AddComboBoxItemText.Text = App.MainPageLoader.GetString("Merge_AddFiles");
+            AddOpenFileComboBoxItem.Text = App.MainPageLoader.GetString("Merge_AddOpenFile");
+
+            BtnMerge.Content = App.MainPageLoader.GetString("Merge_Yes");
+            BtnCancel.Content = App.MainPageLoader.GetString("Merge_No");
+        }
     }
 }

+ 2 - 1
PDF Office/Views/PropertyPanel/AnnotPanel/SignatureAnnotProperty.xaml

@@ -5,6 +5,7 @@
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel" xmlns:customcontrol="clr-namespace:PDF_Office.CustomControl" xmlns:annotpanel="clr-namespace:PDF_Office.ViewModels.PropertyPanel.AnnotPanel" xmlns:dataconvert="clr-namespace:PDF_Office.DataConvert" d:DataContext="{d:DesignInstance Type=annotpanel:SignatureAnnotPropertyViewModel}"
              KeyDown="UserControl_KeyDown"
+             Loaded="UserControl_Loaded"
              mc:Ignorable="d" >
     <UserControl.Resources>
         <PathGeometry x:Key="Ic_AddButtonPath" Figures="M13.5 8C13.5 11.0376 11.0376 13.5 8 13.5C4.96243 13.5 2.5 11.0376 2.5 8C2.5 4.96243 4.96243 2.5 8 2.5C11.0376 2.5 13.5 4.96243 13.5 8ZM15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM7.25005 4.80003V7.25003H4.80005V8.75003H7.25005V11.2H8.75005V8.75003H11.2V7.25003H8.75005V4.80003H7.25005Z"  FillRule="EvenOdd" />
@@ -30,7 +31,7 @@
                 <ColumnDefinition Width="16"/>
             </Grid.ColumnDefinitions>
             <TextBlock Grid.Column="1" x:Name="TxtTitle" HorizontalAlignment="Left"
-                    VerticalAlignment="Center" FontSize="18" FontWeight="SemiBold" Text="Signature" />
+                    VerticalAlignment="Center" FontSize="14" FontWeight="SemiBold"/>
             <customcontrol:PathButton Grid.Column="1"
             HorizontalAlignment="Right"
             HorizontalContentAlignment="Center"

+ 6 - 1
PDF Office/Views/PropertyPanel/AnnotPanel/SignatureAnnotProperty.xaml.cs

@@ -48,7 +48,7 @@ namespace PDF_Office.Views.PropertyPanel.AnnotPanel
         private void DeleteAll_Click(object sender, RoutedEventArgs e)
         {
             AlertsMessage alertsMessage = new AlertsMessage();
-            alertsMessage.ShowDialog("提示", "确定要全部删除吗?", "Cancel", "OK");
+            alertsMessage.ShowDialog("", "确定要全部删除吗?", "Cancel", "OK");
             if (alertsMessage.result == ContentResult.Ok)
             {
                 (DataContext as SignatureAnnotPropertyViewModel).DeleteAll();
@@ -63,5 +63,10 @@ namespace PDF_Office.Views.PropertyPanel.AnnotPanel
                 e.Handled = true;
             }
         }
+
+        private void UserControl_Loaded(object sender, RoutedEventArgs e)
+        {
+            TxtTitle.Text = App.MainPageLoader.GetString("Signatur_Title");
+        }
     }
 }

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 2 - 1
PDF Office/Views/PropertyPanel/AnnotPanel/StampAnnotProperty.xaml


+ 5 - 0
PDF Office/Views/PropertyPanel/AnnotPanel/StampAnnotProperty.xaml.cs

@@ -92,5 +92,10 @@ namespace PDF_Office.Views.PropertyPanel.AnnotPanel
                 e.Handled = true;
             }
         }
+
+        private void UserControl_Loaded(object sender, RoutedEventArgs e)
+        {
+            AnnoteTypeTitle.Text= App.MainPageLoader.GetString("Stamp_Title");
+        }
     }
 }

+ 1 - 0
PDF Office/packages.config

@@ -17,6 +17,7 @@
   <package id="Microsoft.Office.Interop.Word" version="15.0.4797.1004" targetFramework="net462" />
   <package id="Microsoft.Xaml.Behaviors.Wpf" version="1.1.31" targetFramework="net462" />
   <package id="Newtonsoft.Json" version="13.0.1" targetFramework="net462" />
+  <package id="NTwain" version="3.7.2" targetFramework="net462" />
   <package id="Prism.Core" version="8.1.97" targetFramework="net462" />
   <package id="Prism.DryIoc" version="8.1.97" targetFramework="net462" />
   <package id="Prism.Wpf" version="8.1.97" targetFramework="net462" />