Browse Source

compdfkit(win) - 部分Bug修复

weixiangjie 1 year ago
parent
commit
1cb178c258
29 changed files with 192 additions and 120 deletions
  1. 4 4
      Demo/Examples/Compdfkit_Tools/Annotation/AnnotationControl/AnnotationControl.xaml.cs
  2. 1 1
      Demo/Examples/Compdfkit_Tools/Asset/Styles/RoundCornerPasswordBoxStyle.xaml
  3. 1 1
      Demo/Examples/Compdfkit_Tools/Asset/Styles/RoundCornerTextBoxStyle.xaml
  4. 1 1
      Demo/Examples/Compdfkit_Tools/Common/HomePage/FeaturesListControl.xaml.cs
  5. 1 1
      Demo/Examples/Compdfkit_Tools/Common/PasswordControl/PasswordBoxControl.xaml
  6. 3 3
      Demo/Examples/Compdfkit_Tools/DigitalSignature/DigitalSignatureControl/CPDFSignatureListControl.xaml.cs
  7. 1 1
      Demo/Examples/Compdfkit_Tools/PDFView/PDFBookmark/PDFBookmarkUI/CPDFBookmarkAddUI.xaml.cs
  8. 4 3
      Demo/Examples/Compdfkit_Tools/PDFView/PDFScaling/PDFScalingUI/CPDFScalingUI.xaml.cs
  9. 4 0
      Demo/Examples/Compdfkit_Tools/PDFView/RegularViewerControl.xaml.cs
  10. 4 1
      Demo/Examples/Compdfkit_Tools/Security/Encryption/EncryptionDialog.xaml.cs
  11. 17 5
      Demo/Examples/Compdfkit_Tools/Security/Encryption/FileGridListControl.xaml
  12. 7 7
      Demo/Examples/Compdfkit_Tools/Security/Encryption/SetEncryptionControl.xaml
  13. 25 9
      Demo/Examples/Compdfkit_Tools/Security/Watermark/AddWatermark/FileGridListWithPageRangeControl.xaml
  14. 1 0
      Demo/Examples/Compdfkit_Tools/Security/Watermark/AddWatermark/PageRangeDialog.xaml
  15. 1 1
      Demo/Examples/Compdfkit_Tools/Security/Watermark/AddWatermark/WatermarkDialog.xaml
  16. 2 1
      Demo/Examples/Compdfkit_Tools/Security/Watermark/AddWatermark/WatermarkDialog.xaml.cs
  17. 18 0
      Demo/Examples/Compdfkit_Tools/Strings/Common.Designer.cs
  18. 6 0
      Demo/Examples/Compdfkit_Tools/Strings/Common.resx
  19. 6 0
      Demo/Examples/Compdfkit_Tools/Strings/Common.zh.resx
  20. 27 28
      Demo/Examples/Compdfkit_Tools/Strings/Security.Designer.cs
  21. 15 15
      Demo/Examples/Compdfkit_Tools/Strings/Security.resx
  22. 14 17
      Demo/Examples/Compdfkit_Tools/Strings/Security.zh.resx
  23. 2 2
      Demo/Examples/PDFViewer/App.config
  24. 6 3
      Demo/Examples/PDFViewer/App.xaml.cs
  25. 7 7
      Demo/Examples/PDFViewer/MainWindow.xaml.cs
  26. 2 2
      Demo/Examples/PDFViewer/Properties/Settings.Designer.cs
  27. 4 3
      Demo/Examples/PDFViewer/Properties/Settings.settings
  28. 1 2
      Demo/Examples/PDFViewer/SettingsDialog.xaml
  29. 7 2
      Demo/Examples/PDFViewer/SettingsDialog.xaml.cs

+ 4 - 4
Demo/Examples/Compdfkit_Tools/Annotation/AnnotationControl/AnnotationControl.xaml.cs

