|
@@ -148,7 +148,6 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
Point pagePoint = new Point(0, 0);
|
|
|
//Todo:等黎总需要更新ComPDFKit.dll
|
|
|
//PDFViewer.ConvertViewPointToPage(point, out pageIndex, out pagePoint);
|
|
|
-
|
|
|
if (pagePoint.X >= rect.Left && pagePoint.X <= rect.Right && pagePoint.Y >= rect.Top && pagePoint.Y <= rect.Bottom)
|
|
|
PopAnnotNoteText(CurrentSelectedAnnot);
|
|
|
|
|
@@ -349,6 +348,7 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
{
|
|
|
if (e != null)
|
|
|
{
|
|
|
+
|
|
|
CurrentSelectedAnnot = null;
|
|
|
var annot = e.AnnotItemsList[0];
|
|
|
if (annot != null)
|
|
@@ -1216,25 +1216,7 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
BtnMyTools_Click(btn);
|
|
|
break;
|
|
|
}
|
|
|
- EraseArgs eraseArgs = new EraseArgs();
|
|
|
- eraseArgs.UIBorderColor = Color.FromArgb(0x1A, 0x00, 0x00, 0x00);
|
|
|
- eraseArgs.UIFillColor = Color.FromArgb(0x1A, 0x00, 0x00, 0x00);
|
|
|
- eraseArgs.Thickness = 10;
|
|
|
- DefaultAnnotProperty annotProperty = SettingHelper.GetAnnotDefaultProperty(AnnotArgsType.AnnotErase);
|
|
|
- if (annotProperty != null)
|
|
|
- {
|
|
|
- eraseArgs.Thickness = annotProperty.Thickness;
|
|
|
- }
|
|
|
-
|
|
|
- PDFViewer.ClearSelectAnnots(false);
|
|
|
- PDFViewer.SetMouseMode(MouseModes.AnnotCreate);
|
|
|
- PDFViewer.SetToolParam(eraseArgs);
|
|
|
-
|
|
|
- List<AnnotHandlerEventArgs> eraseArgsList = new List<AnnotHandlerEventArgs>();
|
|
|
- if (eraseArgs != null)
|
|
|
- eraseArgsList.Add(eraseArgs);
|
|
|
-
|
|
|
- AddToPropertyPanel("FreehandAnnotProperty", "Freehand", eraseArgsList);
|
|
|
+ CreateEraseArgs();
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
@@ -1255,6 +1237,30 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ private void CreateEraseArgs()
|
|
|
+ {
|
|
|
+ EraseArgs eraseArgs = new EraseArgs();
|
|
|
+ eraseArgs.UIBorderColor = Color.FromArgb(0x1A, 0x00, 0x00, 0x00);
|
|
|
+ eraseArgs.UIFillColor = Color.FromArgb(0x1A, 0x00, 0x00, 0x00);
|
|
|
+ eraseArgs.Thickness = 10;
|
|
|
+ DefaultAnnotProperty annotProperty = SettingHelper.GetAnnotDefaultProperty(AnnotArgsType.AnnotErase);
|
|
|
+ if (annotProperty != null)
|
|
|
+ {
|
|
|
+ eraseArgs.Thickness = annotProperty.Thickness;
|
|
|
+ }
|
|
|
+
|
|
|
+ PDFViewer.ClearSelectAnnots(false);
|
|
|
+ PDFViewer.SetMouseMode(MouseModes.AnnotCreate);
|
|
|
+ PDFViewer.SetToolParam(eraseArgs);
|
|
|
+
|
|
|
+ List<AnnotHandlerEventArgs> eraseArgsList = new List<AnnotHandlerEventArgs>();
|
|
|
+ if (eraseArgs != null)
|
|
|
+ eraseArgsList.Add(eraseArgs);
|
|
|
+
|
|
|
+ AddToPropertyPanel("FreehandAnnotProperty", "Freehand", eraseArgsList);
|
|
|
+ }
|
|
|
+
|
|
|
#endregion BindingEvent事件
|
|
|
}
|
|
|
}
|