Преглед изворни кода

compdfkit(win) - 补充页面编辑模块和遗漏部分文案翻译

weixiangjie пре 1 година
родитељ
комит
4c708c781c
32 измењених фајлова са 723 додато и 87 уклоњено
  1. 3 1
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFSignatureUI.xaml.cs
  2. 3 1
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFStampUI.xaml.cs
  3. 18 0
      Demo/Examples/Compdfkit_Tools/Common/Convert/LanguageResourceConverter.cs
  4. 1 0
      Demo/Examples/Compdfkit_Tools/Common/Helper/LanguageHelper.cs
  5. 5 5
      Demo/Examples/Compdfkit_Tools/Common/PropertyControl/WritableComboBoxControl.xaml
  6. 12 0
      Demo/Examples/Compdfkit_Tools/Compdfkit_Tools.csproj
  7. 1 1
      Demo/Examples/Compdfkit_Tools/DigitalSignature/DigitalSignatureControl/CPDFSignatureListControl.xaml.cs
  8. 2 2
      Demo/Examples/Compdfkit_Tools/DigitalSignature/VerifyDigitalSignatureControl/DigitalSignatureInfoControl.xaml.cs
  9. 2 0
      Demo/Examples/Compdfkit_Tools/DigitalSignature/VerifyDigitalSignatureControl/VerifyDigitalSignatureControl.xaml.cs
  10. 1 0
      Demo/Examples/Compdfkit_Tools/DigitalSignature/ViewCertificationControl/ViewCertificateDialog.xaml.cs
  11. 3 2
      Demo/Examples/Compdfkit_Tools/PDFView/PDFSearch/PDFSearchControl/CPDFSearchControl.xaml.cs
  12. 3 2
      Demo/Examples/Compdfkit_Tools/PageEdit/PDFPageEdit/CPDFPageEditControl.xaml.cs
  13. 11 10
      Demo/Examples/Compdfkit_Tools/PageEdit/PDFPageExtract/CPDFPageExtractUI.xaml
  14. 2 1
      Demo/Examples/Compdfkit_Tools/PageEdit/PDFPageExtract/CPDFPageExtractWindow.xaml.cs
  15. 17 15
      Demo/Examples/Compdfkit_Tools/PageEdit/PDFPageInsert/CPDFPageInsertUI.xaml
  16. 2 2
      Demo/Examples/Compdfkit_Tools/PageEdit/PDFPageInsert/CPDFPageInsertWindow.xaml.cs
  17. 2 1
      Demo/Examples/Compdfkit_Tools/Security/Watermark/AddWatermark/PageRangeDialog.xaml.cs
  18. 9 0
      Demo/Examples/Compdfkit_Tools/Strings/Bota.Designer.cs
  19. 3 0
      Demo/Examples/Compdfkit_Tools/Strings/Bota.resx
  20. 3 0
      Demo/Examples/Compdfkit_Tools/Strings/Bota.zh.resx
  21. 18 1
      Demo/Examples/Compdfkit_Tools/Strings/Common.Designer.cs
  22. 6 0
      Demo/Examples/Compdfkit_Tools/Strings/Common.resx
  23. 9 3
      Demo/Examples/Compdfkit_Tools/Strings/Common.zh.resx
  24. 314 0
      Demo/Examples/Compdfkit_Tools/Strings/DocEditor.Designer.cs
  25. 105 0
      Demo/Examples/Compdfkit_Tools/Strings/DocEditor.resx
  26. 98 0
      Demo/Examples/Compdfkit_Tools/Strings/DocEditor.zh.resx
  27. 24 6
      Demo/Examples/Compdfkit_Tools/Strings/Signature.Designer.cs
  28. 12 6
      Demo/Examples/Compdfkit_Tools/Strings/Signature.resx
  29. 30 24
      Demo/Examples/Compdfkit_Tools/Strings/Signature.zh.resx
  30. 2 2
      Demo/Examples/Compdfkit_Tools/Strings/ToolBar.Designer.cs
  31. 1 1
      Demo/Examples/Compdfkit_Tools/Strings/ToolBar.resx
  32. 1 1
      Demo/Examples/Compdfkit_Tools/Strings/ToolBar.zh.resx

+ 3 - 1
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFSignatureUI.xaml.cs

@@ -11,6 +11,7 @@ using System.Windows.Controls;
 using System.Windows.Data;
 using System.Windows.Input;
 using System.Windows.Media.Imaging;
+using Compdfkit_Tools.Helper;
 
 namespace Compdfkit_Tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
 {
@@ -133,7 +134,8 @@ namespace Compdfkit_Tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
                     int index = SignatureList.IndexOf(data);
                     if (index != -1)
                     {
-                        CPDFDeleteDialog cPDFDeleteDialog = new CPDFDeleteDialog("Warning", "Are you sure to delete?");
+                        CPDFDeleteDialog cPDFDeleteDialog = new CPDFDeleteDialog(LanguageHelper.CommonManager.GetString("Caption_Warning"), 
+                            LanguageHelper.CommonManager.GetString("Warn_Delete"));
                         cPDFDeleteDialog.Owner = Window.GetWindow(this);
                         cPDFDeleteDialog.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                         cPDFDeleteDialog.ShowDialog();

+ 3 - 1
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFStampUI.xaml.cs

@@ -10,6 +10,7 @@ using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Data;
 using System.Windows.Input;
+using Compdfkit_Tools.Helper;
 
 namespace Compdfkit_Tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
 {
@@ -199,7 +200,8 @@ namespace Compdfkit_Tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
                     if (index != -1)
                     {
 
-                        CPDFDeleteDialog cPDFDeleteDialog = new CPDFDeleteDialog("Warning", "Are you sure to delete?");
+                        CPDFDeleteDialog cPDFDeleteDialog = new CPDFDeleteDialog(LanguageHelper.CommonManager.GetString("Caption_Warning"), 
+                            LanguageHelper.CommonManager.GetString("Warn_Delete"));
                         cPDFDeleteDialog.Owner = Window.GetWindow(this);
                         cPDFDeleteDialog.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                         cPDFDeleteDialog.ShowDialog();

+ 18 - 0
Demo/Examples/Compdfkit_Tools/Common/Convert/LanguageResourceConverter.cs

@@ -133,4 +133,22 @@ namespace Compdfkit_Tools.Common
             throw new NotSupportedException();
         }
     }
+    
+    public class DocEditorResourceConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (parameter == null || string.IsNullOrEmpty(parameter.ToString()))
+            {
+                return string.Empty;
+            }
+
+            return LanguageHelper.DocEditorManager.GetString(parameter.ToString());
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotSupportedException();
+        }
+    }
 }

+ 1 - 0
Demo/Examples/Compdfkit_Tools/Common/Helper/LanguageHelper.cs

@@ -12,5 +12,6 @@ namespace Compdfkit_Tools.Helper
         public static ResourceManager SigManager= new ResourceManager("Compdfkit_Tools.Strings.Signature", Assembly.GetExecutingAssembly());
         public static ResourceManager DocInfoManager= new ResourceManager("Compdfkit_Tools.Strings.DocInfo", Assembly.GetExecutingAssembly());
         public static ResourceManager SecurityManager= new ResourceManager("Compdfkit_Tools.Strings.Security", Assembly.GetExecutingAssembly());