@@ -278,7 +278,7 @@ namespace Compdfkit_Tools.PDFControl
                         {
                             e.PopupMenu.Items.Add(new MenuItem() { Header = LanguageHelper.CommonManager.GetString("Menu_Copy"), Command = ApplicationCommands.Copy, CommandTarget = (UIElement)sender });
                             MenuItem highLightMenu = new MenuItem();
-                            highLightMenu.Header = "HighLight";
+                            highLightMenu.Header = LanguageHelper.CommonManager.GetString("Menu_Highlight");
                             highLightMenu.Click += (o, p) =>
                             {
                                 TextHighlightAnnotArgs highLightArgs = new TextHighlightAnnotArgs();
@@ -298,7 +298,7 @@ namespace Compdfkit_Tools.PDFControl
                             e.PopupMenu.Items.Add(highLightMenu);
 
                             MenuItem underlineMenu = new MenuItem();
-                            underlineMenu.Header = "UnderLine";
+                            underlineMenu.Header = LanguageHelper.CommonManager.GetString("Menu_Underline");
                             underlineMenu.Click += (o, p) =>
                             {
                                 TextUnderlineAnnotArgs underlineArgs = new TextUnderlineAnnotArgs();
@@ -317,7 +317,7 @@ namespace Compdfkit_Tools.PDFControl
                             e.PopupMenu.Items.Add(underlineMenu);
 
                             MenuItem strikeOutMenu = new MenuItem();
-                            strikeOutMenu.Header = "StrikeOut";
+                            strikeOutMenu.Header = LanguageHelper.CommonManager.GetString("Menu_Strikeout");
                             strikeOutMenu.Click += (o, p) =>
                             {
                                 TextStrikeoutAnnotArgs strikeoutAnnotArgs = new TextStrikeoutAnnotArgs();
@@ -336,7 +336,7 @@ namespace Compdfkit_Tools.PDFControl
                             e.PopupMenu.Items.Add(strikeOutMenu);
 
                             MenuItem SquiggleMenu = new MenuItem();
-                            SquiggleMenu.Header = "Squiggle";
+                            SquiggleMenu.Header = LanguageHelper.CommonManager.GetString("Menu_Squiggly");
                             SquiggleMenu.Click += (o, p) =>
                             {
                                 TextSquigglyAnnotArgs squigglyAnnotArgs = new TextSquigglyAnnotArgs();

+ 1 - 1
Demo/Examples/Compdfkit_Tools/Asset/Styles/RoundCornerPasswordBoxStyle.xaml

@@ -3,7 +3,7 @@
     <Style TargetType="PasswordBox" x:Key="RoundCornerPasswordBoxStyle">
         <Setter Property="Height" Value="36"/>
         <Setter Property="FontSize" Value="14"/>
-        <Setter Property="Padding" Value="15,0,30,0"/>
+        <Setter Property="Padding" Value="10,0,30,0"/>
         <Setter Property="Background" Value="Transparent"></Setter>
         <Setter Property="Template">
             <Setter.Value>

+ 1 - 1
Demo/Examples/Compdfkit_Tools/Asset/Styles/RoundCornerTextBoxStyle.xaml

@@ -3,7 +3,7 @@
     <Style TargetType="TextBox" x:Key="RoundCornerTextBox">
         <Setter Property="Height" Value="36"/>
         <Setter Property="FontSize" Value="14"/>
-        <Setter Property="Padding" Value="15,0,15,0"/>
+        <Setter Property="Padding" Value="10,0,15,0"/>
         <Setter Property="Background" Value="Transparent"></Setter>
         <Setter Property="Template">
             <Setter.Value>

+ 1 - 1
Demo/Examples/Compdfkit_Tools/Common/HomePage/FeaturesListControl.xaml.cs

@@ -100,7 +100,7 @@ namespace Compdfkit_Tools.PDFControl
             this.DataContext = this;
             InitializeComponent();
             Items = new ObservableCollection<CustomItem>();
-            FeaturesListTxb.Text = "Features";
+            FeaturesListTxb.Text = LanguageHelper.CommonManager.GetString("Title_Features");
         }
 
         private void FeaturesListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)

+ 1 - 1
Demo/Examples/Compdfkit_Tools/Common/PasswordControl/PasswordBoxControl.xaml

@@ -36,7 +36,7 @@
         </TextBox>
 
         <TextBlock x:Name="TextBlock" IsHitTestVisible="False" Text="{Binding Watermark, RelativeSource={RelativeSource AncestorType=UserControl}}"
-                   VerticalAlignment="Center" FontSize="14" Margin="20,0,0,0" Foreground="#BBB" 
+                   VerticalAlignment="Center" FontSize="13" Margin="15,0,0,0" Foreground="#BBB" 
                    Visibility="{Binding Password, Converter={StaticResource StringToVisibilityConverter}}">
         </TextBlock>
         <CheckBox x:Name="DisplayPasswordChk" Style="{StaticResource EyeCheckBoxStyle}" Visibility="{Binding Password, Converter={StaticResource AntiStringToVisibilityConverter}}" Height="16" Grid.Column="1" HorizontalAlignment="Left" Panel.ZIndex="1" IsChecked="False"></CheckBox>

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

@@ -83,12 +83,12 @@ namespace Compdfkit_Tools.DigitalSignature.CPDFSignatureListControl
                 var widget = signatureList[index].GetSignatureWidget(pdfViewer.Document);
                 if (widget != null)
                 {
-                    pdfViewer.Document.RemoveSignature(signatureList[index], true);
                     widget.ResetForm();
                     widget.SetIsLocked(false);
-                    pdfViewer.ReloadVisibleAnnots();
-                    DeleteSignatureEvent?.Invoke(this, null);
                 }
+                pdfViewer.Document.RemoveSignature(signatureList[index], true);
+                pdfViewer.ReloadVisibleAnnots();
+                DeleteSignatureEvent?.Invoke(this, null);
             }
         }
         

+ 1 - 1
Demo/Examples/Compdfkit_Tools/PDFView/PDFBookmark/PDFBookmarkUI/CPDFBookmarkAddUI.xaml.cs

@@ -54,7 +54,7 @@ namespace Compdfkit_Tools.PDFControlUI
         {
             if(newChangeData!=null)
             {
-                PageNumText.Text = LanguageHelper.BotaManager.GetString("Text_Page") + " " + newChangeData.PageIndex + 1;
+                PageNumText.Text = LanguageHelper.BotaManager.GetString("Text_Page") + " " + (newChangeData.PageIndex + 1);
                 BookmarkText.Text = newChangeData.BookmarkTitle;
                 BookmarkText.Focus();
                 BookmarkText.SelectAll();

+ 4 - 3
Demo/Examples/Compdfkit_Tools/PDFView/PDFScaling/PDFScalingUI/CPDFScalingUI.xaml.cs

@@ -5,6 +5,7 @@ using System.Text.RegularExpressions;
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Input;
+using Compdfkit_Tools.Helper;
 
 namespace Compdfkit_Tools.PDFControlUI
 {
@@ -50,9 +51,9 @@ namespace Compdfkit_Tools.PDFControlUI
 
         private void BindZoomLevel()
         {
-            ZoomComboBox.Items.Add(new ComboBoxItem() { Content = "Actual size" });
-            ZoomComboBox.Items.Add(new ComboBoxItem() { Content = "Suitable width" });
-            ZoomComboBox.Items.Add(new ComboBoxItem() { Content = "Single page size" });
+            ZoomComboBox.Items.Add(new ComboBoxItem() { Content = LanguageHelper.CommonManager.GetString("Zoom_Real") });
+            ZoomComboBox.Items.Add(new ComboBoxItem() { Content = LanguageHelper.CommonManager.GetString("Zoom_FitWidth") });
+            ZoomComboBox.Items.Add(new ComboBoxItem() { Content = LanguageHelper.CommonManager.GetString("Zoom_FitPage")});
             foreach (double zoomLevel in zoomLevelList)
             {
                 ComboBoxItem zoomItem = new ComboBoxItem();

+ 4 - 0
Demo/Examples/Compdfkit_Tools/PDFView/RegularViewerControl.xaml.cs

@@ -381,6 +381,10 @@ namespace Compdfkit_Tools.PDFView
 
             if (e != null && e.CommandType == CommandType.Copy)
             {
+                if (!PdfViewControl.PDFView.Document.GetPermissionsInfo().AllowsCopying)
+                {
+                    // Unlock
+                }
                 e.DoCommand();
             }
         }

+ 4 - 1
Demo/Examples/Compdfkit_Tools/Security/Encryption/EncryptionDialog.xaml.cs

@@ -9,6 +9,7 @@ using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Forms;
 using Compdfkit_Tools.Common;
+using Compdfkit_Tools.Helper;
 using ComPDFKit.PDFDocument;
 using MessageBox = System.Windows.MessageBox;
 
@@ -44,6 +45,7 @@ namespace Compdfkit_Tools.PDFControl
             InitializeComponent();
             DataContext = this;
             CurrentFileNum = 0;
+            Title = LanguageHelper.SecurityManager.GetString("Title_Security");
         }
 
         private void ButtonCancel_Click(object sender, RoutedEventArgs e)
@@ -57,7 +59,8 @@ namespace Compdfkit_Tools.PDFControl
             {
                 if(SetEncryptionControl.UserPassword == SetEncryptionControl.OwnerPassword)
                 {
-                    MessageBox.Show("Open password and permission password must be different", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning);
+                    MessageBox.Show(LanguageHelper.SecurityManager.GetString("Warn_SamePassword"),
+                        LanguageHelper.CommonManager.GetString("Caption_Warning"), MessageBoxButton.OK, MessageBoxImage.Warning);
                     return;
                 }
             }

+ 17 - 5
Demo/Examples/Compdfkit_Tools/Security/Encryption/FileGridListControl.xaml

@@ -32,7 +32,7 @@
         </Grid.RowDefinitions>
 
         <DockPanel Grid.Row="0" Grid.Column="0">
-            <Button Content="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Button_AddFiles}" Height="32" Width="112" FontFamily="Microsoft YaHei" FontSize="14" Padding="28,6,27,6" HorizontalAlignment="Left" Click="AddFiles_Click"></Button>
+            <Button Content="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Button_AddFiles}" Height="32" MinWidth="112" FontFamily="Microsoft YaHei" FontSize="14" Padding="28,6,27,6" HorizontalAlignment="Left" Click="AddFiles_Click"></Button>
             <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
                 <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Text_FileCount}" FontFamily="Microsoft YaHei" FontSize="14"></TextBlock>
                 <TextBlock FontFamily="Microsoft YaHei" FontSize="14" Text="{Binding FileNumText}"></TextBlock>
@@ -50,9 +50,21 @@
                                IsReadOnly="True" AutoGenerateColumns="False" FontSize="14" SelectionMode="Extended"
                                ScrollViewer.CanContentScroll="False" HorizontalScrollBarVisibility="Auto" MouseLeftButtonDown="FileDataGrid_OnMouseLeftButtonDown" SelectionChanged="FileDataGrid_SelectionChanged">
                         <DataGrid.Columns>
-                            <DataGridTextColumn Header="File Name" Width="*" Binding="{Binding FileName}" />
-                            <DataGridTextColumn Header="File Size" Width="*" Binding="{Binding Size}" />
-                            <DataGridTextColumn Header="Path" Width="*" Binding="{Binding Location}" />
+                            <DataGridTextColumn Width="*" Binding="{Binding Name}" >
+                                <DataGridTextColumn.Header>
+                                    <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter},ConverterParameter=Table_FileName}"/>
+                                </DataGridTextColumn.Header>
+                            </DataGridTextColumn>
+                            <DataGridTextColumn Width="*" Binding="{Binding Size}">
+                                <DataGridTextColumn.Header>
+                                    <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter},ConverterParameter=Table_FileSize}"/>
+                                </DataGridTextColumn.Header>
+                            </DataGridTextColumn>
+                            <DataGridTextColumn Width="*" Binding="{Binding Path}">
+                                <DataGridTextColumn.Header>
+                                    <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter},ConverterParameter=Table_Path}"/>
+                                </DataGridTextColumn.Header>
+                            </DataGridTextColumn>
                         </DataGrid.Columns>
                         <DataGrid.Resources>
                             <Style TargetType="DataGrid">
