Quellcode durchsuchen

compdfkit(win) - 移动水印

liuaoran vor 1 Jahr
Ursprung
Commit
82739a6069
19 geänderte Dateien mit 35 neuen und 25 gelöschten Zeilen
  1. 11 2
      Demo/Examples/Compdfkit_Tools/Common/BaseControl/NumericUpDownControl.xaml.cs
  2. 2 1
      Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFLocation/CPDFRotationControl.xaml.cs
  3. 16 16
      Demo/Examples/Compdfkit_Tools/Compdfkit_Tools.csproj
  4. 0 0
      Demo/Examples/Compdfkit_Tools/Watermark/AddWatermark/FileGridListWithPageRangeControl.xaml
  5. 0 0
      Demo/Examples/Compdfkit_Tools/Watermark/AddWatermark/FileGridListWithPageRangeControl.xaml.cs
  6. 1 1
      Demo/Examples/Compdfkit_Tools/Security/Watermark/AddWatermark/PageRangeDialog.xaml
  7. 0 0
      Demo/Examples/Compdfkit_Tools/Watermark/AddWatermark/PageRangeDialog.xaml.cs
  8. 3 3
      Demo/Examples/Compdfkit_Tools/Security/Watermark/AddWatermark/WatermarkDialog.xaml
  9. 0 0
      Demo/Examples/Compdfkit_Tools/Watermark/AddWatermark/WatermarkDialog.xaml.cs
  10. 0 0
      Demo/Examples/Compdfkit_Tools/Watermark/AddWatermark/WatermarkListDialog.xaml
  11. 0 0
      Demo/Examples/Compdfkit_Tools/Watermark/AddWatermark/WatermarkListDialog.xaml.cs
  12. 0 0
      Demo/Examples/Compdfkit_Tools/Watermark/AddWatermark/WatermarkPreviewControl.cs
  13. 0 0
      Demo/Examples/Compdfkit_Tools/Watermark/RemoveWatermark/RemoveWatermarkListControl.xaml
  14. 0 0
      Demo/Examples/Compdfkit_Tools/Watermark/RemoveWatermark/RemoveWatermarkListControl.xaml.cs
  15. 0 0
      Demo/Examples/Compdfkit_Tools/Watermark/RemoveWatermark/RemoveWatermarkListDialog.xaml
  16. 0 0
      Demo/Examples/Compdfkit_Tools/Watermark/RemoveWatermark/RemoveWatermarkListDialog.xaml.cs
  17. 0 0
      Demo/Examples/Compdfkit_Tools/Watermark/WatermarkData.cs
  18. 2 2
      Demo/Examples/Compdfkit_Tools/Security/Watermark/WatermarkOperationTypeDialog.xaml
  19. 0 0
      Demo/Examples/Compdfkit_Tools/Watermark/WatermarkOperationTypeDialog.xaml.cs

+ 11 - 2
Demo/Examples/Compdfkit_Tools/Common/BaseControl/NumericUpDownControl.xaml.cs

@@ -8,7 +8,8 @@ namespace Compdfkit_Tools.Common
 {
     public partial class NumericUpDownControl : UserControl
     {
-        private string regixString = "[^0-9]+";
+        private string regixString = "[^0-9-]";
+        private string nRegixString = @"[^0-9-]+";
 
         // The dependency property which will be accessible on the UserControl
         public static readonly DependencyProperty UnitProperty =
@@ -51,7 +52,15 @@ namespace Compdfkit_Tools.Common
         }
         private void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e)
         {
-            e.Handled = new Regex(regixString).IsMatch(e.Text);
+            if (Minimum > 0)
+            {
+                e.Handled = new Regex(regixString).IsMatch(e.Text);
+            }
+            else
+            {
+                e.Handled = new Regex(nRegixString).IsMatch(e.Text);
+
+            }
         }
 
         private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e)

+ 2 - 1
Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFLocation/CPDFRotationControl.xaml.cs

