using compdfkit_tools.Form.Property; using ComPDFKitViewer.AnnotEvent; using ComPDFKitViewer.PdfViewer; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace compdfkit_tools.Form { /// /// FromPropertyControl.xaml 的交互逻辑 /// public partial class FromPropertyControl : UserControl { private CPDFViewer pdfViewer; private UIElement currentPanel = null; public FromPropertyControl() { InitializeComponent(); } public void CleanProperty() { } public void SetPropertyForType(WidgetArgs Args, AnnotAttribEvent e) { currentPanel = null; switch (Args.WidgeType) { case ComPDFKit.PDFAnnotation.Form.C_WIDGET_TYPE.WIDGET_PUSHBUTTON: break; case ComPDFKit.PDFAnnotation.Form.C_WIDGET_TYPE.WIDGET_CHECKBOX: break; case ComPDFKit.PDFAnnotation.Form.C_WIDGET_TYPE.WIDGET_RADIOBUTTON: break; case ComPDFKit.PDFAnnotation.Form.C_WIDGET_TYPE.WIDGET_TEXTFIELD: TextFieldProperty textFieldProperty = new TextFieldProperty(); textFieldProperty.SetProperty(Args,e); currentPanel = textFieldProperty; break; case ComPDFKit.PDFAnnotation.Form.C_WIDGET_TYPE.WIDGET_COMBOBOX: break; case ComPDFKit.PDFAnnotation.Form.C_WIDGET_TYPE.WIDGET_LISTBOX: break; case ComPDFKit.PDFAnnotation.Form.C_WIDGET_TYPE.WIDGET_SIGNATUREFIELDS: break; case ComPDFKit.PDFAnnotation.Form.C_WIDGET_TYPE.WIDGET_UNKNOWN: break; default: break; } SetAnnotationPanel(currentPanel); } private void SetAnnotationPanel(UIElement newChild) { FromPropertyPanel.Child = newChild; } public void SetPDFViewer(CPDFViewer pdfViewer) { this.pdfViewer = pdfViewer; } private void UserControl_Loaded(object sender, RoutedEventArgs e) { } private void UserControl_Unloaded(object sender, RoutedEventArgs e) { } } }