Browse Source

注释-高亮、下划线、删除线,不是文本注释

OYXH\oyxh 1 year ago
parent
commit
778d819e48

+ 3 - 3
PDF Office/ViewModels/BOTA/AnnotationContentViewModel.cs

@@ -948,9 +948,9 @@ namespace PDF_Master.ViewModels.BOTA
                 if (listBoxItem.DataContext is AnnotationHandlerEventArgs args)
                 {
                     //if (args.EventType != AnnotArgsType.AnnotSticky && args.EventType != AnnotArgsType.AnnotFreeText && args.EventType != AnnotArgsType.AnnotLink)
-                    if (args.EventType != AnnotArgsType.AnnotSticky && args.EventType != AnnotArgsType.AnnotFreeText &&
+                    if (args.EventType != AnnotArgsType.AnnotSticky && args.EventType != AnnotArgsType.AnnotFreeText && args.EventType != AnnotArgsType.AnnotLink/*&&
                    args.EventType != AnnotArgsType.AnnotHighlight && args.EventType != AnnotArgsType.AnnotUnderline
-                   && args.EventType != AnnotArgsType.AnnotStrikeout && args.EventType != AnnotArgsType.AnnotLink)
+                   && args.EventType != AnnotArgsType.AnnotStrikeout*/)
                     {
                         DialogParameters value = new DialogParameters();
                         value.Add(ParameterNames.Annotation, args);
@@ -1031,7 +1031,7 @@ namespace PDF_Master.ViewModels.BOTA
                         {
                             AnnotationList.SelectedItem = item;
                         }
-                            
+
                         await Task.Delay(1);
                         AnnotationList.ScrollIntoView(item);
                     }

+ 3 - 2
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Command.cs

@@ -163,9 +163,10 @@ namespace PDF_Master.ViewModels.Tools
                 if (CurrentSelectedAnnot != null)
                 {
                     var type = CurrentSelectedAnnot.EventType;
-                    if (type != AnnotArgsType.AnnotSticky && type != AnnotArgsType.AnnotFreeText &&
+                    if (type != AnnotArgsType.AnnotSticky && type != AnnotArgsType.AnnotFreeText && type != AnnotArgsType.AnnotLink
+                        /*&&
                         type != AnnotArgsType.AnnotHighlight && type != AnnotArgsType.AnnotUnderline
-                        && type != AnnotArgsType.AnnotStrikeout && type != AnnotArgsType.AnnotLink)
+                        && type != AnnotArgsType.AnnotStrikeout*/)
                     {
                         int dpi = DpiHelpers.Dpi;
                         var rect = CurrentSelectedAnnot.ClientRect;

+ 7 - 4
PDF Office/Views/BOTA/AnnotationListItem.xaml.cs

@@ -77,9 +77,9 @@ namespace PDF_Master.Views.BOTA
                                 //PathHighlight.Opacity = textHighlightAnnotArgs.Transparency;
                                 //BOTA - 注释,MVP不处理高亮 / 下划线 / 删除线的样式,只显示文字
                                 //文本注释、便签、链接、表格不支持添加附注
-
+                                //高亮、下划线、删除线,不是文本注释
+                                TxbContent.Text = Regex.Replace(data.MarkupContent, "[\r\n]", " ");
                                 TxbMarkupContent.Text = Regex.Replace(data.Content, "[\r\n]", " ");
-                                TxbMarkupContent.Text = "";
                             }
 
                             break;
@@ -153,8 +153,9 @@ namespace PDF_Master.Views.BOTA
                                 //BOTA - 注释,MVP不处理高亮 / 下划线 / 删除线的样式,只显示文字
                                 //文本注释、便签、链接、表格不支持添加附注
 
+                                //高亮、下划线、删除线,不是文本注释
+                                TxbContent.Text = Regex.Replace(data.MarkupContent, "[\r\n]", " ");
                                 TxbMarkupContent.Text = Regex.Replace(data.Content, "[\r\n]", " ");
-                                TxbMarkupContent.Text = "";
                             }
 
                             #region to do
@@ -199,8 +200,10 @@ namespace PDF_Master.Views.BOTA
                             //BOTA - 注释,MVP不处理高亮 / 下划线 / 删除线的样式,只显示文字
                             //文本注释、便签、链接、表格不支持添加附注
 
+                            //高亮、下划线、删除线,不是文本注释
+                            TxbContent.Text = Regex.Replace(data.MarkupContent, "[\r\n]", " ");
                             TxbMarkupContent.Text = Regex.Replace(data.Content, "[\r\n]", " ");
-                            TxbMarkupContent.Text = "";
+                            //TxbMarkupContent.Text = "";
 
                             #region TO DO