@@ -22,6 +22,7 @@ namespace Compdfkit_Tools.Common
     /// </summary>
     public partial class CPDFRotationControl : UserControl, INotifyPropertyChanged
     {
+
         private string _rotationText = "0";
         public string RotationText
         {
@@ -29,7 +30,7 @@ namespace Compdfkit_Tools.Common
             set
             {
                 if (string.IsNullOrEmpty(value))
-                {
+                { 
                     return;
                 }
 

+ 16 - 16
Demo/Examples/Compdfkit_Tools/Compdfkit_Tools.csproj

@@ -483,32 +483,32 @@
     <Compile Include="PDFView\PDFScaling\PDFScalingUI\CPDFScalingUI.xaml.cs">
       <DependentUpon>CPDFScalingUI.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Security\Watermark\AddWatermark\FileGridListWithPageRangeControl.xaml.cs">
+    <Compile Include="Watermark\AddWatermark\FileGridListWithPageRangeControl.xaml.cs">
       <DependentUpon>FileGridListWithPageRangeControl.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Security\Watermark\AddWatermark\PageRangeDialog.xaml.cs">
+    <Compile Include="Watermark\AddWatermark\PageRangeDialog.xaml.cs">
       <DependentUpon>PageRangeDialog.xaml</DependentUpon>
     </Compile>
     <Compile Include="Common\PreviewControl\PreviewControl.xaml.cs">
       <DependentUpon>PreviewControl.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Security\Watermark\RemoveWatermark\RemoveWatermarkListControl.xaml.cs">
+    <Compile Include="Watermark\RemoveWatermark\RemoveWatermarkListControl.xaml.cs">
       <DependentUpon>RemoveWatermarkListControl.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Security\Watermark\RemoveWatermark\RemoveWatermarkListDialog.xaml.cs">
+    <Compile Include="Watermark\RemoveWatermark\RemoveWatermarkListDialog.xaml.cs">
       <DependentUpon>RemoveWatermarkListDialog.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Security\Watermark\WatermarkData.cs" />
-    <Compile Include="Security\Watermark\AddWatermark\WatermarkDialog.xaml.cs">
+    <Compile Include="Watermark\WatermarkData.cs" />
+    <Compile Include="Watermark\AddWatermark\WatermarkDialog.xaml.cs">
       <DependentUpon>WatermarkDialog.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Security\Watermark\AddWatermark\WatermarkListDialog.xaml.cs">
+    <Compile Include="Watermark\AddWatermark\WatermarkListDialog.xaml.cs">
       <DependentUpon>WatermarkListDialog.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Security\Watermark\WatermarkOperationTypeDialog.xaml.cs">
+    <Compile Include="Watermark\WatermarkOperationTypeDialog.xaml.cs">
       <DependentUpon>WatermarkOperationTypeDialog.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Security\Watermark\AddWatermark\WatermarkPreviewControl.cs" />
+    <Compile Include="Watermark\AddWatermark\WatermarkPreviewControl.cs" />
     <Compile Include="Strings\Bota.Designer.cs">
       <DesignTime>True</DesignTime>
       <AutoGen>True</AutoGen>
@@ -1160,11 +1160,11 @@
       <Generator>MSBuild:Compile</Generator>
     </Page>
     <Page Include="PDFView\RegularViewerControl.xaml" />
-    <Page Include="Security\Watermark\AddWatermark\FileGridListWithPageRangeControl.xaml">
+    <Page Include="Watermark\AddWatermark\FileGridListWithPageRangeControl.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Security\Watermark\AddWatermark\PageRangeDialog.xaml">
+    <Page Include="Watermark\AddWatermark\PageRangeDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
@@ -1172,23 +1172,23 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Security\Watermark\AddWatermark\WatermarkDialog.xaml">
+    <Page Include="Watermark\AddWatermark\WatermarkDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Security\Watermark\AddWatermark\WatermarkListDialog.xaml">
+    <Page Include="Watermark\AddWatermark\WatermarkListDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Security\Watermark\RemoveWatermark\RemoveWatermarkListControl.xaml">
+    <Page Include="Watermark\RemoveWatermark\RemoveWatermarkListControl.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Security\Watermark\RemoveWatermark\RemoveWatermarkListDialog.xaml">
+    <Page Include="Watermark\RemoveWatermark\RemoveWatermarkListDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Security\Watermark\WatermarkOperationTypeDialog.xaml">
+    <Page Include="Watermark\WatermarkOperationTypeDialog.xaml">
       <SubType>Designer</SubType>
     </Page>
   </ItemGroup>

Demo/Examples/Compdfkit_Tools/Security/Watermark/AddWatermark/FileGridListWithPageRangeControl.xaml → Demo/Examples/Compdfkit_Tools/Watermark/AddWatermark/FileGridListWithPageRangeControl.xaml


Demo/Examples/Compdfkit_Tools/Security/Watermark/AddWatermark/FileGridListWithPageRangeControl.xaml.cs → Demo/Examples/Compdfkit_Tools/Watermark/AddWatermark/FileGridListWithPageRangeControl.xaml.cs


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

@@ -14,7 +14,7 @@
             <cpdfcommon:SecurityResourceConverter x:Key="SecurityResourceConverter"/> 
             <cpdfcommon:TextLengthToVisibilityConverter x:Key="TextLengthToVisibilityConverter"></cpdfcommon:TextLengthToVisibilityConverter>
             <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="../../../Asset/Styles/RadioButtonStyle.xaml"></ResourceDictionary>
+                <ResourceDictionary Source="../../Asset/Styles/RadioButtonStyle.xaml"></ResourceDictionary>
             </ResourceDictionary.MergedDictionaries>
         </ResourceDictionary>
     </Window.Resources>

Demo/Examples/Compdfkit_Tools/Security/Watermark/AddWatermark/PageRangeDialog.xaml.cs → Demo/Examples/Compdfkit_Tools/Watermark/AddWatermark/PageRangeDialog.xaml.cs


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

@@ -15,9 +15,9 @@
             <common:SecurityResourceConverter x:Key="SecurityResourceConverter"/>
             <common:StringToVisibilityConverter x:Key="StringToVisibilityConverter"></common:StringToVisibilityConverter>
             <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="../../../Asset/Styles/RadioButtonStyle.xaml"></ResourceDictionary>
-                <ResourceDictionary Source="../../../Asset/Styles/ComboBoxStyle.xaml"></ResourceDictionary>
-                <ResourceDictionary Source="../../../Asset/Styles/ButtonStyle.xaml"></ResourceDictionary>
+                <ResourceDictionary Source="../../Asset/Styles/RadioButtonStyle.xaml"></ResourceDictionary>
+                <ResourceDictionary Source="../../Asset/Styles/ComboBoxStyle.xaml"></ResourceDictionary>
+                <ResourceDictionary Source="../../Asset/Styles/ButtonStyle.xaml"></ResourceDictionary>
             </ResourceDictionary.MergedDictionaries>
         </ResourceDictionary>
     </Window.Resources>

Demo/Examples/Compdfkit_Tools/Security/Watermark/AddWatermark/WatermarkDialog.xaml.cs → Demo/Examples/Compdfkit_Tools/Watermark/AddWatermark/WatermarkDialog.xaml.cs


Demo/Examples/Compdfkit_Tools/Security/Watermark/AddWatermark/WatermarkListDialog.xaml → Demo/Examples/Compdfkit_Tools/Watermark/AddWatermark/WatermarkListDialog.xaml


Demo/Examples/Compdfkit_Tools/Security/Watermark/AddWatermark/WatermarkListDialog.xaml.cs → Demo/Examples/Compdfkit_Tools/Watermark/AddWatermark/WatermarkListDialog.xaml.cs


Demo/Examples/Compdfkit_Tools/Security/Watermark/AddWatermark/WatermarkPreviewControl.cs → Demo/Examples/Compdfkit_Tools/Watermark/AddWatermark/WatermarkPreviewControl.cs


Demo/Examples/Compdfkit_Tools/Security/Watermark/RemoveWatermark/RemoveWatermarkListControl.xaml → Demo/Examples/Compdfkit_Tools/Watermark/RemoveWatermark/RemoveWatermarkListControl.xaml


Demo/Examples/Compdfkit_Tools/Security/Watermark/RemoveWatermark/RemoveWatermarkListControl.xaml.cs → Demo/Examples/Compdfkit_Tools/Watermark/RemoveWatermark/RemoveWatermarkListControl.xaml.cs


Demo/Examples/Compdfkit_Tools/Security/Watermark/RemoveWatermark/RemoveWatermarkListDialog.xaml → Demo/Examples/Compdfkit_Tools/Watermark/RemoveWatermark/RemoveWatermarkListDialog.xaml


Demo/Examples/Compdfkit_Tools/Security/Watermark/RemoveWatermark/RemoveWatermarkListDialog.xaml.cs → Demo/Examples/Compdfkit_Tools/Watermark/RemoveWatermark/RemoveWatermarkListDialog.xaml.cs


Demo/Examples/Compdfkit_Tools/Security/Watermark/WatermarkData.cs → Demo/Examples/Compdfkit_Tools/Watermark/WatermarkData.cs


+ 2 - 2
Demo/Examples/Compdfkit_Tools/Security/Watermark/WatermarkOperationTypeDialog.xaml

@@ -13,8 +13,8 @@
     <Window.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="../../Asset/Styles/ButtonStyle.xaml"></ResourceDictionary>
-                <ResourceDictionary Source="../../Asset/Styles/RadioButtonStyle.xaml"></ResourceDictionary>
+                <ResourceDictionary Source="../Asset/Styles/ButtonStyle.xaml"></ResourceDictionary>
+                <ResourceDictionary Source="../Asset/Styles/RadioButtonStyle.xaml"></ResourceDictionary>
             </ResourceDictionary.MergedDictionaries>
             <common:SecurityResourceConverter x:Key="SecurityResourceConverter"/>
         </ResourceDictionary>

Demo/Examples/Compdfkit_Tools/Security/Watermark/WatermarkOperationTypeDialog.xaml.cs → Demo/Examples/Compdfkit_Tools/Watermark/WatermarkOperationTypeDialog.xaml.cs