|
@@ -15,7 +15,9 @@ using System.Windows;
|
|
|
using System.Windows.Controls.Primitives;
|
|
|
using System.Windows.Input;
|
|
|
using System.Windows.Media.Imaging;
|
|
|
+using Compdfkit_Tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI;
|
|
|
using Compdfkit_Tools.Helper;
|
|
|
+using ComPDFKit.PDFAnnotation.Form;
|
|
|
|
|
|
namespace Compdfkit_Tools.PDFControl
|
|
|
{
|
|
@@ -126,6 +128,7 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
PDFViewControl.PDFView = pdfViewer;
|
|
|
PDFGrid.Child = PDFViewControl;
|
|
|
FloatPageTool.InitWithPDFViewer(pdfViewer);
|
|
|
+ InitialPDFViewControl(PDFViewControl);
|
|
|
}
|
|
|
|
|
|
public void SetBOTAContainer(CPDFBOTABarControl botaControl)
|
|
@@ -154,12 +157,12 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
InitialPDFViewControl(PDFViewControl);
|
|
|
- PDFViewControl.PDFView.AnnotCommandHandler += PDFView_AnnotCommandHandler;
|
|
|
}
|
|
|
|
|
|
private void UserControl_Unloaded(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
PDFViewControl.PDFView.AnnotCommandHandler -= PDFView_AnnotCommandHandler;
|
|
|
+ PDFViewControl.PDFView.WidgetClickHandler -= PDFView_WidgetClickHandler;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -194,6 +197,11 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
PDFViewControl.PDFView.UndoManager.PropertyChanged += UndoManager_PropertyChanged;
|
|
|
PDFViewControl.PDFView.AnnotActiveHandler -= PDFView_AnnotActiveHandler;
|
|
|
PDFViewControl.PDFView.AnnotActiveHandler += PDFView_AnnotActiveHandler;
|
|
|
+
|
|
|
+ PDFViewControl.PDFView.AnnotCommandHandler -= PDFView_AnnotCommandHandler;
|
|
|
+ PDFViewControl.PDFView.WidgetClickHandler -= PDFView_WidgetClickHandler;
|
|
|
+ PDFViewControl.PDFView.AnnotCommandHandler += PDFView_AnnotCommandHandler;
|
|
|
+ PDFViewControl.PDFView.WidgetClickHandler += PDFView_WidgetClickHandler;
|
|
|
}
|
|
|
|
|
|
public void UnloadEvent()
|
|
@@ -687,6 +695,20 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
PropertyContainer.Child = PDFAnnotationControl;
|
|
|
PDFAnnotationControl.SetAnnotEventData(e);
|
|
|
}
|
|
|
+
|
|
|
+ private void PDFView_WidgetClickHandler(object sender, WidgetArgs e)
|
|
|
+ {
|
|
|
+ if ((e is WidgetSignArgs))
|
|
|
+ {
|
|
|
+ if (e.WidgeType == C_WIDGET_TYPE.WIDGET_SIGNATUREFIELDS)
|
|
|
+ {
|
|
|
+ panelState.RightPanel = PanelState.RightPanelState.PropertyPanel;
|
|
|
+ CPDFSignatureUI signatureProperty = new CPDFSignatureUI();
|
|
|
+ signatureProperty.SetFormProperty(e, PDFViewControl.PDFView);
|
|
|
+ PropertyContainer.Child = signatureProperty;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
private void PDFView_AnnotEditHandler(object sender, List<AnnotEditEvent> e)
|
|
|
{
|