123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- using ComPDFKit.Tool;
- using ComPDFKit.Controls.PDFControl;
- using System.Windows.Controls;
- using System.Collections.Generic;
- namespace ComPDFKit.Controls.Edit
- {
- public partial class PDFContentEditControl : UserControl
- {
- #region
- private PDFImageEditControl PDFImageEditControl = new PDFImageEditControl();
- private PDFTextEditControl PDFTextEditControl = new PDFTextEditControl();
- private PDFPathEditControl PDFPathEditControl = new PDFPathEditControl();
- public PDFViewControl ViewControl { get; private set; }
- public PDFEditParam EditEvent { get; set; }
-
- #endregion
- public PDFContentEditControl()
- {
- InitializeComponent();
- }
- public void InitWithPDFViewer(PDFViewControl newPDFView)
- {
- ViewControl = newPDFView;
- PDFTextEditControl.InitWithPDFViewer(newPDFView.PDFViewTool);
- PDFImageEditControl.InitWithPDFViewer(newPDFView.PDFViewTool);
- PDFPathEditControl.InitWithPDFViewer(newPDFView.PDFViewTool);
- }
- public void SetRotationText(float rotation)
- {
- PDFImageEditControl.SetRotationText(rotation);
- }
- public void SetPDFTextEditData(List<TextEditParam> editEvent, bool isTemp = false)
- {
- if (!isTemp)
- {
- PDFTextEditControl.SetPDFTextEditData(editEvent);
- ContentEditContainer.Child = PDFTextEditControl;
- }
- else
- {
- PDFTextEditControl tempPDFTextEditControl = new PDFTextEditControl();
- tempPDFTextEditControl.InitWithPDFViewer(ViewControl.PDFViewTool);
- tempPDFTextEditControl.SetPDFTextEditData(editEvent);
- ContentEditContainer.Child = tempPDFTextEditControl;
- }
- }
- //public void SetPDFTextMultiEditData(List<PDFEditEvent> editEventList)
- //{
- // PDFTextEditControl.SetPDFTextMultiEditData(editEventList);
- // ContentEditContainer.Child = PDFTextEditControl;
- //}
- public void ClearContentControl()
- {
- ContentEditContainer.Child = null;
- }
- public void SetPDFImageEditData(List<ImageEditParam> editEvent)
- {
- PDFImageEditControl.SetPDFImageEditData(editEvent);
- ContentEditContainer.Child = PDFImageEditControl;
- }
- public void SetPDFPathEditData(List<PathEditParam> editEvent)
- {
- PDFPathEditControl.SetPDFPathEditData(editEvent);
- ContentEditContainer.Child = PDFPathEditControl;
- }
- //public void SetPDFImageMultiEditData(List<PDFEditEvent> editEventList)
- //{
- // PDFImageEditControl.SetPDFImageMultiEditData(editEventList);
- // ContentEditContainer.Child = PDFImageEditControl;
- //}
- public void RefreshThumb()
- {
- PDFImageEditControl?.SetImageThumb();
- }
- }
- }
|