+        public static ResourceManager DocEditorManager= new ResourceManager("Compdfkit_Tools.Strings.DocEditor", Assembly.GetExecutingAssembly());
     }
 }

+ 5 - 5
Demo/Examples/Compdfkit_Tools/Common/PropertyControl/WritableComboBoxControl.xaml

@@ -12,7 +12,7 @@
             <ResourceDictionary.MergedDictionaries>
                 <ResourceDictionary Source="../../Asset/Styles/ComboBoxStyle.xaml"></ResourceDictionary>
             </ResourceDictionary.MergedDictionaries>
-            <local:CommonResourceConverter x:Key="CommonResourceConverter"></local:CommonResourceConverter> 
+            <local:DocEditorResourceConverter x:Key="DocEditorResourceConverter"></local:DocEditorResourceConverter> 
         </ResourceDictionary>
     </UserControl.Resources>
     <Grid>
@@ -29,10 +29,10 @@
             SelectedIndex="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:WritableComboBoxControl}, Path=SelectedIndex}"
             SelectionChanged ="ComboBox_SelectionChanged"
             Style="{StaticResource ComboBoxStyle1}">
-            <ComboBoxItem Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Option_AllPage}" Tag="AllPages"></ComboBoxItem>
-            <ComboBoxItem Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Button_Cancel}" Tag="OddPages"></ComboBoxItem>
-            <ComboBoxItem Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Button_Cancel}" Tag="EvenPages"></ComboBoxItem>
-            <ComboBoxItem Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Button_Cancel}" Tag="CustomPages"></ComboBoxItem>
+            <ComboBoxItem Content="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Range_All}" Tag="AllPages"></ComboBoxItem>
+            <ComboBoxItem Content="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Range_Odd}" Tag="OddPages"></ComboBoxItem>
+            <ComboBoxItem Content="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Range_Even}" Tag="EvenPages"></ComboBoxItem>
+            <ComboBoxItem Content="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Range_Custom}" Tag="CustomPages"></ComboBoxItem>
         </ComboBox>
         <TextBox
                  x:Name="TextBox"

+ 12 - 0
Demo/Examples/Compdfkit_Tools/Compdfkit_Tools.csproj

@@ -519,6 +519,11 @@
       <AutoGen>True</AutoGen>
       <DependentUpon>Common.resx</DependentUpon>
     </Compile>
+    <Compile Include="Strings\DocEditor.Designer.cs">
+      <DesignTime>True</DesignTime>
+      <AutoGen>True</AutoGen>
+      <DependentUpon>DocEditor.resx</DependentUpon>
+    </Compile>
     <Compile Include="Strings\DocInfo.Designer.cs">
       <DesignTime>True</DesignTime>
       <AutoGen>True</AutoGen>
@@ -562,6 +567,13 @@
     <EmbeddedResource Include="Strings\Common.zh.resx">
       <DependentUpon>Common.resx</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Strings\DocEditor.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>DocEditor.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Strings\DocEditor.zh.resx">
+      <DependentUpon>DocEditor.resx</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Strings\DocInfo.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>DocInfo.Designer.cs</LastGenOutput>

+ 1 - 1
Demo/Examples/Compdfkit_Tools/DigitalSignature/DigitalSignatureControl/CPDFSignatureListControl.xaml.cs

@@ -72,7 +72,7 @@ namespace Compdfkit_Tools.DigitalSignature.CPDFSignatureListControl
             string messageBoxText = LanguageHelper.BotaManager.GetString("Text_SureDelete");
             MessageBoxButton button = MessageBoxButton.OKCancel;
             MessageBoxImage icon = MessageBoxImage.Warning;
-            MessageBoxResult result = MessageBox.Show(messageBoxText, "", button, icon, MessageBoxResult.Cancel);
+            MessageBoxResult result = MessageBox.Show(messageBoxText, LanguageHelper.CommonManager.GetString("Caption_Warning"), button, icon, MessageBoxResult.Cancel);
             if(result != MessageBoxResult.OK)
             {
                 return;

+ 2 - 2
Demo/Examples/Compdfkit_Tools/DigitalSignature/VerifyDigitalSignatureControl/DigitalSignatureInfoControl.xaml.cs

@@ -76,7 +76,7 @@ namespace Compdfkit_Tools.PDFControl
             signerName = signature.Name;
             email = DictionaryValueConverter.GetEmailFormDictionary(signature.SignerList.First().CertificateList.Last().SubjectDict);
             time = signature.Date;
-            SignerInfo = validity + ",Signed by" + "\"" + signerName;
+            SignerInfo = validity + LanguageHelper.SigManager.GetString("Text_Signer") + "\"" + signerName;
             if (!string.IsNullOrEmpty(email))
             {
                 SignerInfo += "<" + email + ">" + "\"";
@@ -86,7 +86,7 @@ namespace Compdfkit_Tools.PDFControl
                 SignerInfo += "\"";
             }
 
-            TimeInfo = "Signature Time:" + CommonHelper.GetExactDateFromString(time);
+            TimeInfo = LanguageHelper.SigManager.GetString("Text_SignTime") + CommonHelper.GetExactDateFromString(time);
         }
         
         private void SetStatus(SignatureStatus status)

+ 2 - 0
Demo/Examples/Compdfkit_Tools/DigitalSignature/VerifyDigitalSignatureControl/VerifyDigitalSignatureControl.xaml.cs

@@ -1,5 +1,6 @@
 using System;
 using System.Windows;
+using Compdfkit_Tools.Helper;
 using Compdfkit_Tools.PDFControl;
 using ComPDFKit.DigitalSign;
 
@@ -13,6 +14,7 @@ namespace Compdfkit_Tools.PDFControl
         public VerifyDigitalSignatureControl()
         {
             InitializeComponent();
+            Title = LanguageHelper.SigManager.GetString("Title_Sig");
         }
 
         public void InitWithSignature(CPDFSignature signature)

+ 1 - 0
Demo/Examples/Compdfkit_Tools/DigitalSignature/ViewCertificationControl/ViewCertificateDialog.xaml.cs

@@ -26,6 +26,7 @@ namespace Compdfkit_Tools.PDFControl
         public ViewCertificateDialog()
         {
             InitializeComponent();
+            Title = LanguageHelper.SigManager.GetString("Title_Cert");
         }
 
         public void InitCertificateList(CPDFSignature signature)

+ 3 - 2
Demo/Examples/Compdfkit_Tools/PDFView/PDFSearch/PDFSearchControl/CPDFSearchControl.xaml.cs

@@ -6,6 +6,7 @@ using System.Collections.Generic;
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Media;
+using Compdfkit_Tools.Helper;
 
 namespace Compdfkit_Tools.PDFControl
 {
@@ -78,7 +79,7 @@ namespace Compdfkit_Tools.PDFControl
             currentHighLightIndex = e;
             BindSearchResult result = SearchResult.GetSelectItem();
             HighLightSelectResult(result);
-            ResultText.Text = string.Format("Results:{0}/{1}", e+1,ResultCount);
+            ResultText.Text = LanguageHelper.BotaManager.GetString("Text_Result")+ (e+1) + "//" + ResultCount;
         }
 
         private void TextSearch_SearchCompletedHandler(object sender, TextSearchResult e)
