瀏覽代碼

Merge branch 'dev' of http://git.kdan.cc:8865/Windows/PDFOffice_Windows_exe into dev

ZhouJieSheng 1 年之前
父節點
當前提交
d953dbdaa7

+ 2 - 1
PDF Office/ViewModels/PropertyPanel/AnnotPanel/FreehandAnnotPropertyViewModel.cs

@@ -325,7 +325,8 @@ namespace PDF_Master.ViewModels.PropertyPanel.AnnotPanel
                 }
                 else
                 {
-                    BasicVm.IsFreeHandSelected=PropertyPanel.IsFreeHandSelected;
+                    IsPen = true;
+                    BasicVm.IsFreeHandSelected = PropertyPanel.IsFreeHandSelected;
                     GetAnnotProperty();
                 }
             }

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

@@ -423,8 +423,8 @@ namespace PDF_Master.ViewModels.Tools
                     PropertyPanel.AnnotEvent = null;
                     PropertyPanel.annotlists = null;
                     viewContentViewModel.SelectedPrpoertyPanel("PropertyPanelContent", null);
-                    PDFViewer.SetMouseMode(MouseModes.PanTool);
-                    HandToolIsCheckedEvent(false);
+                    //PDFViewer.SetMouseMode(MouseModes.PanTool);
+                    //HandToolIsCheckedEvent(false);
                     return;
                 }
                 else
@@ -1178,6 +1178,7 @@ namespace PDF_Master.ViewModels.Tools
                             }
                             ExitAnnotationTool();
                             viewContentViewModel.SelectedPrpoertyPanel("PropertyPanelContent", null);
+
                             break;
 
                         case ActionType.TextEdit:
@@ -1364,7 +1365,7 @@ namespace PDF_Master.ViewModels.Tools
                 AnnotHandlerEventArgs annotArgs = null;
                 //PropertyPanel.SaveLastAnnot();
                 List<AnnotHandlerEventArgs> annots = new List<AnnotHandlerEventArgs>();
-                
+
                 foreach (AnnotArgsType argsType in e.Keys)
                 {
                     if (PropertyPanel.annot != null)

+ 10 - 1
PDF Office/Views/BOTA/AnnotationListItem.xaml.cs

@@ -63,7 +63,11 @@ namespace PDF_Master.Views.BOTA
                                 BtnAnnotFreeText.Visibility = Visibility.Visible;
                                 TxbMarkupContent.Foreground = new SolidColorBrush(freeTextAnnotArgs.FontColor);
                             }
-
+                            if (!string.IsNullOrEmpty(data.Content) && string.IsNullOrEmpty(data.MarkupContent))
+                            {
+                                TxbContent.Text = Regex.Replace(data.Content, "[\r\n]", " ");
+                                TxbContent.Text = "";
+                            }
                             break;
 
                         case AnnotArgsType.AnnotHighlight:
@@ -163,6 +167,11 @@ namespace PDF_Master.Views.BOTA
                                 BtnAnnotSticky.Visibility = Visibility;
                                 PathSticky.Fill = new SolidColorBrush(stickyAnnotArgs.Color);
                             }
+                            if (!string.IsNullOrEmpty(data.Content) && string.IsNullOrEmpty(data.MarkupContent))
+                            {
+                                TxbContent.Text = Regex.Replace(data.Content, "[\r\n]", " ");
+                                TxbContent.Text = "";
+                            }
 
                             break;