@@ -79,7 +91,7 @@
                         </DataGrid.Resources>
                     </DataGrid>
                 </Grid>
-                <Button Grid.Row="1" x:Name="BtnRemove" FontFamily="Microsoft YaHei" FontSize="14" Content="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Button_RemoveAll}" Width="112" Height="32" HorizontalAlignment="Left" Click="Remove_Click"></Button>
+                <Button Grid.Row="1" x:Name="BtnRemove" FontFamily="Microsoft YaHei" FontSize="14" Content="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Button_RemoveAll}" MinWidth="112" Padding="5,0,5,0" Height="32" HorizontalAlignment="Left" Click="Remove_Click"></Button>
             </Grid>
         </Border>
     </Grid>

+ 7 - 7
Demo/Examples/Compdfkit_Tools/Security/Encryption/SetEncryptionControl.xaml

@@ -33,12 +33,12 @@
                     <RowDefinition Height="Auto"></RowDefinition>
                 </Grid.RowDefinitions>
                 <StackPanel Orientation="Horizontal">
-                    <CheckBox IsChecked="{Binding IsUserPasswordEnabled, Mode=OneWayToSource}" x:Name="ChbUserPassword" Width="20" Height="20" Margin="0,0,0,0"></CheckBox>
+                    <CheckBox IsChecked="{Binding IsUserPasswordEnabled, Mode=OneWayToSource}" x:Name="ChbUserPassword" Width="20" Height="20" Margin="0,5,0,0"></CheckBox>
                     <TextBlock Height="20" FontFamily="Microsoft YaHei" FontSize="14" Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Chk_OpenPassword}"></TextBlock>
                 </StackPanel>
                 <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="20,0,0,-5">
