|
@@ -764,25 +764,33 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
var drawRectTuple = DrawRectCreateAnnot();
|
|
|
if (drawRectTuple != null)
|
|
|
{
|
|
|
- //annotArgs.PageIndex = drawRectTuple.Item1;
|
|
|
- //annotArgs.ClientRect = drawRectTuple.Item2;
|
|
|
- //PDFViewer.CreatePageAnnot(drawRectTuple.Item1, annotArgs);
|
|
|
-
|
|
|
- LinkAnnotArgs linkArgs = new LinkAnnotArgs();
|
|
|
- linkArgs.ClientRect = drawRectTuple.Item2;
|
|
|
- linkArgs.URI = string.Empty;
|
|
|
- linkArgs.LinkType = LINK_TYPE.GOTO;
|
|
|
- linkArgs.DestIndex = drawRectTuple.Item1;
|
|
|
- PDFViewer.CreatePageAnnot(drawRectTuple.Item1, linkArgs);
|
|
|
- //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 LinkAnnotArgs linkAnnot)
|
|
|
+ {
|
|
|
+ //annotArgs.PageIndex = drawRectTuple.Item1;
|
|
|
+ //annotArgs.ClientRect = drawRectTuple.Item2;
|
|
|
+ //PDFViewer.CreatePageAnnot(drawRectTuple.Item1, annotArgs);
|
|
|
+
|
|
|
+ LinkAnnotArgs linkArgs = new LinkAnnotArgs();
|
|
|
+ linkArgs.ClientRect = drawRectTuple.Item2;
|
|
|
+ linkArgs.URI = string.Empty;
|
|
|
+ linkArgs.LinkType = LINK_TYPE.GOTO;
|
|
|
+ linkArgs.DestIndex = drawRectTuple.Item1;
|
|
|
+ PDFViewer.CreatePageAnnot(drawRectTuple.Item1, linkArgs);
|
|
|
+ //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)
|
|
|
+ {
|
|
|
+ squareAnnot.ClientRect = drawRectTuple.Item2;
|
|
|
+ PDFViewer.CreatePageAnnot(drawRectTuple.Item1, squareAnnot);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|