@@ -112,7 +113,7 @@ namespace Compdfkit_Tools.PDFControl
                 }
                 else
                 {
-                    ResultText.Text = string.Format("{0} results found", ResultCount);
+                    ResultText.Text = ResultCount + " " + LanguageHelper.BotaManager.GetString("Tip_Result");
                 }
             });
         }

+ 3 - 2
Demo/Examples/Compdfkit_Tools/PageEdit/PDFPageEdit/CPDFPageEditControl.xaml.cs

@@ -19,6 +19,7 @@ using Microsoft.Win32;
 using System.Windows.Controls.Primitives;
 using System.IO;
 using System.Windows.Media.Animation;
+using Compdfkit_Tools.Helper;
 
 namespace Compdfkit_Tools.PDFControl
 {
@@ -2115,7 +2116,7 @@ namespace Compdfkit_Tools.PDFControl
              
             if (alertType == AlertType.EmptyPageAlert)
             {
-                AlertTextBlock.Text = "Please select at least one page.";
+                AlertTextBlock.Text = LanguageHelper.DocEditorManager.GetString("Tip_NoPage");
             }
             else if (alertType == AlertType.SinglePageALert)
             {
@@ -2123,7 +2124,7 @@ namespace Compdfkit_Tools.PDFControl
             }
             else if (alertType == AlertType.AllPageAlert)
             {
-                AlertTextBlock.Text = "Please don't select all pages";
+                AlertTextBlock.Text = LanguageHelper.DocEditorManager.GetString("Tip_AllPage");
             }
              
             DoubleAnimation animation = new DoubleAnimation();

+ 11 - 10
Demo/Examples/Compdfkit_Tools/PageEdit/PDFPageExtract/CPDFPageExtractUI.xaml

@@ -12,6 +12,7 @@
     <UserControl.Resources>
         <ResourceDictionary>
             <cpdfcommon:ReverseBoolConverter x:Key="ReverseBoolConverter"></cpdfcommon:ReverseBoolConverter>
+            <cpdfcommon:DocEditorResourceConverter x:Key="DocEditorResourceConverter"></cpdfcommon:DocEditorResourceConverter>
         </ResourceDictionary>
     </UserControl.Resources>
     <Grid>
@@ -21,22 +22,22 @@
             <RowDefinition></RowDefinition>
             <RowDefinition Height="57"></RowDefinition>
         </Grid.RowDefinitions>
-        <TextBlock Text="Extract" FontSize="14" Margin="12,6" HorizontalAlignment="Left" VerticalAlignment="Top"></TextBlock>
+        <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Title_Extract}" FontSize="14" Margin="12,6" HorizontalAlignment="Left" VerticalAlignment="Top"></TextBlock>
         <Grid Grid.Row="1">
             <Border BorderBrush="#1A000000" BorderThickness="1" Width="382" Height="190" Margin="25,0,25,0">
                 <StackPanel Orientation="Vertical" Margin="17">
                     <RadioButton Margin="0,20,0,0" x:Name="AllPagesRadioButton" GroupName="PageRange" IsChecked="True" Tag="AllPages" Click="PageRangeRadioButtonClick">
-                        <TextBlock Text="All Pages"></TextBlock>
+                        <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Range_All}"></TextBlock>
                     </RadioButton>
                     <RadioButton Margin="0,20,0,0"  x:Name="OddPagesRadioButton" GroupName="PageRange" Tag="OddPages" Click="PageRangeRadioButtonClick">
-                        <TextBlock Text="Odd Pages Only"></TextBlock>
+                        <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Range_Odd}"></TextBlock>
                     </RadioButton>
                     <RadioButton Margin="0,20,0,0"  x:Name="EvenPagesRadioButton" GroupName="PageRange" Tag="EvenPages" Click="PageRangeRadioButtonClick">
-                        <TextBlock Text="Even Pages Only"></TextBlock>
+                        <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Range_Even}"></TextBlock>
                     </RadioButton>
                     <StackPanel Orientation="Horizontal" Margin="0,16,0,0">
                         <RadioButton x:Name="CustomPagesRadioButton" VerticalAlignment="Center" Tag="CustomPages" GroupName="PageRange"  Click="PageRangeRadioButtonClick">
-                            <TextBlock Text="Custom Range"></TextBlock>
+                            <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Range_Custom}"></TextBlock>
                         </RadioButton>
                         <TextBox x:Name="CustomPageRangeTextBox" Height="32" Width="135" Margin="12,0,0,0" IsEnabled="{Binding ElementName=CustomPagesRadioButton, Path=IsChecked}" TextChanged="TextBox_TextChanged" VerticalContentAlignment="Center"></TextBox>
                         <TextBlock Text="/"  VerticalAlignment="Center"  Margin="8,0,0,0"></TextBlock>
@@ -44,24 +45,24 @@
                     </StackPanel>
                 </StackPanel>
             </Border>
-            <TextBlock Text="Page Range" FontFamily="Microsoft YaHei" Margin="40,-1,0,0" Background="White" Width="70" Height="16" VerticalAlignment="Top" HorizontalAlignment="Left" FontWeight="Bold"></TextBlock>
+            <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Subtitle_Pages}" FontFamily="Microsoft YaHei" Margin="40,-1,0,0" Background="White" Width="70" Height="16" VerticalAlignment="Top" HorizontalAlignment="Left" FontWeight="Bold"></TextBlock>
         </Grid>
         <Grid Grid.Row="2">
             <StackPanel Margin="42,10,0,0">
                 <CheckBox Margin="0,10,0,0" Click="SeparateCheckBoxClick" >
-                    <TextBlock Text="Each page in a separate file"></TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Option_Separate}"></TextBlock>
                 </CheckBox>
                 <CheckBox x:Name="DeleteCheckBox" Margin="0,16,0,0" Click="DeleteCheckBoxClick" IsEnabled="{Binding ElementName=AllPagesRadioButton, Path=IsChecked, Converter={StaticResource ReverseBoolConverter}}">
-                    <TextBlock Text="Delete pages after extraction"></TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Option_Delete}"></TextBlock>
                 </CheckBox>
             </StackPanel>
         </Grid>
         <StackPanel HorizontalAlignment="Right" Grid.Row="3" Orientation="Horizontal" Margin="0,0,25,0">
             <Button x:Name="CancelButton" Height="32" Width="112" Click="CancelButton_Click">
-                <TextBlock Text="Cancel"></TextBlock>
+                <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Button_Cancel}"></TextBlock>
             </Button>
             <Button x:Name="ExtractButton" Height="32" Width="112"  Margin="8,0,0,0" Click="ExtractButton_Click">
-                <TextBlock Text="Extract"></TextBlock>
+                <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Button_Extract}"></TextBlock>
             </Button>
         </StackPanel>
     </Grid>

+ 2 - 1
Demo/Examples/Compdfkit_Tools/PageEdit/PDFPageExtract/CPDFPageExtractWindow.xaml.cs

