Переглянути джерело

其他-数据层BUG修复带来的对应demo代码微调

zhuyi 9 місяців тому
батько
коміт
f043cbd06b

+ 1 - 1
Demo/Examples/Compdfkit_Tools/PDFView/PDFDisplaySettings/PDFDisplaySettingsControl/CPDFDisplaySettingsControl.xaml.cs

@@ -2,6 +2,7 @@
 using ComPDFKitViewer;
 using System;
 using System.Collections.Generic;
+using System.Linq;
 using System.Windows;
 using System.Windows.Controls;
 
@@ -59,7 +60,6 @@ namespace Compdfkit_Tools.PDFControl
                 if (pdfViewer != null)
                 {
                     pdfViewer?.SetViewMode(e);
-                    pdfViewer?.UpdateRenderFrame();
                 }
             }
         }

+ 1 - 1
Demo/Examples/Compdfkit_Tools/PDFView/PDFViewControl/PDFViewControl.xaml.cs

@@ -111,7 +111,7 @@ namespace Compdfkit_Tools.PDFControl
 
         }
 
-        private void PDFToolManager_AnnotDefaultEditedHandler(object sender, EventArgs e)
+        private void PDFToolManager_AnnotDefaultEditedHandler(object sender, ComPDFKit.Tool.DrawTool.SelectedAnnotData e)
         {
             UpdateAnnotFrame();
         }

+ 3 - 2
Demo/Examples/Forms/MainWindow.xaml.cs

@@ -91,13 +91,14 @@ namespace FormViewControl
         private void LoadDefaultDocument()
         {
             string defaultFilePath = "ComPDFKit_Forms_Sample_File.pdf";
-            pdfViewer.PDFView.InitDocument(defaultFilePath);
+            pdfViewer.InitDocument(defaultFilePath);
             LoadDocument();
         }
 
         private void LoadDocument()
         {
             formControl.PdfViewControl = pdfViewer;
+            regularViewerControl.PdfViewControl = pdfViewer;
             formControl.InitWithPDFViewer(pdfViewer);
             
             formControl.ClearAllToolState();
@@ -117,7 +118,7 @@ namespace FormViewControl
             
             ModeComboBox.SelectedIndex = 1;
             formControl.SetToolBarContainerVisibility(Visibility.Visible);
-            formControl.PdfViewControl.PDFViewTool.GetCPDFViewer().SetFitMode(FitModes.FitWidth);
+            formControl.PdfViewControl.PDFViewTool.GetCPDFViewer().SetFitMode(FitMode.FitWidth);
             CPDFSaclingControl.InitWithPDFViewer(formControl.PdfViewControl);
             CPDFSaclingControl.SetZoomTextBoxText(string.Format("{0}", (int)(formControl.PdfViewControl.PDFViewTool.GetCPDFViewer().GetZoom() * 100)));