Ver código fonte

ComPDFKit.Demo(win) - 调整CPDFViewer的IsRendering判断处理

TangJinZhou 2 semanas atrás
pai
commit
5238d28c32

+ 5 - 4
Demo/Examples/Compdfkit.Controls/PDFView/PDFViewControl/PDFViewControl.xaml.cs

@@ -125,7 +125,7 @@ namespace ComPDFKit.Controls.PDFControl
 
         private void PDFViewControl_OnRenderFinish(object sender, EventArgs e)
         {
-           SetCursorStatus();
+            SetCursorStatus();
         }
 
         private void PDFViewTool_DrawChanged(object sender, EventArgs e)
@@ -689,7 +689,6 @@ namespace ComPDFKit.Controls.PDFControl
                     }
                 }
 
-
                 if (currentMode == ToolType.CreateAnnot)
                 {
                     List<C_ANNOTATION_TYPE> annotTypes = new List<C_ANNOTATION_TYPE>
@@ -713,6 +712,7 @@ namespace ComPDFKit.Controls.PDFControl
                     }
                 }
             }
+
             GetCPDFViewer().Cursor = newCursor;
         }
 
@@ -720,8 +720,9 @@ namespace ComPDFKit.Controls.PDFControl
         {
             if (GetCPDFViewer().IsRendering)
             {
-               GetCPDFViewer().Cursor = Cursors.Wait;
-               return;
+                GetCPDFViewer().Cursor = Cursors.Wait;
+                FocusPDFViewTool.ContextMenu?.Items.Clear();
+                return;
             }
 
             if (isAutomaticScroll)