@@ -93,7 +93,8 @@ namespace Compdfkit_Tools.PDFControl
             }
             else
             {
-                MessageBox.Show("Please check page range.", "Alert", MessageBoxButton.OK, MessageBoxImage.Warning);
+                MessageBox.Show(LanguageHelper.DocEditorManager.GetString("Warn_PageRange"), 
+                    LanguageHelper.CommonManager.GetString("Caption_Warning"), MessageBoxButton.OK, MessageBoxImage.Warning);
             }
         }
 

+ 17 - 15
Demo/Examples/Compdfkit_Tools/PageEdit/PDFPageInsert/CPDFPageInsertUI.xaml

@@ -15,6 +15,7 @@
             </ResourceDictionary.MergedDictionaries>
             <cpdfcommon:BoolToVisibleConverter x:Key="BoolToVisibleConverter"></cpdfcommon:BoolToVisibleConverter>
             <cpdfcommon:ReverseVisibilityConverter x:Key="ReverseVisibilityConverter"></cpdfcommon:ReverseVisibilityConverter>
+            <cpdfcommon:DocEditorResourceConverter x:Key="DocEditorResourceConverter"></cpdfcommon:DocEditorResourceConverter>
         </ResourceDictionary>
     </UserControl.Resources>
     <Grid>
@@ -24,7 +25,8 @@
             <RowDefinition></RowDefinition>
             <RowDefinition Height="57"></RowDefinition>
         </Grid.RowDefinitions>
-        <TextBlock Text="Insert" FontSize="14" Margin="12,6" HorizontalAlignment="Left" VerticalAlignment="Top"></TextBlock>
+        <TextBlock FontSize="14" Margin="12,6" HorizontalAlignment="Left" VerticalAlignment="Top"
+                   Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Title_Insert}"></TextBlock>
         <Grid Grid.Row="1">
             <Border BorderBrush="#1A000000" BorderThickness="1" Width="382" Height="170">
                 <Grid Margin="10">
@@ -34,24 +36,24 @@
                     </Grid.RowDefinitions>
                     <StackPanel Margin="0,5,0,0">
                         <RadioButton GroupName="PageInsert" IsChecked="True" Name="BlankPagesCheckBox" Tag="BlankPages" Click="InsertTypeCheckBox_Click">
-                            <TextBlock Text="Blank Page"></TextBlock>
+                            <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Option_Blank}"></TextBlock>
                         </RadioButton>
                         <RadioButton GroupName="PageInsert" Name="CustomBlankPagesCheckBox" Tag="CustomBlankPages" Margin="0,10,0,10" Click="InsertTypeCheckBox_Click">
-                            <TextBlock Text="Custom Blank Page"></TextBlock>
+                            <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Option_Custom}"></TextBlock>
                         </RadioButton>
                         <RadioButton GroupName="PageInsert" x:Name="OtherFileRadioButton" Tag="FromOtherPDF" Click="InsertTypeCheckBox_Click">
-                            <TextBlock Text="From other Files"></TextBlock>
+                            <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Option_From}"></TextBlock>
                         </RadioButton>
                     </StackPanel>
 
                     <Grid Grid.Row="1" Grid.ColumnSpan="2">
                         <StackPanel x:Name="OtherFilePanel" Orientation="Vertical"  Visibility="{Binding IsChecked, ElementName=OtherFileRadioButton, Converter={StaticResource BoolToVisibleConverter}}">
                             <StackPanel Orientation="Horizontal" Margin="0,6,0,0" IsEnabled="{Binding ElementName=OtherFileRadioButton, Path=IsChecked}">
-                                <Button x:Name="SelectFileButton" Width="70" Content="Select File" Click="SelectFileButton_Click"></Button>
+                                <Button x:Name="SelectFileButton" Width="70" Content="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Button_Select}" Click="SelectFileButton_Click"></Button>
                                 <TextBox x:Name="FilePathTextBox" Width="230" Height="28" Margin="8,0,0,0" IsReadOnly="True" VerticalContentAlignment="Center"/>
                             </StackPanel>
                             <StackPanel Orientation="Horizontal" Margin="0,6,0,0"  IsEnabled="{Binding ElementName=OtherFileRadioButton, Path=IsChecked}">
-                                <TextBlock Text="Page Range" Width="80" VerticalAlignment="Center"></TextBlock>
+                                <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Text_Range}" Width="80" VerticalAlignment="Center"></TextBlock>
                                 <cpdfcommon:WritableComboBoxControl x:Name="WritableComboBoxControl" Width="230" Margin="0,0,0,0" Loaded="WritableComboBoxControl_Loaded" Unloaded="WritableComboBoxControl_Unloaded"></cpdfcommon:WritableComboBoxControl>
                             </StackPanel>
                         </StackPanel>
@@ -64,7 +66,7 @@
                     </Grid>
                 </Grid>
             </Border>
-            <TextBlock Text="Page Insert" FontFamily="Microsoft YaHei" Margin="40,0,0,0" Background="White" Width="70" Height="16" VerticalAlignment="Top" HorizontalAlignment="Left" FontWeight="Bold"></TextBlock>
+            <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Subtitle_Pages}" FontFamily="Microsoft YaHei" Margin="40,0,0,0" Background="White" Width="70" Height="16" VerticalAlignment="Top" HorizontalAlignment="Left" FontWeight="Bold"></TextBlock>
         </Grid>
         <Grid Grid.Row="2">
             <Border BorderBrush="#1A000000" BorderThickness="1" Width="382" Height="184">
@@ -75,35 +77,35 @@
                         <RowDefinition></RowDefinition>
                     </Grid.RowDefinitions>
                     <RadioButton GroupName="PageLocation" Name="HomePageRadioButton" Tag="HomePage" Margin="0,10,0,10" IsChecked="True" Click="PageInsertLocation_Click">
-                        <TextBlock Text="Home Page"></TextBlock>
+                        <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Option_First}"></TextBlock>
                     </RadioButton>
                     <RadioButton GroupName="PageLocation" Name="GastricPageRadioButton" Tag="GastricPage" Grid.Row="1" Margin="0,10,0,10"  Click="PageInsertLocation_Click">
-                        <TextBlock Text="Gastric Page"></TextBlock>
+                        <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Option_Last}"></TextBlock>
                     </RadioButton>
                     <StackPanel  Grid.Row="2" Margin="0,8,0,10">
                         <StackPanel Orientation="Horizontal">
                             <RadioButton GroupName="PageLocation" Name="CustomPageRadioButton" Tag="CustomPage" VerticalAlignment="Center" Click="PageInsertLocation_Click">
-                                <TextBlock Text="Page"/>
+                                <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Option_Page}"/>
                             </RadioButton>
                             <cpdfcommon:NumericUpDownControl x:Name="PageTextBox" Maxium="{Binding MaxIndex, Mode=OneWay}" Minimum="1" Text="{Binding CustomPageIndex, Mode=TwoWay}" Height="32" Width="175" Margin="12,0,0,0" IsEnabled="{Binding ElementName=CustomPageRadioButton, Path= IsChecked}"/>
                             <TextBlock Text="/"  VerticalAlignment="Center"  Margin="8,0,0,0" ></TextBlock>
                             <TextBlock x:Name="MaxPageTextBox" Text="10000"  VerticalAlignment="Center" ></TextBlock>
                         </StackPanel>
                         <ComboBox x:Name="PageLocationComboBox" Width="215" Height="32" HorizontalAlignment="Left" Margin="20,8,0,0"  Style="{StaticResource ComboBoxStyle1}" VerticalContentAlignment="Center" IsEnabled="{Binding ElementName=CustomPageRadioButton, Path= IsChecked}" SelectionChanged="PageLocationComboBox_SelectionChanged">
