|
@@ -62,6 +62,13 @@ namespace ComPDFKit.Tool
|
|
|
SelectedPage,
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ public class PopupControlInfo
|
|
|
+ {
|
|
|
+ public BaseAnnot Annot { get; set; }
|
|
|
+ public UIElement PopUpControl { get; set; }
|
|
|
+ }
|
|
|
+
|
|
|
public partial class CPDFViewerTool : UserControl
|
|
|
{
|
|
|
public bool IsDocumentModified
|
|
@@ -91,6 +98,22 @@ namespace ComPDFKit.Tool
|
|
|
InsertPageSelectedRectView();
|
|
|
}
|
|
|
|
|
|
+ public void ReplaceCPDFViewer(CPDFViewer newViewer)
|
|
|
+ {
|
|
|
+ ScrollContainer.Content = newViewer;
|
|
|
+ PDFViewer = newViewer;
|
|
|
+ InsertSelectImageView();
|
|
|
+ InsertAnnotView();
|
|
|
+ InsertAnnotEditView();
|
|
|
+ InsertWidgetView();
|
|
|
+ InsertSelectedRectView();
|
|
|
+ InsertMultiSelectedRectView();
|
|
|
+ InsertCustomizeToolView();
|
|
|
+ InsertSelectTextView();
|
|
|
+ InsertTextEditView();
|
|
|
+ InsertPageSelectedRectView();
|
|
|
+ }
|
|
|
+
|
|
|
private void Current_Exit(object sender, ExitEventArgs e)
|
|
|
{
|
|
|
GetCPDFViewer().Dispose();
|
|
@@ -109,6 +132,7 @@ namespace ComPDFKit.Tool
|
|
|
public event EventHandler<MouseEventObject> MouseRightButtonDownHandler;
|
|
|
public event EventHandler DrawChanged;
|
|
|
public event EventHandler DocumentModifiedChanged;
|
|
|
+ public event EventHandler<PopupControlInfo> PopUpControlHandler;
|
|
|
|
|
|
private ToolType currentModel = ToolType.Viewer;
|
|
|
|