Explorar o código

图章、签名 ecs退出问题

OYXH\oyxh hai 1 ano
pai
achega
aac5125c6c

+ 5 - 2
PDF Office/Views/PropertyPanel/AnnotPanel/SignatureAnnotProperty.xaml.cs

@@ -33,8 +33,11 @@ namespace PDF_Master.Views.PropertyPanel.AnnotPanel
 
         private void ShortCut_KeyDown(object sender, KeyEventArgs e)
         {
-            (DataContext as SignatureAnnotPropertyViewModel).Close();
-            e.Handled = true;
+            if (e.Key == Key.Escape)
+            {
+                (DataContext as SignatureAnnotPropertyViewModel).Close();
+                e.Handled = true;
+            }
         }
 
         private void ListBoxItem_PreviewMouseDown(object sender, MouseButtonEventArgs e)

+ 6 - 3
PDF Office/Views/PropertyPanel/AnnotPanel/StampAnnotProperty.xaml.cs

@@ -33,8 +33,11 @@ namespace PDF_Master.Views.PropertyPanel.AnnotPanel
 
         private void ShortCut_KeyDown(object sender, KeyEventArgs e)
         {
-            (DataContext as StampAnnotPropertyViewModel).Close();
-            e.Handled = true;
+            if (e.Key == Key.Escape)
+            {
+                (DataContext as StampAnnotPropertyViewModel).Close();
+                e.Handled = true;
+            }
         }
 
         private void ListBoxItem_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
@@ -106,4 +109,4 @@ namespace PDF_Master.Views.PropertyPanel.AnnotPanel
             AnnoteTypeTitle.Text = App.MainPageLoader.GetString("Stamp_Title");
         }
     }
-}
+}