-                            <ComboBoxItem Content="Back" IsSelected="True"></ComboBoxItem>
-                            <ComboBoxItem Content="Font"></ComboBoxItem>
+                            <ComboBoxItem Content="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Option_Before}" IsSelected="True"></ComboBoxItem>
+                            <ComboBoxItem Content="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Option_After}"></ComboBoxItem>
                         </ComboBox>
                     </StackPanel>
                 </Grid>
             </Border>
-            <TextBlock Text="Page Insert Location" FontFamily="Microsoft YaHei" Margin="40,-4,0,0" Background="White" Width="120" Height="16" VerticalAlignment="Top" HorizontalAlignment="Left" FontWeight="Bold"></TextBlock>
+            <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Subtitle_Pos}" FontFamily="Microsoft YaHei" Margin="40,-4,0,0" Background="White" Width="120" Height="16" VerticalAlignment="Top" HorizontalAlignment="Left" FontWeight="Bold"></TextBlock>
         </Grid>
         <StackPanel HorizontalAlignment="Right" Grid.Row="3" Orientation="Horizontal" Margin="0,0,25,0">
             <Button x:Name="CancelButton" Height="32" Width="112" Click="CancelButton_Click">
-                <TextBlock Text="Cancel"></TextBlock>
+                <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Button_Cancel}"></TextBlock>
             </Button>
             <Button x:Name="InsertButton" Height="32" Width="112"  Margin="8,0,0,0" Click="InsertButton_Click">
-                <TextBlock Text="Insert"></TextBlock>
+                <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Button_Insert}"></TextBlock>
             </Button>
         </StackPanel>
     </Grid>

+ 2 - 2
Demo/Examples/Compdfkit_Tools/PageEdit/PDFPageInsert/CPDFPageInsertWindow.xaml.cs

