Browse Source

图片转PDF-取消

liyijie 2 years ago
parent
commit
82bab29d7d

+ 2 - 2
PDF Office/ViewModels/FillAndSign/FillAndSignContentViewModel.cs

@@ -75,7 +75,7 @@ namespace PDF_Office.ViewModels.FillAndSign
         public static bool IsSignPoint = false;
         public Brush SelectColor = new SolidColorBrush(Colors.GreenYellow);
         public double FillOpacity = 1;
-        public double LineWidth = 1;
+        public double LineWidth = 2;
         public double LineWidthMultiple = 1;
 
         private bool _HookShapeIsCheck = true;
@@ -166,7 +166,7 @@ namespace PDF_Office.ViewModels.FillAndSign
             var FreehandDefault = GetAnnotDefault(AnnotArgsType.AnnotFreehand, "FillAndSign");
             SelectColor = new SolidColorBrush(FreehandDefault.BorderColor != Color.FromArgb(0, 0, 0, 0) ? FreehandDefault.BorderColor : Colors.GreenYellow);
             FillOpacity = FreehandDefault.Opacity > 0 ? FreehandDefault.Opacity : 1;
-            LineWidth = FreehandDefault.Thickness > 0 ? FreehandDefault.Thickness : 1;
+            LineWidth = FreehandDefault.Thickness > 0 ? FreehandDefault.Thickness : 2;
         }
         private System.Windows.Controls.Primitives.Popup popup = null;
         private async void AnnotColorPalette_Menu(object obj)

+ 1 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePictureToPDFDialog.xaml

@@ -290,6 +290,7 @@
                             <Grid Grid.Column="3" x:Name="col3" />
                         </Grid>
                         <ListView
+                            PreviewKeyDown="listView_PreviewKeyDown" 
                     Width="{Binding ElementName=col4, Path=ActualWidth}"
                     HorizontalAlignment="Center"
                     x:Name="listView" 

+ 17 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePictureToPDFDialog.xaml.cs

@@ -216,5 +216,22 @@ namespace PDF_Office.Views.Dialog.HomePageToolsDialogs
                 System.Windows.SystemCommands.MaximizeWindow(Window.GetWindow(this));
             }
         }
+
+        private void listView_PreviewKeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyStates == Keyboard.GetKeyStates(Key.Escape))
+            {
+                var a = sender as ListView;
+                if (a.SelectedIndex != -1)
+                {
+                    viewModel.fileNamesView.Clear();
+                    e.Handled = true;
+                }
+                a.SelectedIndex = -1;
+
+
+            }
+
+        }
     }
 }