|
@@ -1,5 +1,7 @@
|
|
|
-using compdfkit_tools.Annotation.PDFAnnotationControl;
|
|
|
+using ComPDFKit.PDFDocument;
|
|
|
+using compdfkit_tools.Annotation.PDFAnnotationControl;
|
|
|
using compdfkit_tools.PDFControl;
|
|
|
+using ComPDFKitViewer;
|
|
|
using ComPDFKitViewer.PdfViewer;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
@@ -24,7 +26,7 @@ namespace annotation_ctrl_demo
|
|
|
/// </summary>
|
|
|
public partial class MainWindow : Window
|
|
|
{
|
|
|
- private CPDFViewer pdfViewer;
|
|
|
+ private CPDFViewer pdfViewer=new CPDFViewer();
|
|
|
|
|
|
public MainWindow()
|
|
|
{
|
|
@@ -82,16 +84,16 @@ namespace annotation_ctrl_demo
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void TitleBarControl_OpenFileEvent(object sender, CPDFViewer e)
|
|
|
+ private void TitleBarControl_OpenFileEvent(object sender, string filePath)
|
|
|
{
|
|
|
- this.pdfViewer = TitleBarControl.pdfViewer;
|
|
|
+ pdfViewer?.CloseDocument();
|
|
|
+ pdfViewer?.InitDocument(filePath);
|
|
|
LoadDocument();
|
|
|
}
|
|
|
|
|
|
private void TitleBarControl_Loaded(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
TitleBarControl.OpenFileEvent += TitleBarControl_OpenFileEvent;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
private UIElement GetPropertyPanel()
|