@@ -71,14 +71,14 @@ namespace Compdfkit_Tools.PDFControl
         {
             if (Result.InsertType == InsertType.FromOtherPDF && Result.FilePath == string.Empty)
             {
-                MessageBox.Show(" Please select a PDF file.", "Alert", MessageBoxButton.OK, MessageBoxImage.Warning);
+                MessageBox.Show(LanguageHelper.DocEditorManager.GetString("Warn_NoFile"),LanguageHelper.CommonManager.GetString("Caption_Warning"), MessageBoxButton.OK, MessageBoxImage.Warning);
                 return;
             }
 
             List<int> pageRangeList = new List<int>();
             if (Result.InsertType == InsertType.FromOtherPDF && !CommonHelper.GetPagesInRange(ref pageRangeList, Result.PageRange, CPDFPageInsertUI.MaxIndex, new char[] { ',' }, new char[] { '-' }))
             {
-                MessageBox.Show("Please check page range.", "Alert", MessageBoxButton.OK, MessageBoxImage.Warning);
+                MessageBox.Show(LanguageHelper.DocEditorManager.GetString("Warn_PageRange"), LanguageHelper.CommonManager.GetString("Caption_Warning"), MessageBoxButton.OK, MessageBoxImage.Warning);
                 return;
             }
             CloseWindow(Result);

+ 2 - 1
Demo/Examples/Compdfkit_Tools/Security/Watermark/AddWatermark/PageRangeDialog.xaml.cs

@@ -85,7 +85,8 @@ namespace Compdfkit_Tools.PDFControl
         {
             if (!canContinue)
             {
-                MessageBox.Show("Please enter the right page range", "", MessageBoxButton.OK, MessageBoxImage.Information);
+                MessageBox.Show("Please enter the right page range", 
+                    LanguageHelper.CommonManager.GetString("Caption_Warning"), MessageBoxButton.OK, MessageBoxImage.Information);
                 return;
             }
             WindowClosed?.Invoke(weakReference.Target, PageIndexList);

+ 9 - 0
Demo/Examples/Compdfkit_Tools/Strings/Bota.Designer.cs

@@ -212,6 +212,15 @@ namespace Compdfkit_Tools.Strings.Common {
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to result found.
+        /// </summary>
+        internal static string Tip_Result {
+            get {
+                return ResourceManager.GetString("Tip_Result", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   Looks up a localized string similar to Annotations.
         /// </summary>

+ 3 - 0
Demo/Examples/Compdfkit_Tools/Strings/Bota.resx

@@ -120,4 +120,7 @@
     <data name="Button_Cancel" xml:space="preserve">
         <value>Cancel</value>
     </data>
+    <data name="Tip_Result" xml:space="preserve">
+        <value>result found</value>
+    </data>
 </root>

+ 3 - 0
Demo/Examples/Compdfkit_Tools/Strings/Bota.zh.resx

@@ -113,4 +113,7 @@
     <data name="Button_Cancel" xml:space="preserve">
         <value>取消</value>
     </data>
+    <data name="Tip_Result" xml:space="preserve">
+        <value>查询结果</value>
+    </data>
 </root>

+ 18 - 1
Demo/Examples/Compdfkit_Tools/Strings/Common.Designer.cs

@@ -1,7 +1,6 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.42000
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.
@@ -105,6 +104,15 @@ namespace Compdfkit_Tools.Strings.Common {
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to Warning.
+        /// </summary>
+        internal static string Caption_Warning {
+            get {
+                return ResourceManager.GetString("Caption_Warning", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   Looks up a localized string similar to Tile.
         /// </summary>
@@ -1104,6 +1112,15 @@ namespace Compdfkit_Tools.Strings.Common {
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to Are you sure to delete?.
+        /// </summary>
+        internal static string Warn_Delete {
+            get {
+                return ResourceManager.GetString("Warn_Delete", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   Looks up a localized string similar to Fit Page.
         /// </summary>

+ 6 - 0
Demo/Examples/Compdfkit_Tools/Strings/Common.resx

@@ -474,4 +474,10 @@
   <data name="Option_OddPages" xml:space="preserve">
     <value>Odd pages only</value>
   </data>
+  <data name="Caption_Warning" xml:space="preserve">
+    <value>Warning</value>
+  </data>
+  <data name="Warn_Delete" xml:space="preserve">
+    <value>Are you sure to delete?</value>
+  </data>
 </root>

+ 9 - 3
Demo/Examples/Compdfkit_Tools/Strings/Common.zh.resx

@@ -298,13 +298,13 @@
     <value>缩小</value>
   </data>
   <data name="Option_A3" xml:space="preserve">
-    <value>A3(297cm x 420mm)</value>
+    <value>A3(297mm x 420mm)</value>
   </data>
   <data name="Option_A4" xml:space="preserve">
-    <value>A4(210cm x 297mm)</value>
+    <value>A4(210mm x 297mm)</value>
   </data>
   <data name="Option_A5" xml:space="preserve">
-    <value>A5(148cm x 210mm)</value>
+    <value>A5(148mm x 210mm)</value>
   </data>
   <data name="Option_Landscape" xml:space="preserve">
     <value>横向</value>
@@ -474,4 +474,10 @@
   <data name="Option_OddPages" xml:space="preserve">
     <value>仅奇数页</value>
   </data>
+  <data name="Caption_Warning" xml:space="preserve">
+    <value>警告</value>
+  </data>
+  <data name="Warn_Delete" xml:space="preserve">
+    <value>确定删除该内容?</value>
+  </data>
 </root>

+ 314 - 0
Demo/Examples/Compdfkit_Tools/Strings/DocEditor.Designer.cs

@@ -0,0 +1,314 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Compdfkit_Tools.Strings {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class DocEditor {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal DocEditor() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Compdfkit_Tools.Strings.DocEditor", typeof(DocEditor).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Cancel.
+        /// </summary>
+        internal static string Button_Cancel {
+            get {
+                return ResourceManager.GetString("Button_Cancel", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Extract.
+        /// </summary>
+        internal static string Button_Extract {
+            get {
+                return ResourceManager.GetString("Button_Extract", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Insert.
+        /// </summary>
+        internal static string Button_Insert {
+            get {
+                return ResourceManager.GetString("Button_Insert", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Select a File.
+        /// </summary>
+        internal static string Button_Select {
+            get {
+                return ResourceManager.GetString("Button_Select", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to e.g. 1,3-5,10.
+        /// </summary>
+        internal static string Holder_Custom {
+            get {
+                return ResourceManager.GetString("Holder_Custom", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to After.
+        /// </summary>
+        internal static string Option_After {
+            get {
+                return ResourceManager.GetString("Option_After", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Before.
+        /// </summary>
+        internal static string Option_Before {
+            get {
+                return ResourceManager.GetString("Option_Before", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Blank Page.
+        /// </summary>
+        internal static string Option_Blank {
+            get {
+                return ResourceManager.GetString("Option_Blank", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Custom Black Page.
+        /// </summary>
+        internal static string Option_Custom {
+            get {
+                return ResourceManager.GetString("Option_Custom", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Delete page after extraction.
+        /// </summary>
+        internal static string Option_Delete {
+            get {
+                return ResourceManager.GetString("Option_Delete", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to First Page.
+        /// </summary>
+        internal static string Option_First {
+            get {
+                return ResourceManager.GetString("Option_First", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to From PDF.
+        /// </summary>
+        internal static string Option_From {
+            get {
+                return ResourceManager.GetString("Option_From", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Last Page.
+        /// </summary>
+        internal static string Option_Last {
+            get {
+                return ResourceManager.GetString("Option_Last", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Page.
+        /// </summary>
+        internal static string Option_Page {
+            get {
+                return ResourceManager.GetString("Option_Page", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Each page in a separate file.
+        /// </summary>
+        internal static string Option_Separate {
+            get {
+                return ResourceManager.GetString("Option_Separate", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to All Pages.
+        /// </summary>
+        internal static string Range_All {
+            get {
+                return ResourceManager.GetString("Range_All", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Custom Range.
+        /// </summary>
+        internal static string Range_Custom {
+            get {
+                return ResourceManager.GetString("Range_Custom", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Even Pages Only.
+        /// </summary>
+        internal static string Range_Even {
+            get {
+                return ResourceManager.GetString("Range_Even", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Odd Pages Only.
+        /// </summary>
+        internal static string Range_Odd {
+            get {
+                return ResourceManager.GetString("Range_Odd", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Insert Pages.
+        /// </summary>
+        internal static string Subtitle_Pages {
+            get {
+                return ResourceManager.GetString("Subtitle_Pages", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Insert To.
+        /// </summary>
+        internal static string Subtitle_Pos {
+            get {
+                return ResourceManager.GetString("Subtitle_Pos", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Page Range.
+        /// </summary>
+        internal static string Text_Range {
+            get {
+                return ResourceManager.GetString("Text_Range", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Can not delete all pages. Please keep at least one page..
+        /// </summary>
+        internal static string Tip_AllPage {
+            get {
+                return ResourceManager.GetString("Tip_AllPage", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to No pages selected. Please select one or more pages first to organize..
+        /// </summary>
+        internal static string Tip_NoPage {
+            get {
+                return ResourceManager.GetString("Tip_NoPage", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Extract.
+        /// </summary>
+        internal static string Title_Extract {
+            get {
+                return ResourceManager.GetString("Title_Extract", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Insert.
+        /// </summary>
+        internal static string Title_Insert {
+            get {
+                return ResourceManager.GetString("Title_Insert", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to No File Selected.
+        /// </summary>
+        internal static string Warn_NoFile {
+            get {
+                return ResourceManager.GetString("Warn_NoFile", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid page range or the page number is out of range..
+        /// </summary>
+        internal static string Warn_PageRange {
+            get {
+                return ResourceManager.GetString("Warn_PageRange", resourceCulture);
+            }
+        }
+    }
+}

+ 105 - 0
Demo/Examples/Compdfkit_Tools/Strings/DocEditor.resx

@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<root>
+    <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: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.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    </resheader>
+    <resheader name="writer">
+        <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    </resheader>
+    <data name="Title_Insert" xml:space="preserve">
+        <value>Insert</value>
+    </data>
+    <data name="Subtitle_Pages" xml:space="preserve">
+        <value>Insert Pages</value>
+    </data>
+    <data name="Option_Blank" xml:space="preserve">
+        <value>Blank Page</value>
+    </data>
+    <data name="Option_Custom" xml:space="preserve">
+        <value>Custom Black Page</value>
+    </data>
+    <data name="Option_From" xml:space="preserve">
+        <value>From PDF</value>
+    </data>
+    <data name="Button_Select" xml:space="preserve">
+        <value>Select a File</value>
+    </data>
+    <data name="Text_Range" xml:space="preserve">
+        <value>Page Range</value>
+    </data>
+    <data name="Range_All" xml:space="preserve">
+        <value>All Pages</value>
+    </data>
+    <data name="Range_Odd" xml:space="preserve">
+        <value>Odd Pages Only</value>
+    </data>
+    <data name="Range_Even" xml:space="preserve">
+        <value>Even Pages Only</value>
+    </data>
+    <data name="Range_Custom" xml:space="preserve">
+        <value>Custom Range</value>
+    </data>
+    <data name="Subtitle_Pos" xml:space="preserve">
+        <value>Insert To</value>
+    </data>
+    <data name="Option_First" xml:space="preserve">
+        <value>First Page</value>
+    </data>
+    <data name="Option_Last" xml:space="preserve">
+        <value>Last Page</value>
+    </data>
+    <data name="Option_Page" xml:space="preserve">
+        <value>Page</value>
+    </data>
+    <data name="Option_After" xml:space="preserve">
+        <value>After</value>
+    </data>
+    <data name="Option_Before" xml:space="preserve">
+        <value>Before</value>
+    </data>
+    <data name="Button_Cancel" xml:space="preserve">
+        <value>Cancel</value>
+    </data>
+    <data name="Button_Insert" xml:space="preserve">
+        <value>Insert</value>
+    </data>
+    <data name="Warn_NoFile" xml:space="preserve">
+        <value>No File Selected</value>
+    </data>
+    <data name="Warn_PageRange" xml:space="preserve">
+        <value>Invalid page range or the page number is out of range.</value>
+    </data>
+    <data name="Title_Extract" xml:space="preserve">
+        <value>Extract</value>
+    </data>
+    <data name="Holder_Custom" xml:space="preserve">
+        <value>e.g. 1,3-5,10</value>
+    </data>
+    <data name="Option_Separate" xml:space="preserve">
+        <value>Each page in a separate file</value>
+    </data>
+    <data name="Option_Delete" xml:space="preserve">
+        <value>Delete page after extraction</value>
+    </data>
+    <data name="Button_Extract" xml:space="preserve">
+        <value>Extract</value>
+    </data>
+    <data name="Tip_NoPage" xml:space="preserve">
+        <value>No pages selected. Please select one or more pages first to organize.</value>
+    </data>
+    <data name="Tip_AllPage" xml:space="preserve">
+        <value>Can not delete all pages. Please keep at least one page.</value>
+    </data>
+</root>

+ 98 - 0
Demo/Examples/Compdfkit_Tools/Strings/DocEditor.zh.resx

@@ -0,0 +1,98 @@
+<root>
+    <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.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    </resheader>
+    <resheader name="writer">
+        <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    </resheader>
+    <data name="Title_Insert" xml:space="preserve">
+        <value>插入</value>
+    </data>
+    <data name="Subtitle_Pages" xml:space="preserve">
+        <value>插入页面</value>
+    </data>
+    <data name="Option_Blank" xml:space="preserve">
+        <value>空白页</value>
+    </data>
+    <data name="Option_Custom" xml:space="preserve">
+        <value>自定义空白页</value>
+    </data>
+    <data name="Option_From" xml:space="preserve">
+        <value>从其他PDF</value>
+    </data>
+    <data name="Button_Select" xml:space="preserve">
+        <value>选择文件</value>
+    </data>
+    <data name="Text_Range" xml:space="preserve">
+        <value>页面范围</value>
+    </data>
+    <data name="Range_All" xml:space="preserve">
+        <value>所有页面</value>
+    </data>
+    <data name="Range_Odd" xml:space="preserve">
+        <value>奇数页</value>
+    </data>
+    <data name="Range_Even" xml:space="preserve">
+        <value>偶数页</value>
+    </data>
+    <data name="Range_Custom" xml:space="preserve">
+        <value>自定义范围</value>
+    </data>
+    <data name="Subtitle_Pos" xml:space="preserve">
+        <value>页面插入位置</value>
+    </data>
+    <data name="Option_First" xml:space="preserve">
+        <value>首页</value>
+    </data>
+    <data name="Option_Last" xml:space="preserve">
+        <value>末页</value>
+    </data>
+    <data name="Option_Page" xml:space="preserve">
+        <value>页面</value>
+    </data>
+    <data name="Option_After" xml:space="preserve">
+        <value>后</value>
+    </data>
+    <data name="Option_Before" xml:space="preserve">
+        <value>前</value>
+    </data>
+    <data name="Button_Cancel" xml:space="preserve">
+        <value>取消</value>
+    </data>
+    <data name="Button_Insert" xml:space="preserve">
+        <value>插入</value>
+    </data>
+    <data name="Warn_NoFile" xml:space="preserve">
+        <value>没有选择文件</value>
+    </data>
+    <data name="Warn_PageRange" xml:space="preserve">
+        <value>无效的页码或页码超出范围。</value>
+    </data>
+    <data name="Title_Extract" xml:space="preserve">
+        <value>提取</value>
+    </data>
+    <data name="Holder_Custom" xml:space="preserve">
+        <value>例如1,3-5,10</value>
+    </data>
+    <data name="Option_Separate" xml:space="preserve">
+        <value>每页作为单个文件</value>
+    </data>
+    <data name="Option_Delete" xml:space="preserve">
+        <value>提取后删除页面</value>
+    </data>
+    <data name="Button_Extract" xml:space="preserve">
+        <value>提取</value>
+    </data>
+    <data name="Tip_NoPage" xml:space="preserve">
+        <value>未选择页面。请选择一个或多个页面。</value>
+    </data>
+    <data name="Tip_AllPage" xml:space="preserve">
+        <value>不能删除所有页面。请至少保留一个页面。</value>
+    </data>
+</root>

+ 24 - 6
Demo/Examples/Compdfkit_Tools/Strings/Signature.Designer.cs

@@ -465,7 +465,7 @@ namespace Compdfkit_Tools.Strings {
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Algorithm.
+        ///   Looks up a localized string similar to Algorithm:.
         /// </summary>
         internal static string Text_Algorithm {
             get {
@@ -582,7 +582,7 @@ namespace Compdfkit_Tools.Strings {
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Issuer.
+        ///   Looks up a localized string similar to Issuer:.
         /// </summary>
         internal static string Text_Issuer {
             get {
@@ -663,7 +663,7 @@ namespace Compdfkit_Tools.Strings {
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Serial Number.
+        ///   Looks up a localized string similar to Serial Number:.
         /// </summary>
         internal static string Text_SerialNum {
             get {
@@ -753,7 +753,7 @@ namespace Compdfkit_Tools.Strings {
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Signing Time.
+        ///   Looks up a localized string similar to Signing Time: .
         /// </summary>
         internal static string Text_SignTime {
             get {
@@ -798,7 +798,7 @@ namespace Compdfkit_Tools.Strings {
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Subject.
+        ///   Looks up a localized string similar to Subject:.
         /// </summary>
         internal static string Text_Subject {
             get {
@@ -879,7 +879,7 @@ namespace Compdfkit_Tools.Strings {
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Version.
+        ///   Looks up a localized string similar to Version:.
         /// </summary>
         internal static string Text_Version {
             get {
@@ -1211,6 +1211,15 @@ namespace Compdfkit_Tools.Strings {
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to Certificate Viewer.
+        /// </summary>
+        internal static string Title_Cert {
+            get {
+                return ResourceManager.GetString("Title_Cert", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   Looks up a localized string similar to Select a type of Digital ID..
         /// </summary>
@@ -1229,6 +1238,15 @@ namespace Compdfkit_Tools.Strings {
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to Digital Signature Details.
+        /// </summary>
+        internal static string Title_Sig {
+            get {
+                return ResourceManager.GetString("Title_Sig", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   Looks up a localized string similar to Signature Information.
         /// </summary>

+ 12 - 6
Demo/Examples/Compdfkit_Tools/Strings/Signature.resx

@@ -304,7 +304,7 @@
         <value>Signature</value>
     </data>
     <data name="Text_SignTime" xml:space="preserve">
-        <value>Signing Time</value>
+        <value>Signing Time: </value>
     </data>
     <data name="Text_Statement" xml:space="preserve">
         <value>Certification Authority Statement</value>
@@ -343,7 +343,7 @@
         <value>Issued to:</value>
     </data>
     <data name="Text_Issuer" xml:space="preserve">
-        <value>Issuer</value>
+        <value>Issuer:</value>
     </data>
     <data name="Text_ValidFrom" xml:space="preserve">
         <value>Valid from:</value>
@@ -366,16 +366,16 @@ Email Protection</value>
         <value>Details</value>
     </data>
     <data name="Text_Version" xml:space="preserve">
-        <value>Version</value>
+        <value>Version:</value>
     </data>
     <data name="Text_Algorithm" xml:space="preserve">
-        <value>Algorithm</value>
+        <value>Algorithm:</value>
     </data>
     <data name="Text_Subject" xml:space="preserve">
-        <value>Subject</value>
+        <value>Subject:</value>
     </data>
     <data name="Text_SerialNum" xml:space="preserve">
-        <value>Serial Number</value>
+        <value>Serial Number:</value>
     </data>
     <data name="Text_CertPolicy" xml:space="preserve">
         <value>Certificate Policy:</value>
@@ -498,4 +498,10 @@ Perform privileged system operations (networking, printing, file access, etc.)</
     <data name="Usage_Key" xml:space="preserve">
         <value>Key Agreement</value>
     </data>
+    <data name="Title_Cert" xml:space="preserve">
+        <value>Certificate Viewer</value>
+    </data>
+    <data name="Title_Sig" xml:space="preserve">
+        <value>Digital Signature Details</value>
+    </data>
 </root>

+ 30 - 24
Demo/Examples/Compdfkit_Tools/Strings/Signature.zh.resx

@@ -237,10 +237,10 @@
         <value>签名为:</value>
     </data>
     <data name="Text_Date" xml:space="preserve">
-        <value>日期</value>
+        <value>日期</value>
     </data>
     <data name="Text_Status" xml:space="preserve">
-        <value>状态</value>
+        <value>状态</value>
     </data>
     <data name="Text_SignerValid" xml:space="preserve">
         <value>签名者的身份有效。</value>
@@ -297,7 +297,7 @@
         <value>数字签名</value>
     </data>
     <data name="Text_SignTime" xml:space="preserve">
-        <value>签署时间</value>
+        <value>签署时间</value>
     </data>
     <data name="Text_Statement" xml:space="preserve">
         <value>有效性小结</value>
@@ -333,19 +333,19 @@
         <value>小结</value>
     </data>
     <data name="Text_IssuedTo" xml:space="preserve">
-        <value>颁发给</value>
+        <value>颁发给</value>
     </data>
     <data name="Text_Issuer" xml:space="preserve">
-        <value>颁发者</value>
+        <value>颁发者</value>
     </data>
     <data name="Text_ValidFrom" xml:space="preserve">
-        <value>有效起始日期</value>
+        <value>有效起始日期</value>
     </data>
     <data name="Text_ValidTo" xml:space="preserve">
-        <value>有效截止日期</value>
+        <value>有效截止日期</value>
     </data>
     <data name="Text_Usage" xml:space="preserve">
-        <value>预期用途</value>
+        <value>预期用途</value>
     </data>
     <data name="Unknown_7" xml:space="preserve">
         <value>数字签名,不可否认
@@ -359,49 +359,49 @@
         <value>详细信息</value>
     </data>
     <data name="Text_Version" xml:space="preserve">
-        <value>版本</value>
+        <value>版本</value>
     </data>
     <data name="Text_Algorithm" xml:space="preserve">
-        <value>签名算法</value>
+        <value>签名算法</value>
     </data>
     <data name="Text_Subject" xml:space="preserve">
-        <value>主题</value>
+        <value>主题</value>
     </data>
     <data name="Text_SerialNum" xml:space="preserve">
-        <value>序列号</value>
+        <value>序列号</value>
     </data>
     <data name="Text_CertPolicy" xml:space="preserve">
-        <value>证书策略</value>
+        <value>证书策略</value>
     </data>
     <data name="Text_CRL" xml:space="preserve">
-        <value>CRL分发点</value>
+        <value>CRL分发点</value>
     </data>
     <data name="Text_IssuerInfo" xml:space="preserve">
-        <value>颁发机构信息访问</value>
+        <value>颁发机构信息访问</value>
     </data>
     <data name="Text_IssuerID" xml:space="preserve">
-        <value>颁发机构密钥标识符</value>
+        <value>颁发机构密钥标识符</value>
     </data>
     <data name="Text_SubjectID" xml:space="preserve">
-        <value>主体密钥标识符</value>
+        <value>主体密钥标识符</value>
     </data>
     <data name="Text_BasicConstraints" xml:space="preserve">
-        <value>基本约束</value>
+        <value>基本约束</value>
     </data>
     <data name="Text_KeyUsage" xml:space="preserve">
-        <value>密钥用法</value>
+        <value>密钥用法</value>
     </data>
     <data name="Text_PubKey" xml:space="preserve">
-        <value>公钥</value>
+        <value>公钥</value>
     </data>
     <data name="Text_X509" xml:space="preserve">
-        <value>X.509</value>
+        <value>X.509</value>
     </data>
     <data name="Text_SHA1" xml:space="preserve">
-        <value>SHA1</value>
+        <value>SHA1</value>
     </data>
     <data name="Text_MD5" xml:space="preserve">
-        <value>MD5</value>
+        <value>MD5</value>
     </data>
     <data name="Title_Trust" xml:space="preserve">
         <value>信任</value>
@@ -464,7 +464,7 @@ JavaScript 脚本
         <value>签名无效,</value>
     </data>
     <data name="Text_Unknown" xml:space="preserve">
-        <value>签名有效性未知</value>
+        <value>签名有效性未知</value>
     </data>
     <data name="Trust_Sign" xml:space="preserve">
         <value>签名文档或数据</value>
@@ -493,4 +493,10 @@ JavaScript 脚本
     <data name="Usage_Key" xml:space="preserve">
         <value>关键协议</value>
     </data>
+    <data name="Title_Cert" xml:space="preserve">
+        <value>证书查看程序</value>
+    </data>
+    <data name="Title_Sig" xml:space="preserve">
+        <value>数字签名详细信息</value>
+    </data>
 </root>

+ 2 - 2
Demo/Examples/Compdfkit_Tools/Strings/ToolBar.Designer.cs

@@ -278,9 +278,9 @@ namespace Compdfkit_Tools.Strings.Common {
         /// <summary>
         ///   Looks up a localized string similar to Ink.
         /// </summary>
-        internal static string Tooltip_FreeHand {
+        internal static string Tooltip_Freehand {
             get {
-                return ResourceManager.GetString("Tooltip_FreeHand", resourceCulture);
+                return ResourceManager.GetString("Tooltip_Freehand", resourceCulture);
             }
         }
         

+ 1 - 1
Demo/Examples/Compdfkit_Tools/Strings/ToolBar.resx

@@ -33,7 +33,7 @@
     <data name="Tooltip_Squiggly" xml:space="preserve">
         <value>Squiggly</value>
     </data>
-    <data name="Tooltip_FreeHand" xml:space="preserve">
+    <data name="Tooltip_Freehand" xml:space="preserve">
         <value>Ink</value>
     </data>
     <data name="Tooltip_Circle" xml:space="preserve">

+ 1 - 1
Demo/Examples/Compdfkit_Tools/Strings/ToolBar.zh.resx

@@ -26,7 +26,7 @@
     <data name="Tooltip_Squiggly" xml:space="preserve">
         <value>波浪线</value>
     </data>
-    <data name="Tooltip_FreeHand" xml:space="preserve">
+    <data name="Tooltip_Freehand" xml:space="preserve">
         <value>手绘</value>
     </data>
     <data name="Tooltip_Circle" xml:space="preserve">