123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using compdfkit_tools.Common;
- using ComPDFKitViewer.AnnotEvent;
- using ComPDFKitViewer;
- 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.PDFControlUI
- {
- /// <summary>
- /// CPDFImageUI.xaml 的交互逻辑
- /// </summary>
- public partial class CPDFTempStampUI : UserControl
- {
- private AnnotAttribEvent annotAttribEvent;
- public CPDFTempStampUI()
- {
- InitializeComponent();
- }
- public void SetPresentAnnotAttrib(AnnotAttribEvent annotAttribEvent)
- {
- this.annotAttribEvent = null;
- NoteTextBox.Text = (string)annotAttribEvent.Attribs[AnnotAttrib.NoteText];
- this.annotAttribEvent = annotAttribEvent;
- WriteableBitmap writeableBitmap = (annotAttribEvent.GetAnnotHandlerEventArgs(AnnotArgsType.AnnotStamp)[0] as StampAnnotArgs).GetStampDrawing();
- CPDFAnnotationPreviewerControl.DrawStampPreview(writeableBitmap);
- }
- private void NoteTextBox_TextChanged(object sender, TextChangedEventArgs e)
- {
- if(annotAttribEvent != null)
- {
- annotAttribEvent.UpdateAttrib(AnnotAttrib.NoteText, NoteTextBox.Text);
- annotAttribEvent.UpdateAnnot();
- }
- }
- }
- }
|