|
@@ -1,6 +1,7 @@
|
|
|
using ComPDFKitViewer;
|
|
|
using ComPDFKitViewer.AnnotEvent;
|
|
|
using ComPDFKitViewer.PdfViewer;
|
|
|
+using PDF_Office.Helper;
|
|
|
using PDF_Office.Model;
|
|
|
using Prism.Commands;
|
|
|
using Prism.Mvvm;
|
|
@@ -14,38 +15,6 @@ using System.Windows;
|
|
|
|
|
|
namespace PDF_Office.ViewModels.Form
|
|
|
{
|
|
|
- public class UpdateAttributeEvent
|
|
|
- {
|
|
|
- private AnnotAttribEvent annotAttribEvent;
|
|
|
- private AnnotEditEvent annotEditEvent;
|
|
|
- public UpdateAttributeEvent(AnnotAttribEvent Event)
|
|
|
- {
|
|
|
- annotAttribEvent = Event;
|
|
|
- }
|
|
|
-
|
|
|
- public UpdateAttributeEvent(AnnotEditEvent Event)
|
|
|
- {
|
|
|
- annotEditEvent = Event;
|
|
|
- }
|
|
|
-
|
|
|
- public void UpdateAttrib(AnnotAttrib attrib, object updateData)
|
|
|
- {
|
|
|
- if(annotAttribEvent != null)
|
|
|
- {
|
|
|
- annotAttribEvent.UpdateAttrib(attrib, updateData);
|
|
|
- }
|
|
|
-
|
|
|
- if (annotEditEvent != null)
|
|
|
- {
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void UpdateAnnot()
|
|
|
- {
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
public class FormsToolContentViewModel : BindableBase, INavigationAware
|
|
|
{
|
|
|
#region 属性
|
|
@@ -147,7 +116,7 @@ namespace PDF_Office.ViewModels.Form
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void AddToPropertyPanel(string type, WidgetArgs widget = null, AnnotAttribEvent e = null)
|
|
|
+ private void AddToPropertyPanel(string type, WidgetArgs widget = null, UpdateAttributeHelper e = null)
|
|
|
{
|
|
|
if (btnToProperty.ContainsKey(type))
|
|
|
{
|
|
@@ -262,25 +231,25 @@ namespace PDF_Office.ViewModels.Form
|
|
|
switch (widgetArgs.WidgeType)
|
|
|
{
|
|
|
case ComPDFKit.PDFAnnotation.Form.C_WIDGET_TYPE.WIDGET_TEXTFIELD:
|
|
|
- AddToPropertyPanel("Text", widgetArgs,e);
|
|
|
+ AddToPropertyPanel("Text", widgetArgs, new UpdateAttributeHelper(e));
|
|
|
break;
|
|
|
case ComPDFKit.PDFAnnotation.Form.C_WIDGET_TYPE.WIDGET_CHECKBOX:
|
|
|
- AddToPropertyPanel("CheckBox", widgetArgs, e);
|
|
|
+ AddToPropertyPanel("CheckBox", widgetArgs, new UpdateAttributeHelper(e));
|
|
|
break;
|
|
|
case ComPDFKit.PDFAnnotation.Form.C_WIDGET_TYPE.WIDGET_RADIOBUTTON:
|
|
|
- AddToPropertyPanel("RadioButton", widgetArgs, e);
|
|
|
+ AddToPropertyPanel("RadioButton", widgetArgs, new UpdateAttributeHelper(e));
|
|
|
break;
|
|
|
case ComPDFKit.PDFAnnotation.Form.C_WIDGET_TYPE.WIDGET_LISTBOX:
|
|
|
- AddToPropertyPanel("ListBox", widgetArgs, e);
|
|
|
+ AddToPropertyPanel("ListBox", widgetArgs, new UpdateAttributeHelper(e));
|
|
|
break;
|
|
|
case ComPDFKit.PDFAnnotation.Form.C_WIDGET_TYPE.WIDGET_COMBOBOX:
|
|
|
- AddToPropertyPanel("Combox", widgetArgs, e);
|
|
|
+ AddToPropertyPanel("Combox", widgetArgs, new UpdateAttributeHelper(e));
|
|
|
break;
|
|
|
case ComPDFKit.PDFAnnotation.Form.C_WIDGET_TYPE.WIDGET_PUSHBUTTON:
|
|
|
- AddToPropertyPanel("Button", widgetArgs, e);
|
|
|
+ AddToPropertyPanel("Button", widgetArgs, new UpdateAttributeHelper(e));
|
|
|
break;
|
|
|
case ComPDFKit.PDFAnnotation.Form.C_WIDGET_TYPE.WIDGET_SIGNATUREFIELDS:
|
|
|
- AddToPropertyPanel("Sign", widgetArgs, e);
|
|
|
+ AddToPropertyPanel("Sign", widgetArgs, new UpdateAttributeHelper(e));
|
|
|
break;
|
|
|
|
|
|
}
|