-                    <TextBlock Height="25" FontFamily="Microsoft YaHei" FontSize="14" Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Text_OpenPassword}"/>
-                    <common:PasswordBoxControl Password="{Binding UserPassword, Mode=OneWayToSource}" IsEnabled="{Binding IsUserPasswordEnabled,Mode=OneWay}" Margin="10,0,0,0" Watermark="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Holder_EnterPassword}" Height="41" Width="175"></common:PasswordBoxControl>
+                    <TextBlock Height="25" FontFamily="Microsoft YaHei" FontSize="14" Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Text_Password}"/>
+                    <common:PasswordBoxControl Password="{Binding UserPassword, Mode=OneWayToSource}" IsEnabled="{Binding IsUserPasswordEnabled,Mode=OneWay}" Margin="10,0,0,0" Watermark="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Holder_EnterPassword}" Height="41" Width="210"></common:PasswordBoxControl>
                 </StackPanel>
             </Grid>
         </Border>
@@ -60,8 +60,8 @@
                 </StackPanel>
 
                 <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="20,0,0,0">
-                    <TextBlock Height="25" FontFamily="Microsoft YaHei" FontSize="14" Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Text_OwnerPassword}"/>
-                    <common:PasswordBoxControl Password="{Binding OwnerPassword, Mode=OneWayToSource}" IsEnabled="{Binding IsOwnerPasswordEnabled}" Margin="10,0,0,0" Watermark="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Holder_OwnerPassword}" Height="41" Width="175"></common:PasswordBoxControl>
+                    <TextBlock Height="25" FontFamily="Microsoft YaHei" FontSize="14" Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Text_Password}"/>
+                    <common:PasswordBoxControl Password="{Binding OwnerPassword, Mode=OneWayToSource}" IsEnabled="{Binding IsOwnerPasswordEnabled}" Margin="10,0,0,0" Watermark="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Holder_EnterPassword}" Height="41" Width="210"></common:PasswordBoxControl>
                 </StackPanel>
                 
                 <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="20,0,0,0">
@@ -69,7 +69,7 @@
                               IsChecked="{Binding IsAllowPrint,Converter={StaticResource ReverseBoolConverter} ,Mode=OneWayToSource}"
                               IsEnabled="{Binding IsOwnerPasswordEnabled}">
                     </CheckBox>
-                    <TextBlock Height="20" FontFamily="Microsoft YaHei" FontSize="14" Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Chk_CanPrinting}"></TextBlock>
+                    <TextBlock Height="20" FontFamily="Microsoft YaHei" FontSize="14" Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Chk_NoPrint}"></TextBlock>
                 </StackPanel>
                 
                 <StackPanel Grid.Row="3" Orientation="Horizontal" Margin="20,0,0,0">
@@ -77,7 +77,7 @@
                               IsChecked="{Binding IsAllowCopy,Converter={StaticResource ReverseBoolConverter} ,Mode=OneWayToSource}"
                               IsEnabled="{Binding IsOwnerPasswordEnabled}">
                     </CheckBox>
-                    <TextBlock Height="20" FontFamily="Microsoft YaHei" FontSize="14" Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Chk_CanPrinting}"></TextBlock>
+                    <TextBlock Height="20" FontFamily="Microsoft YaHei" FontSize="14" Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Chk_NoCopy}"></TextBlock>
                 </StackPanel>
             </Grid>
         </Border>

+ 25 - 9
Demo/Examples/Compdfkit_Tools/Security/Watermark/AddWatermark/FileGridListWithPageRangeControl.xaml

@@ -25,16 +25,16 @@
             </Style>
         </ResourceDictionary>
     </UserControl.Resources>
-    <Grid Margin="10,0,0,0">
+    <Grid Margin="10,0,10,0">
         <Grid.RowDefinitions>
             <RowDefinition Height="50"></RowDefinition>
             <RowDefinition Height="*"></RowDefinition>
         </Grid.RowDefinitions>
 
         <DockPanel Grid.Row="0" Grid.Column="0">
-            <Button x:Name="AddFilesBtn" Content="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Button_AddFiles}" Height="32" Width="112" FontFamily="Microsoft YaHei" FontSize="14" Padding="28,6,27,6" HorizontalAlignment="Left" Click="AddFilesBtn_Click"></Button>
+            <Button x:Name="AddFilesBtn" Content="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Button_AddFiles}" Height="32" MinWidth="112" FontFamily="Microsoft YaHei" FontSize="14" Padding="28,6,27,6" HorizontalAlignment="Left" Click="AddFilesBtn_Click"></Button>
             <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0">
-                <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Button_AddFiles}" FontFamily="Microsoft YaHei" FontSize="14"></TextBlock>
+                <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Text_FileCount}" FontFamily="Microsoft YaHei" FontSize="14"></TextBlock>
                 <TextBlock FontFamily="Microsoft YaHei" FontSize="14" Text="{Binding FileNumText}" Margin="5,0,0,0"></TextBlock>
             </StackPanel>
         </DockPanel>
@@ -51,10 +51,26 @@
                                ScrollViewer.CanContentScroll="False" HorizontalScrollBarVisibility="Auto" SelectionChanged="FileDataGrid_SelectionChanged"
                               MouseLeftButtonDown="FileDataGrid_MouseLeftButtonDown">
                         <DataGrid.Columns>
-                            <DataGridTextColumn Header="File" Width="*" Binding="{Binding Name}" />
-                            <DataGridTextColumn Header="Size" Width="*" Binding="{Binding Size}" />
-                            <DataGridTextColumn Header="Page Range" Width="*" Binding="{Binding PageRange}" />
-                            <DataGridTextColumn Header="Location" Width="*" Binding="{Binding Path}" />
+                            <DataGridTextColumn Width="*" Binding="{Binding Name}" >
+                                <DataGridTextColumn.Header>
+                                    <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter},ConverterParameter=Table_FileName}"/>
+                                </DataGridTextColumn.Header>
+                            </DataGridTextColumn>
+                            <DataGridTextColumn Width="*" Binding="{Binding Size}">
+                                <DataGridTextColumn.Header>
+                                    <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter},ConverterParameter=Table_FileSize}"/>
+                                </DataGridTextColumn.Header>
+                            </DataGridTextColumn>
+                            <DataGridTextColumn Width="*" Binding="{Binding PageRange}">
+                                <DataGridTextColumn.Header>
+                                    <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter},ConverterParameter=Table_PageRange}"/>
+                                </DataGridTextColumn.Header>
+                            </DataGridTextColumn>
+                            <DataGridTextColumn Width="*" Binding="{Binding Path}">
+                                <DataGridTextColumn.Header>
+                                    <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter},ConverterParameter=Table_Path}"/>
+                                </DataGridTextColumn.Header>
+                            </DataGridTextColumn>
                         </DataGrid.Columns>
                         <DataGrid.Resources>
                             <Style TargetType="DataGrid">
