Ver código fonte

综合-补充 页面编辑支持esc取消选中;书签 快捷键delete 功能;优化 listbox UI;转档 OCR包含图片

OYXH\oyxh 1 ano atrás
pai
commit
26e72abe9a

+ 2 - 2
PDF Office/Model/Dialog/ConverterDialogs/ConverterDialogsModel.cs

@@ -24,9 +24,9 @@ namespace PDF_Master.Model.Dialog.ConverterDialogs
 
         /// <summary>
         /// 开启ocr时是否选择包含ocr底图
-        /// 如果包含 ,PDF转HTML的时候,ocr,会重叠
+        /// 如果包含 ,PDF转HTML的时候,ocr,会重叠=>特殊文档
         /// </summary>
-        public bool IsContainOCRBgImage = false;
+        public bool IsContainOCRBgImage = true;
         public bool IsContainAnnotations = true;
         public bool IsContainImages = true;
         public ContentOptions ContentOpts = ContentOptions.AllContent;

+ 1 - 0
PDF Office/Styles/ListViewStyle.xaml

@@ -404,6 +404,7 @@
     </Style>
 
     <Style x:Key="ListBoxItemGraySelectStyle" TargetType="{x:Type ListBoxItem}">
+        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
         <Setter Property="UIElement.SnapsToDevicePixels" Value="True" />
         <Setter Property="Panel.Background" Value="{StaticResource color.sys.layout.mg}" />
         <Setter Property="Border.BorderBrush" Value="{StaticResource color.sys.layout.mg}" />

+ 9 - 1
PDF Office/ViewModels/PageEdit/PageEditContentViewModel.cs

@@ -1865,7 +1865,15 @@ namespace PDF_Master.ViewModels.PageEdit
         /// </summary>
         private void clearSelected()
         {
-            //ListSelectedIndex = -1;
+            //缩略图不支持esc取消选中;
+            if (IsBOTAThumb == Visibility.Visible)
+            {
+                return;
+            }
+            else
+            {
+                ListSelectedIndex = -1;
+            }
         }
 
         /// <summary>

+ 1 - 0
PDF Office/Views/BOTA/AnnotationContent.xaml

@@ -59,6 +59,7 @@
                 HorizontalContentAlignment="Stretch"
                 Background="{StaticResource color.sys.layout.mg}"
                 BorderThickness="0"
+                FocusVisualStyle="{x:Null}"
                 ItemTemplate="{StaticResource AnnotationListItemTemplate}"
                 ItemsSource="{Binding AnnotationListItems}"
                 MouseDown="ListBox_MouseDown"

+ 6 - 1
PDF Office/Views/BOTA/BookmarkContent.xaml

@@ -17,6 +17,7 @@
     d:DesignHeight="450"
     d:DesignWidth="300"
     prism:ViewModelLocator.AutoWireViewModel="True"
+    KeyDown="UserControl_KeyDown"
     mc:Ignorable="d">
     <UserControl.Resources>
         <ResourceDictionary>
@@ -138,6 +139,7 @@
                 HorizontalContentAlignment="Stretch"
                 Background="{StaticResource color.sys.layout.mg}"
                 BorderThickness="0"
+                FocusVisualStyle="{x:Null}"
                 ItemTemplate="{StaticResource myDataTemplate}"
                 ItemsSource="{Binding Bookmarklist}"
                 PreviewMouseDown="BookMarkListView_PreviewMouseDown"
@@ -145,7 +147,10 @@
                 SelectionChanged="BookMarkListView_SelectionChanged"
                 SelectionMode="Extended">
                 <ListBox.ContextMenu>
-                    <ContextMenu x:Name="ContextMenuBook" FontSize="14" Visibility="Collapsed">
+                    <ContextMenu
+                        x:Name="ContextMenuBook"
+                        FontSize="14"
+                        Visibility="Collapsed">
                         <MenuItem Click="MenuItemRename_Click" Header="{x:Static mainPageLoader:MainPage.Bookmark_Rename}" />
                         <MenuItem Click="MenuChangeItem_Click" Header="{x:Static mainPageLoader:MainPage.Bookmark_Change}" />
                         <MenuItem Click="MenuItemDeleteCommand_Click" Header="{x:Static mainPageLoader:MainPage.Bookmark_Delete}" />

+ 16 - 0
PDF Office/Views/BOTA/BookmarkContent.xaml.cs

@@ -470,5 +470,21 @@ namespace PDF_Master.Views.BOTA
                 }
             }
         }
+
+        private void UserControl_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.Key == Key.Delete)
+            {
+                if (BookMarkListView.SelectedItems.Count != 0)
+                {
+                    MenuItemDeleteCommand_Click(sender, e);
+
+                    TxtTitle.Dispatcher.BeginInvoke(new Action(() =>
+                    {
+                        TxtTitle.Focus();
+                    }));
+                }
+            }
+        }
     }
 }