Browse Source

其他-处理内容编辑以及图章的连续创建相关内容

zhuyi 11 months ago
parent
commit
2d0ad09db3

+ 10 - 0
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationControl/CPDFAnnotationControl.xaml.cs

@@ -77,6 +77,8 @@ namespace Compdfkit_Tools.PDFControl
             {
                 pdfViewerControl.PDFToolManager.MouseLeftButtonDownHandler -= PDFToolManager_MouseLeftButtonDownHandler;
                 pdfViewerControl.PDFToolManager.MouseLeftButtonDownHandler += PDFToolManager_MouseLeftButtonDownHandler;
+                pdfViewerControl.PDFToolManager.MouseLeftButtonUpHandler -= PDFToolManager_MouseLeftButtonUpHandler;
+                pdfViewerControl.PDFToolManager.MouseLeftButtonUpHandler += PDFToolManager_MouseLeftButtonUpHandler;
                 //this.pdfViewerControl.AnnotActiveHandler += PDFViewer_AnnotActiveHandler;
                 //this.pdfViewerControl.AnnotEditHandler -= PdfViewer_AnnotEditHandler;
                 //this.pdfViewerControl.AnnotEditHandler += PdfViewer_AnnotEditHandler;
@@ -84,6 +86,14 @@ namespace Compdfkit_Tools.PDFControl
         }
 
 
+        private void PDFToolManager_MouseLeftButtonUpHandler(object sender, MouseEventObject e)
+        {
+            if (e.IsCreate)
+            {
+                pdfViewerControl.PDFViewTool.GetCPDFViewer().SetIsShowStampMouse(false);
+            }
+        }
+
         //private void PdfViewer_AnnotEditHandler(object sender, List<AnnotEditEvent> e)
         //{
         //    if (e != null && e.Count > 0)

+ 10 - 1
Demo/Examples/Compdfkit_Tools/Edit/ContentEditCOntrol/ContentEditControl.xaml.cs

@@ -358,6 +358,8 @@ namespace Compdfkit_Tools.PDFControl
             PdfViewControl.PDFViewTool.GetCPDFViewer().UndoManager.PropertyChanged += UndoManager_PropertyChanged;
             PdfViewControl.PDFToolManager.MouseLeftButtonDownHandler -= PDFToolManager_MouseLeftButtonDownHandler;
             PdfViewControl.PDFToolManager.MouseLeftButtonDownHandler += PDFToolManager_MouseLeftButtonDownHandler;
+            PdfViewControl.PDFToolManager.MouseLeftButtonUpHandler -= PDFToolManager_MouseLeftButtonUpHandler;
+            PdfViewControl.PDFToolManager.MouseLeftButtonUpHandler += PDFToolManager_MouseLeftButtonUpHandler;
             PdfViewControl = view;
             PdfViewControl.SplitPDFViewToolCreated -= PdfViewControl_SplitPDFViewToolCreated;
             PdfViewControl.SplitPDFViewToolCreated += PdfViewControl_SplitPDFViewToolCreated;
@@ -367,9 +369,16 @@ namespace Compdfkit_Tools.PDFControl
             DataContext = this;
         }
 
+        private void PDFToolManager_MouseLeftButtonUpHandler(object sender, MouseEventObject e)
+        {
+            if (e.IsCreate)
+            {
+                PdfViewControl.PDFViewTool.GetCPDFViewer().SetIsShowStampMouse(false);
+            }
+        }
+
         private void PDFToolManager_MouseLeftButtonDownHandler(object sender, MouseEventObject e)
         {
-          
 
             if (PdfViewControl.PDFToolManager.GetToolType() != ToolType.ContentEdit)
             {