@@ -82,8 +98,8 @@
                     </DataGrid>
                 </Grid>
                 <StackPanel Grid.Row="1" Orientation="Horizontal">
-                    <Button x:Name="RemoveBtn" FontFamily="Microsoft YaHei" FontSize="14" Content="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Button_RemoveAll}" Width="112" Height="32" HorizontalAlignment="Left" Click="RemoveBtn_Click"></Button>
-                    <Button x:Name="PageRangeBtn" FontFamily="Microsoft YaHei" FontSize="14" Content="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Text_PageRange}" Width="112" Height="32" HorizontalAlignment="Left" Margin="20,0,0,0" Visibility="Collapsed" Click="PageRangeBtn_Click"></Button>
+                    <Button x:Name="RemoveBtn" FontFamily="Microsoft YaHei" FontSize="14" Content="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Button_RemoveAll}" MinWidth="112" Height="32" HorizontalAlignment="Left" Padding="5,0,5,0" Click="RemoveBtn_Click"></Button>
+                    <Button x:Name="PageRangeBtn" FontFamily="Microsoft YaHei" FontSize="14" Content="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Text_PageRange}" MinWidth="112" Height="32" HorizontalAlignment="Left" Margin="20,0,0,0" Padding="5,0,5,0"  Visibility="Collapsed" Click="PageRangeBtn_Click"></Button>
                 </StackPanel>
             </Grid>
         </Border>

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

@@ -6,6 +6,7 @@
         xmlns:local="clr-namespace:Compdfkit_Tools.PDFControl"
          xmlns:cpdfcommon="clr-namespace:Compdfkit_Tools.Common"
         mc:Ignorable="d"
+        ShowInTaskbar="False"
         ResizeMode="NoResize"
         Title="Settings" Height="580" Width="704" Loaded="Window_Loaded">
     <Window.Resources>

+ 1 - 1
Demo/Examples/Compdfkit_Tools/Security/Watermark/AddWatermark/WatermarkDialog.xaml

@@ -155,7 +155,7 @@
                         </Grid>
                     </Grid>
                 </Border>
-                <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Title_WatermarkSettings}" Margin="50,3,0,0" Background="#fff" Height="20" Width="75" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" FontWeight="DemiBold" FontFamily="Microsoft YaHei"></TextBlock>
+                <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Title_WatermarkSettings}" Margin="50,3,0,0" Background="#fff" Height="20" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" FontWeight="DemiBold" FontFamily="Microsoft YaHei"></TextBlock>
             </Grid>
         </Grid>
         <Grid Grid.Row="1" Grid.ColumnSpan="3">

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

@@ -262,6 +262,7 @@ namespace Compdfkit_Tools.PDFControl
         {
             DataContext = this;
             InitializeComponent();
+            Title = LanguageHelper.SecurityManager.GetString("Title_AddWatermark");
         }
 
         public bool InitWithFileInfo(FileInfoWithRange fileInfo)
