|
@@ -798,11 +798,6 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
{
|
|
|
if (annotArgs is LinkAnnotArgs linkAnnot)
|
|
|
{
|
|
|
- //annotArgs.PageIndex = drawRectTuple.Item1;
|
|
|
- //annotArgs.ClientRect = drawRectTuple.Item2;
|
|
|
- //PDFViewer.CreatePageAnnot(drawRectTuple.Item1, annotArgs);
|
|
|
-
|
|
|
- //LinkAnnotArgs linkArgs = new LinkAnnotArgs();
|
|
|
linkAnnot.ClientRect = drawRectTuple.Item2;
|
|
|
linkAnnot.URI = string.Empty;
|
|
|
linkAnnot.LinkType = LINK_TYPE.GOTO;
|
|
@@ -810,16 +805,6 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
PDFViewer.CreatePageAnnot(drawRectTuple.Item1, linkAnnot);
|
|
|
|
|
|
annotHandler = linkAnnot;
|
|
|
-
|
|
|
- //BtnLinkIsChecked = true;
|
|
|
- //List<AnnotHandlerEventArgs> lists = new List<AnnotHandlerEventArgs>();
|
|
|
- //lists.Add(linkArgs);
|
|
|
- //propertyPanel.IsAddLink = true;
|
|
|
-
|
|
|
- //annotArgs = GetLink(lists);
|
|
|
- //PDFViewer.SetMouseMode(MouseModes.AnnotCreate);
|
|
|
- //PDFViewer.SetToolParam(annotArgs);
|
|
|
- //viewContentViewModel.IsPropertyOpen = true;
|
|
|
}
|
|
|
if (annotArgs is SquareAnnotArgs squareAnnot)
|
|
|
{
|
|
@@ -827,6 +812,18 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
PDFViewer.CreatePageAnnot(drawRectTuple.Item1, squareAnnot);
|
|
|
annotHandler = squareAnnot;
|
|
|
}
|
|
|
+ if (annotArgs is CircleAnnotArgs circleAnnot)
|
|
|
+ {
|
|
|
+ circleAnnot.ClientRect = drawRectTuple.Item2;
|
|
|
+ PDFViewer.CreatePageAnnot(drawRectTuple.Item1, circleAnnot);
|
|
|
+ annotHandler = circleAnnot;
|
|
|
+ }
|
|
|
+ if (annotArgs is LineAnnotArgs lineAnnot)
|
|
|
+ {
|
|
|
+ lineAnnot.ClientRect = drawRectTuple.Item2;
|
|
|
+ PDFViewer.CreatePageAnnot(drawRectTuple.Item1, lineAnnot);
|
|
|
+ annotHandler = lineAnnot;
|
|
|
+ }
|
|
|
}
|
|
|
return annotHandler;
|
|
|
}
|
|
@@ -996,7 +993,14 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
{
|
|
|
selectedArgs = new List<AnnotHandlerEventArgs>();
|
|
|
selectedArgs.Add(squareArgs);
|
|
|
- CreateAnnotFromSelectPageText(squareArgs);
|
|
|
+ //CreateAnnotFromSelectPageText(squareArgs);
|
|
|
+ AnnotHandlerEventArgs annotHandler = CreateAnnotFromSelectPageText(squareArgs);
|
|
|
+ if (annotHandler is SquareAnnotArgs annotArgs)
|
|
|
+ {
|
|
|
+ selectedArgs.Clear();
|
|
|
+ selectedArgs.Add(annotArgs);
|
|
|
+ PropertyPanel.IsSelectedTextAddShape = true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -1076,12 +1080,20 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
circleAnnotArgs.LineWidth = circleAnnot.LineWidth;
|
|
|
circleAnnotArgs.Transparency = circleAnnot.Transparency;
|
|
|
circleAnnotArgs.LineDash = circleAnnot.LineDash;
|
|
|
+ circleAnnotArgs.ClientRect = Rect.Empty;
|
|
|
}
|
|
|
|
|
|
if (circleAnnotArgs != null)
|
|
|
{
|
|
|
selectedArgs = new List<AnnotHandlerEventArgs>();
|
|
|
selectedArgs.Add(circleAnnotArgs);
|
|
|
+ AnnotHandlerEventArgs annotHandler = CreateAnnotFromSelectPageText(circleAnnotArgs);
|
|
|
+ if (annotHandler is CircleAnnotArgs annotArgs)
|
|
|
+ {
|
|
|
+ selectedArgs.Clear();
|
|
|
+ selectedArgs.Add(annotArgs);
|
|
|
+ PropertyPanel.IsSelectedTextAddShape = true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else
|