Browse Source

文本注释-esc取消逻辑、链接颜色

OYXH\oyxh 1 year ago
parent
commit
defbb6bac1

+ 6 - 5
PDF Office/ViewModels/PropertyPanel/AnnotPanel/LinkAnnotPropertyViewModel.cs

@@ -1380,11 +1380,12 @@ namespace PDF_Master.ViewModels.PropertyPanel.AnnotPanel
 
         public void OnNavigatedTo(NavigationContext navigationContext)
         {
-            SolidColorBrush solidColorBrush = new SolidColorBrush(System.Windows.Media.Color.FromArgb(50, 23, 112, 244));
-            CommonDrawData.LinkPen = new System.Windows.Media.Pen(solidColorBrush, 0);
-            CommonDrawData.LinkBrush = solidColorBrush;
-            CommonDrawData.LinkAreaSelectPen = new System.Windows.Media.Pen(solidColorBrush, 0);
-            CommonDrawData.LinkAreaSelectBrush = solidColorBrush;
+            //SolidColorBrush solidColorBrush = new SolidColorBrush(System.Windows.Media.Color.FromArgb(50, 23, 112, 244));
+            //SolidColorBrush solidColorPen = new SolidColorBrush(System.Windows.Media.Color.FromRgb(23, 112, 244));
+            //CommonDrawData.LinkPen = new System.Windows.Media.Pen(solidColorPen, 0);
+            //CommonDrawData.LinkBrush = solidColorBrush;
+            //CommonDrawData.LinkAreaSelectPen = new System.Windows.Media.Pen(solidColorBrush, 0);
+            //CommonDrawData.LinkAreaSelectBrush = solidColorBrush;
             //CommonDrawData.LinkAreaSelectBrush = new SolidColorBrush(System.Windows.Media.Color.FromArgb(50, 23, 112, 244));
 
             navigationContext.Parameters.TryGetValue<AnnotTransfer>(ParameterNames.PropertyPanelContentViewModel, out propertyPanel);

+ 20 - 1
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.cs

@@ -1994,7 +1994,7 @@ namespace PDF_Master.ViewModels.Tools
                                 case AnnotArgsType.AnnotLine:
                                 case AnnotArgsType.AnnotSquare:
                                 case AnnotArgsType.AnnotCircle:
-                                case AnnotArgsType.AnnotFreeText:
+
                                     //case AnnotArgsType.AnnotSticky:
                                     Trace.WriteLine(StrAnnotToolChecked);
 
@@ -2009,6 +2009,18 @@ namespace PDF_Master.ViewModels.Tools
                                     }
                                     break;
 
+                                case AnnotArgsType.AnnotFreeText:
+
+                                    if (PDFViewer.ToolManager.HasTool == false)
+                                    {
+                                        ExitAnnotationTool();
+                                    }
+                                    else
+                                    {
+                                        PDFViewer.RemoveTool(true);
+                                    }
+                                    break;
+
                                 case AnnotArgsType.AnnotSticky:
                                     if (PDFViewer.ToolManager.HasTool)
                                     {
@@ -2226,6 +2238,13 @@ namespace PDF_Master.ViewModels.Tools
 
         public void OnNavigatedTo(NavigationContext navigationContext)
         {
+            SolidColorBrush solidColorBrush = new SolidColorBrush(System.Windows.Media.Color.FromArgb(50, 23, 112, 244));
+            SolidColorBrush solidColorPen = new SolidColorBrush(System.Windows.Media.Color.FromRgb(23, 112, 244));
+            CommonDrawData.LinkPen = new System.Windows.Media.Pen(solidColorPen, 0);
+            CommonDrawData.LinkBrush = solidColorBrush;
+            CommonDrawData.LinkAreaSelectPen = new System.Windows.Media.Pen(solidColorBrush, 0);
+            CommonDrawData.LinkAreaSelectBrush = solidColorBrush;
+
             navigationContext.Parameters.TryGetValue<ViewContentViewModel>(ParameterNames.ViewContentViewModel, out viewContentViewModel);
             navigationContext.Parameters.TryGetValue<CPDFViewer>(ParameterNames.PDFViewer, out PDFViewer);