@@ -350,7 +351,7 @@ namespace Compdfkit_Tools.PDFControl
 
         private void ImagePathBtn_Click(object sender, RoutedEventArgs e)
         {
-            string filePath = CommonHelper.GetExistedPathOrEmpty("image (*.jpg;*.jpeg;*.png;)|*.jpg;*.jpeg;*.png;");
+            string filePath = CommonHelper.GetExistedPathOrEmpty("image (*.jpg;*.png;*.bmp;*.jpeg;*.gif;*.tiff;)|*.jpg;*.png;*.bmp;*.jpeg;*.gif;*.tiff;");
             if (!string.IsNullOrEmpty(filePath))
             {
                 ImagePath = filePath;

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

@@ -842,6 +842,15 @@ namespace Compdfkit_Tools.Strings.Common {
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to Features.
+        /// </summary>
+        internal static string Title_Features {
+            get {
+                return ResourceManager.GetString("Title_Features", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   Looks up a localized string similar to Create a New File.
         /// </summary>
@@ -1121,6 +1130,15 @@ namespace Compdfkit_Tools.Strings.Common {
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to is changed. Do you want to save the changes?.
+        /// </summary>
+        internal static string Warn_NotSave {
+            get {
+                return ResourceManager.GetString("Warn_NotSave", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   Looks up a localized string similar to Fit Page.
         /// </summary>

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

@@ -480,4 +480,10 @@
   <data name="Warn_Delete" xml:space="preserve">
     <value>Are you sure to delete?</value>
   </data>
+  <data name="Title_Features" xml:space="preserve">
+    <value>Features</value>
+  </data>
+  <data name="Warn_NotSave" xml:space="preserve">
+    <value>is changed. Do you want to save the changes?</value>
+  </data>
 </root>

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

@@ -480,4 +480,10 @@
   <data name="Warn_Delete" xml:space="preserve">
     <value>确定删除该内容?</value>
   </data>
+  <data name="Title_Features" xml:space="preserve">
+    <value>功能</value>
+  </data>
+  <data name="Warn_NotSave" xml:space="preserve">
+    <value>已修改,是否保存更改?</value>
+  </data>
 </root>

+ 27 - 28
Demo/Examples/Compdfkit_Tools/Strings/Security.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.
@@ -135,23 +134,23 @@ namespace Compdfkit_Tools.Strings {
         /// <summary>
         ///   Looks up a localized string similar to Restrict content copying.
         /// </summary>
-        internal static string Chk_CanCopy {
+        internal static string Chk_NoCopy {
             get {
-                return ResourceManager.GetString("Chk_CanCopy", resourceCulture);
+                return ResourceManager.GetString("Chk_NoCopy", resourceCulture);
             }
         }
         
         /// <summary>
         ///   Looks up a localized string similar to Restrict document printing.
         /// </summary>
-        internal static string Chk_CanPrinting {
+        internal static string Chk_NoPrint {
             get {
-                return ResourceManager.GetString("Chk_CanPrinting", resourceCulture);
+                return ResourceManager.GetString("Chk_NoPrint", resourceCulture);
             }
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Password to Open the Document.
+        ///   Looks up a localized string similar to Set the password to open the document.
         /// </summary>
         internal static string Chk_OpenPassword {
             get {
@@ -160,7 +159,7 @@ namespace Compdfkit_Tools.Strings {
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Enter Owner&apos;s Password to Change the Security.
+        ///   Looks up a localized string similar to Set the owner password for this document.
         /// </summary>
         internal static string Chk_OwnerPassword {
             get {
@@ -178,7 +177,7 @@ namespace Compdfkit_Tools.Strings {
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Enter the password.
+        ///   Looks up a localized string similar to Please enter your password.
         /// </summary>
         internal static string Holder_EnterPassword {
             get {
@@ -421,7 +420,7 @@ namespace Compdfkit_Tools.Strings {
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Files in Total: .
+        ///   Looks up a localized string similar to File(s) in Total: .
         /// </summary>
         internal static string Text_FileCount {
             get {
@@ -456,15 +455,6 @@ namespace Compdfkit_Tools.Strings {
             }
         }
         
-        /// <summary>
-        ///   Looks up a localized string similar to Set Passwords.
-        /// </summary>
-        internal static string Text_OpenPassword {
-            get {
-                return ResourceManager.GetString("Text_OpenPassword", resourceCulture);
-            }
-        }
-        
         /// <summary>
         ///   Looks up a localized string similar to Operation Types.
         /// </summary>
@@ -475,20 +465,20 @@ namespace Compdfkit_Tools.Strings {
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Owner Password.
+        ///   Looks up a localized string similar to Page Range.
         /// </summary>
-        internal static string Text_OwnerPassword {
+        internal static string Text_PageRange {
             get {
-                return ResourceManager.GetString("Text_OwnerPassword", resourceCulture);
+                return ResourceManager.GetString("Text_PageRange", resourceCulture);
             }
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Page Range.
+        ///   Looks up a localized string similar to Password.
         /// </summary>
-        internal static string Text_PageRange {
+        internal static string Text_Password {
             get {
-                return ResourceManager.GetString("Text_PageRange", resourceCulture);
+                return ResourceManager.GetString("Text_Password", resourceCulture);
             }
         }
         
@@ -565,11 +555,11 @@ namespace Compdfkit_Tools.Strings {
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Open the Document.
+        ///   Looks up a localized string similar to Add Watermarks.
         /// </summary>
-        internal static string Title_OpenDocument {
+        internal static string Title_AddWatermark {
             get {
-                return ResourceManager.GetString("Title_OpenDocument", resourceCulture);
+                return ResourceManager.GetString("Title_AddWatermark", resourceCulture);
             }
         }
         
@@ -583,7 +573,7 @@ namespace Compdfkit_Tools.Strings {
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Owner Password.
+        ///   Looks up a localized string similar to Permissions Settings.
         /// </summary>
         internal static string Title_OwnerPassword {
             get {
@@ -609,6 +599,15 @@ namespace Compdfkit_Tools.Strings {
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to Security Settings.
+        /// </summary>
+        internal static string Title_Security {
+            get {
+                return ResourceManager.GetString("Title_Security", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   Looks up a localized string similar to Watermark.
         /// </summary>

+ 15 - 15
Demo/Examples/Compdfkit_Tools/Strings/Security.resx

@@ -141,14 +141,11 @@
   <data name="Text_SecuritySettings" xml:space="preserve">
     <value>Security Settings</value>
   </data>
-  <data name="Title_OpenDocument" xml:space="preserve">
-    <value>Open the Document</value>
-  </data>
-  <data name="Text_OpenPassword" xml:space="preserve">
-    <value>Set Passwords</value>
+  <data name="Text_Password" xml:space="preserve">
+    <value>Password</value>
   </data>
   <data name="Holder_EnterPassword" xml:space="preserve">
-    <value>Enter the password</value>
+    <value>Please enter your password</value>
   </data>
   <data name="Text_Support" xml:space="preserve">
     <value>Support: Numbers, letters, @, $, !, %, ?, &amp;</value>
@@ -159,9 +156,6 @@
   <data name="Text_Permisions" xml:space="preserve">
     <value>Permissions</value>
   </data>
-  <data name="Text_OwnerPassword" xml:space="preserve">
-    <value>Owner Password</value>
-  </data>
   <data name="Holder_OwnerPassword" xml:space="preserve">
     <value>Please enter the owner`s password</value>
   </data>
@@ -174,7 +168,7 @@
   <data name="Text_EmptyPassword" xml:space="preserve">
     <value>Permission Settings</value>
   </data>
-  <data name="Chk_CanPrinting" xml:space="preserve">
+  <data name="Chk_NoPrint" xml:space="preserve">
     <value>Restrict document printing</value>
   </data>
   <data name="Text_EncryptionLevel" xml:space="preserve">
@@ -199,7 +193,7 @@
     <value>Encrypt</value>
   </data>
   <data name="Chk_OwnerPassword" xml:space="preserve">
-    <value>Enter Owner's Password to Change the Security</value>
+    <value>Set the owner password for this document</value>
   </data>
   <data name="Warn_InvaildPassword" xml:space="preserve">
     <value>Invalid Password</value>
@@ -274,7 +268,7 @@
     <value>Remove Selected Files</value>
   </data>
   <data name="Text_FileCount" xml:space="preserve">
-    <value>Files in Total: </value>
+    <value>File(s) in Total: </value>
   </data>
   <data name="Table_FileName" xml:space="preserve">
     <value>File Name</value>
@@ -285,7 +279,7 @@
   <data name="Table_Path" xml:space="preserve">
     <value>Path</value>
   </data>
-  <data name="Chk_CanCopy" xml:space="preserve">
+  <data name="Chk_NoCopy" xml:space="preserve">
     <value>Restrict content copying</value>
   </data>
   <data name="Rdo_AllPages" xml:space="preserve">
@@ -319,9 +313,15 @@
     <value>Password to Open the Document</value>
   </data>
   <data name="Chk_OpenPassword" xml:space="preserve">
-    <value>Password to Open the Document</value>
+    <value>Set the password to open the document</value>
   </data>
   <data name="Title_OwnerPassword" xml:space="preserve">
-    <value>Owner Password</value>
+    <value>Permissions Settings</value>
+  </data>
+  <data name="Title_Security" xml:space="preserve">
+    <value>Security Settings</value>
+  </data>
+  <data name="Title_AddWatermark" xml:space="preserve">
+    <value>Add Watermarks</value>
   </data>
 </root>

+ 14 - 17
Demo/Examples/Compdfkit_Tools/Strings/Security.zh.resx

@@ -141,11 +141,8 @@
   <data name="Text_SecuritySettings" xml:space="preserve">
     <value>安全设置</value>
   </data>
-  <data name="Title_OpenDocument" xml:space="preserve">
-    <value>打开文档</value>
-  </data>
-  <data name="Text_OpenPassword" xml:space="preserve">
-    <value>文档开启密码</value>
+  <data name="Text_Password" xml:space="preserve">
+    <value>密码</value>
   </data>
   <data name="Holder_EnterPassword" xml:space="preserve">
     <value>请输入密码</value>
@@ -159,9 +156,6 @@
   <data name="Text_Permisions" xml:space="preserve">
     <value>权限</value>
   </data>
-  <data name="Text_OwnerPassword" xml:space="preserve">
-    <value>文档所有者密码</value>
-  </data>
   <data name="Holder_OwnerPassword" xml:space="preserve">
     <value>请输入权限密码</value>
   </data>
@@ -174,7 +168,7 @@
   <data name="Text_EmptyPassword" xml:space="preserve">
     <value>权限设置</value>
   </data>
-  <data name="Chk_CanPrinting" xml:space="preserve">
+  <data name="Chk_NoPrint" xml:space="preserve">
     <value>禁止打印</value>
   </data>
   <data name="Text_EncryptionLevel" xml:space="preserve">
@@ -199,7 +193,7 @@
     <value>加密</value>
   </data>
   <data name="Chk_OwnerPassword" xml:space="preserve">
-    <value>输入权限密码进行安全设置</value>
+    <value>设置文档所有者密码</value>
   </data>
   <data name="Warn_InvaildPassword" xml:space="preserve">
     <value>密码错误,请重试</value>
@@ -265,7 +259,7 @@
     <value>移除水印</value>
   </data>
   <data name="Button_AddFiles" xml:space="preserve">
-    <value>添加文</value>
+    <value>添加文</value>
   </data>
   <data name="Button_RemoveAll" xml:space="preserve">
     <value>移除文件</value>
@@ -288,9 +282,6 @@
   <data name="Table_FileSize" xml:space="preserve">
     <value>文件大小</value>
   </data>
-  <data name="Table_FileSize1" xml:space="preserve">
-    <value>文件大小</value>
-  </data>
   <data name="Rdo_AllPages" xml:space="preserve">
     <value>全部页面</value>
   </data>
@@ -309,7 +300,7 @@
   <data name="Title_WatermarkSettings" xml:space="preserve">
     <value>水印设置</value>
   </data>
-  <data name="Chk_CanCopy" xml:space="preserve">
+  <data name="Chk_NoCopy" xml:space="preserve">
     <value>禁止复制</value>
   </data>
   <data name="Tip_EasyUse" xml:space="preserve">
@@ -322,9 +313,15 @@
     <value>文档开启密码</value>
   </data>
   <data name="Chk_OpenPassword" xml:space="preserve">
-    <value>文档开启密码</value>
+    <value>设置文档开启密码</value>
   </data>
   <data name="Title_OwnerPassword" xml:space="preserve">
-    <value>文档所有者密码</value>
+    <value>权限设置</value>
+  </data>
+  <data name="Title_Security" xml:space="preserve">
+    <value>安全设置</value>
+  </data>
+  <data name="Title_AddWatermark" xml:space="preserve">
+    <value>添加水印</value>
   </data>
 </root>

+ 2 - 2
Demo/Examples/PDFViewer/App.config

@@ -21,10 +21,10 @@
     <userSettings>
         <PDFViewer.Properties.Settings>
             <setting name="IsHighlightLinkArea" serializeAs="String">
-                <value>False</value>
+                <value>True</value>
             </setting>
             <setting name="IsHighlightFormArea" serializeAs="String">
-                <value>False</value>
+                <value>True</value>
             </setting>
             <setting name="DocumentAuthor" serializeAs="String">
                 <value>ComPDFKit</value>

+ 6 - 3
Demo/Examples/PDFViewer/App.xaml.cs

@@ -24,14 +24,17 @@ namespace PDFViewer
     public partial class App: Application
     {
         public static bool DefaultPDFLoaded = false;
-        public Dictionary<string, string> Languages;
+        public static string CurrentLanguage = Settings.Default.Language;
+        public static Dictionary<string, string> Languages= new Dictionary<string, string>()
+        {
+            {"English","en-US"}, {"简体中文","zh-CN"}
+        };
         public static FilePathList OpenedFilePathList = new FilePathList();
         public static ResourceManager MainResourceManager = new ResourceManager("PDFViewer.Strings.SettingDialog", Assembly.GetExecutingAssembly());
 
         protected override void OnStartup(StartupEventArgs e)
         {
-            Languages = new Dictionary<string, string>() { {"English","en-US"}, {"简体中文","zh-CN"}};
-            string culture = Languages.TryGetValue(Settings.Default.Language, out culture) ? culture : "en-US";
+            string culture = Languages.TryGetValue(CurrentLanguage, out culture) ? culture : "en-US";
             Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture);
             Thread.CurrentThread.CurrentCulture = new CultureInfo(culture);
             base.OnStartup(e);

+ 7 - 7
Demo/Examples/PDFViewer/MainWindow.xaml.cs

@@ -147,7 +147,7 @@ namespace PDFViewer
                 CPDFDocument document = CPDFDocument.CreateDocument();
                 document.SetInfo(new CPDFInfo
                 { Author = Properties.Settings.Default.DocumentAuthor, Creator = "ComPDFKit", CreationDate = DateTime.Now.ToString(),Subject="Document", Producer="ComPDFKit" , Keywords="Document", Version="1.11.0"});
-                document.InsertPage(0, blankPageSetting.Size.Width, blankPageSetting.Size.Height, "");
+                document.InsertPage(0, blankPageSetting.Size.Width * 7.2 / 2.54, blankPageSetting.Size.Height * 7.2 / 2.54, "");
                 if(blankPageSetting.Orientation == Orientation.Horizontal)
                 {
                     document.RotatePage(0, 1);
@@ -431,8 +431,8 @@ namespace PDFViewer
             if (mainPage.CanSave)
             {
                 string fileName = (dragablzItem.Content as TabItemExt).FileName;
-                var message = string.Format("Do you want to save the changes in {0}?", fileName);
-                var result = MessageBox.Show(message, "Alert", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
+                var message = fileName + " " + LanguageHelper.CommonManager.GetString("Warn_NotSave");
+                var result = MessageBox.Show(message, LanguageHelper.CommonManager.GetString("Caption_Warning"), MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
 
                 if (result == MessageBoxResult.Yes)
                 {
@@ -505,8 +505,8 @@ namespace PDFViewer
                 if (mainPage.CanSave)
                 {
                     string fileName = item.FileName;
-                    var message = string.Format("Do you want to save the changes in {0}?", fileName);
-                    var result = MessageBox.Show(message, "Alert", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
+                    var message = fileName + " " + LanguageHelper.CommonManager.GetString("Warn_NotSave");
+                    var result = MessageBox.Show(message, LanguageHelper.CommonManager.GetString("Caption_Warning"), MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
 
                     if (result == MessageBoxResult.Yes)
                     {
@@ -559,8 +559,8 @@ namespace PDFViewer
                     if (mainPage.CanSave)
                     {
                         string fileName = item.FileName;
-                        var message = string.Format("Do you want to save the changes in {0}?", fileName);
-                        var result = MessageBox.Show(message, "Alert", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
+                        var message = fileName + " " + LanguageHelper.CommonManager.GetString("Warn_NotSave");
+                        var result = MessageBox.Show(message, LanguageHelper.CommonManager.GetString("Caption_Warning"), MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
 
                         if (result == MessageBoxResult.Yes)
                         {

+ 2 - 2
Demo/Examples/PDFViewer/Properties/Settings.Designer.cs

@@ -24,7 +24,7 @@ namespace PDFViewer.Properties {
         
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("False")]
+        [global::System.Configuration.DefaultSettingValueAttribute("True")]
         public bool IsHighlightLinkArea {
             get {
                 return ((bool)(this["IsHighlightLinkArea"]));
@@ -36,7 +36,7 @@ namespace PDFViewer.Properties {
         
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("False")]
+        [global::System.Configuration.DefaultSettingValueAttribute("True")]
         public bool IsHighlightFormArea {
             get {
                 return ((bool)(this["IsHighlightFormArea"]));

+ 4 - 3
Demo/Examples/PDFViewer/Properties/Settings.settings

@@ -3,10 +3,10 @@
   <Profiles />
   <Settings>
     <Setting Name="IsHighlightLinkArea" Type="System.Boolean" Scope="User">
-      <Value Profile="(Default)">False</Value>
+      <Value Profile="(Default)">True</Value>
     </Setting>
     <Setting Name="IsHighlightFormArea" Type="System.Boolean" Scope="User">
-      <Value Profile="(Default)">False</Value>
+      <Value Profile="(Default)">True</Value>
     </Setting>
     <Setting Name="DocumentAuthor" Type="System.String" Scope="User">
       <Value Profile="(Default)">ComPDFKit</Value>
@@ -24,4 +24,5 @@
       <Value Profile="(Default)">False</Value>
     </Setting>
   </Settings>
-</SettingsFile>
+</SettingsFile>
+

+ 1 - 2
Demo/Examples/PDFViewer/SettingsDialog.xaml

@@ -5,7 +5,7 @@
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:local="clr-namespace:PDFViewer"
         mc:Ignorable="d"
-        Title="Settings" Height="613" Width="418"
+        Title="Settings" Height="580" Width="440"
         ShowInTaskbar="False"
         WindowStartupLocation="CenterScreen"
         ResizeMode="NoResize"
@@ -118,7 +118,6 @@
             <Grid Height="32">
                 <TextBlock Text="{Binding  ConverterParameter=Setting_Language, Converter={StaticResource ResourceConverter}}" FontSize="14" FontWeight="DemiBold" FontFamily="Microsoft YaHei" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
                 <ComboBox x:Name="LanguageCmb" SelectionChanged="LanguageCmb_SelectionChanged" Style="{StaticResource ComboBoxStyle1}" HorizontalAlignment="Right" Width="130">
-                    <ComboBoxItem></ComboBoxItem>
                     <ComboBoxItem>English</ComboBoxItem>
                     <ComboBoxItem>简体中文</ComboBoxItem>
                 </ComboBox>

+ 7 - 2
Demo/Examples/PDFViewer/SettingsDialog.xaml.cs

@@ -38,8 +38,13 @@ namespace PDFViewer
             HighlightFormTog.IsChecked = Properties.Settings.Default.IsHighlightFormArea;
             HighlightLinkTog.IsChecked = Properties.Settings.Default.IsHighlightLinkArea;
             AuthorTxb.Text = Properties.Settings.Default.DocumentAuthor;
-            ((ComboBoxItem)LanguageCmb.Items[0]).Content = Properties.Settings.Default.Language;
-            LanguageCmb.SelectedIndex = 0;
+            foreach (ComboBoxItem  item in LanguageCmb.Items)
+            {
+                if (item.Content.ToString() == App.CurrentLanguage)
+                {
+                    item.IsSelected = true;
+                }
+            }
         }
 
         private void AuthorTxb_TextChanged(object sender, TextChangedEventArgs e)