|
@@ -392,26 +392,35 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
//}
|
|
|
return;
|
|
|
}
|
|
|
- CPDFEditType createContentEditType = PdfViewControl.PDFToolManager.GetCreateContentEditType();
|
|
|
- if (createContentEditType == CPDFEditType.EditText)
|
|
|
+
|
|
|
+ int PageIndex = -1;
|
|
|
+ CPDFEditArea editAreaArea = PdfViewControl.PDFToolManager.GetSelectedEditAreaObject(ref PageIndex);
|
|
|
+ if (editAreaArea==null)
|
|
|
{
|
|
|
- CPDFEditArea editAreaArea = PdfViewControl.PDFToolManager.GetSelectedEditAreaObject();
|
|
|
- PDFEditParam pDFEditParam= ParamConverter.CPDFDataConverterToPDFEitParam(PdfViewControl.PDFToolManager.GetDocument(), editAreaArea);
|
|
|
- pdfContentEditControl.SetPDFTextEditData((TextEditParam)pDFEditParam, true);
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
- if (createContentEditType == CPDFEditType.EditImage && PdfViewControl != null)
|
|
|
+ else
|
|
|
{
|
|
|
- UIElement pageView = sender as UIElement;
|
|
|
- if (pageView != null)
|
|
|
+ if (editAreaArea.Type == CPDFEditType.EditText)
|
|
|
{
|
|
|
- pageView.MouseLeftButtonUp += PageView_MouseLeftButtonUp;
|
|
|
+ PDFEditParam pDFEditParam = ParamConverter.CPDFDataConverterToPDFEitParam(PdfViewControl.PDFToolManager.GetDocument(), editAreaArea, PageIndex);
|
|
|
+ pdfContentEditControl.SetPDFTextEditData((TextEditParam)pDFEditParam, true);
|
|
|
+ PropertyContainer.Child = pdfContentEditControl;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ else if (editAreaArea.Type == CPDFEditType.EditImage && PdfViewControl != null)
|
|
|
+ {
|
|
|
+ UIElement pageView = sender as UIElement;
|
|
|
+ if (pageView != null)
|
|
|
+ {
|
|
|
+ pageView.MouseLeftButtonUp += PageView_MouseLeftButtonUp;
|
|
|
+ }
|
|
|
+ PDFEditParam pDFEditParam = ParamConverter.CPDFDataConverterToPDFEitParam(PdfViewControl.PDFToolManager.GetDocument(), editAreaArea, PageIndex);
|
|
|
+ pdfContentEditControl.SetPDFImageEditData((ImageEditParam)pDFEditParam);
|
|
|
+ PropertyContainer.Child = pdfContentEditControl;
|
|
|
+ return;
|
|
|
}
|
|
|
- CPDFEditArea editAreaArea = PdfViewControl.PDFToolManager.GetSelectedEditAreaObject();
|
|
|
- PDFEditParam pDFEditParam = ParamConverter.CPDFDataConverterToPDFEitParam(PdfViewControl.PDFToolManager.GetDocument(), editAreaArea);
|
|
|
- pdfContentEditControl.SetPDFImageEditData((ImageEditParam)pDFEditParam);
|
|
|
- return;
|
|
|
}
|
|
|
}
|
|
|
|