瀏覽代碼

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

TangJinZhou 2 周之前
父節點
當前提交
5238d28c32
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      Demo/Examples/Compdfkit.Controls/PDFView/PDFViewControl/PDFViewControl.xaml.cs

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