Bladeren bron

其他-晚上底部页面缩放,调整最大缩放值为100倍

ZhouJieSheng 1 jaar geleden
bovenliggende
commit
e4ccf38acf

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

@@ -486,12 +486,7 @@ namespace PDF_Master.ViewModels
                 return;
             }
 
-
-            ////枚举 过滤所有不合理的输入
-            //if (args.Key != Key.Enter && args.Key != Key.Oem5 && args.Key != Key.Back && args.Key != Key.OemComma && args.Key != Key.OemMinus && args.Key != Key.Subtract && !((args.Key >= Key.D0 && args.Key <= Key.D9) || (args.Key >= Key.NumPad0 && args.Key <= Key.NumPad9)))
-            //{
-            //    args.Handled = true;
-            //}
+            //输入值的预处理通过input事件里写正则来判断
 
             if (args.Key == Key.Enter)
             {

+ 10 - 5
PDF Office/ViewModels/ViewContentViewModel.cs

@@ -723,7 +723,7 @@ namespace PDF_Master.ViewModels
         /// <summary>
         /// 鼠标滚轮缩放的缩放值
         /// </summary>
-        private double[] zoomLevel = { 1.00f, 10, 25, 50, 75, 100, 125, 150, 200, 300, 400, 600, 800, 1000 };
+        private double[] zoomLevel = { 1.00f, 10, 25, 50, 75, 100, 125, 150, 200, 300, 400, 600, 800, 1000,2000,4000,10000};
 
         /// <summary>
         /// 注释-链接,提示语
@@ -2370,13 +2370,18 @@ namespace PDF_Master.ViewModels
         public double CheckZoomLevel(double zoom, bool IsGrowth)
         {
             double standardZoom = 100;
-            if (zoom <= 0.01)
+            //最小缩放倍数 0.01倍
+            double minrate = 0.01;
+            //最大缩放倍数 100倍
+            double maxrate = 100;
+            if (zoom <= minrate)
             {
-                return 0.01;
+                return minrate;
             }
-            if (zoom >= 10)
+            //最大缩放倍数 100倍
+            if (zoom >= maxrate)
             {
-                return 10;
+                return maxrate;
             }
 
             zoom *= 100;

+ 1 - 1
PDF Office/Views/BottomToolContent.xaml

@@ -423,7 +423,7 @@
                             Width="46"
                             Height="14"
                             Margin="4,0,0,0"
-                            Padding="2,0,0,0"
+                            Padding="1,0,0,0"
                             HorizontalAlignment="Left"
                             Background="White"
                             BorderThickness="0"