|
@@ -562,6 +562,8 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ //框选注释
|
|
|
+ PropertyPanel.annotlists = e.AnnotItemsList;
|
|
|
bool isDifferentAnnotTyle = AnnotTransfer.IsDifferentTypeAnnots(e.AnnotItemsList);
|
|
|
|
|
|
if (isDifferentAnnotTyle)
|
|
@@ -571,23 +573,6 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- //else
|
|
|
- //{
|
|
|
- //if (StrAnnotToolChecked == "Link")
|
|
|
- //{
|
|
|
- // if (PDFViewer.MouseMode != MouseModes.AnnotCreate)
|
|
|
- // {
|
|
|
- // if (PDFViewer.MouseMode == MouseModes.PanTool && propertyPanel.IsAddLink == false && propertyPanel.IsLocationLink == false)
|
|
|
- // {
|
|
|
- // viewContentViewModel.SelectedPrpoertyPanel("PropertyPanelContent", null);
|
|
|
- // }
|
|
|
- // }
|
|
|
- //}
|
|
|
- //if (string.IsNullOrWhiteSpace(StrAnnotToolChecked))
|
|
|
- //{
|
|
|
- // viewContentViewModel.SelectedPrpoertyPanel("PropertyPanelContent", null);
|
|
|
- //}
|
|
|
- //}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -1009,9 +994,8 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
switch (editEvent.EditAction)
|
|
|
{
|
|
|
case ActionType.Add:
|
|
|
- if (annot.EventType == AnnotArgsType.AnnotSquare || annot.EventType == AnnotArgsType.AnnotCircle ||
|
|
|
- annot.EventType == AnnotArgsType.AnnotLine || annot.EventType == AnnotArgsType.AnnotStamp ||
|
|
|
- annot.EventType == AnnotArgsType.AnnotFreeText || annot.EventType == AnnotArgsType.AnnotSticky/*|| annot.EventType == AnnotArgsType.AnnotFreehand*/)
|
|
|
+ //多选注释
|
|
|
+ if (PropertyPanel.IsMultiSelected)
|
|
|
{
|
|
|
if (selectAnnotDicts.ContainsKey(editEvent.PageIndex) == false)
|
|
|
{
|
|
@@ -1024,10 +1008,25 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
}
|
|
|
isMultiple = true;
|
|
|
}
|
|
|
-
|
|
|
- //if (viewContentViewModel.OpenBOTA == true && bOTAContent.TabItemAnnotation.IsSelected)
|
|
|
- //{
|
|
|
- // AnnotationContentViewModel viewModel = GetAnnotationContentViewModel(bOTAContentViewModel, out AnnotationContent annotation);
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (annot.EventType == AnnotArgsType.AnnotSquare || annot.EventType == AnnotArgsType.AnnotCircle ||
|
|
|
+ annot.EventType == AnnotArgsType.AnnotLine || annot.EventType == AnnotArgsType.AnnotStamp ||
|
|
|
+ annot.EventType == AnnotArgsType.AnnotSticky/*||
|
|
|
+ annot.EventType == AnnotArgsType.AnnotFreeText || annot.EventType == AnnotArgsType.AnnotFreehand*/)
|
|
|
+ {
|
|
|
+ if (selectAnnotDicts.ContainsKey(editEvent.PageIndex) == false)
|
|
|
+ {
|
|
|
+ selectAnnotDicts.Add(editEvent.PageIndex, new List<int>());
|
|
|
+ selectAnnotDicts[editEvent.PageIndex].Add(editEvent.AnnotIndex);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ selectAnnotDicts[editEvent.PageIndex].Add(editEvent.AnnotIndex);
|
|
|
+ }
|
|
|
+ isMultiple = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if (viewModel != null)
|
|
|
{
|
|
@@ -1035,7 +1034,6 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
int annotindex = editEvent.AnnotIndex;
|
|
|
viewModel.UpdateAddedAnnot(pageindex, annotindex);
|
|
|
}
|
|
|
- //}
|
|
|
|
|
|
//添加书签注释,用于未保存前跟图章手绘注释的区分
|
|
|
if (StrAnnotToolChecked == "Signature")
|
|
@@ -1052,35 +1050,15 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
|
|
|
case ActionType.Modify:
|
|
|
|
|
|
- // if (annot.EventType == AnnotArgsType.AnnotSquare || annot.EventType == AnnotArgsType.AnnotCircle ||
|
|
|
- //annot.EventType == AnnotArgsType.AnnotLine || annot.EventType == AnnotArgsType.AnnotStamp || annot.EventType == AnnotArgsType.AnnotFreeText || annot.EventType == AnnotArgsType.AnnotFreehand)
|
|
|
- // {
|
|
|
- // if (selectAnnotDicts.ContainsKey(editEvent.PageIndex) == false)
|
|
|
- // {
|
|
|
- // selectAnnotDicts.Add(editEvent.PageIndex, new List<int>());
|
|
|
- // selectAnnotDicts[editEvent.PageIndex].Add(editEvent.AnnotIndex);
|
|
|
- // }
|
|
|
- // else
|
|
|
- // {
|
|
|
- // selectAnnotDicts[editEvent.PageIndex].Add(editEvent.AnnotIndex);
|
|
|
- // }
|
|
|
- // isMultiple = true;
|
|
|
- // }
|
|
|
-
|
|
|
if (viewModel != null)
|
|
|
{
|
|
|
int pageindex = editEvent.PageIndex;
|
|
|
int annotindex = editEvent.AnnotIndex;
|
|
|
viewModel.UpdateModifiedAnnot(pageindex, annotindex);
|
|
|
}
|
|
|
- //}
|
|
|
break;
|
|
|
|
|
|
case ActionType.Del:
|
|
|
- //isTabItemAnnotation = IsBOTATabItemShow(out bOTAContentViewModel, out bOTAContent, "TabItemAnnotation");
|
|
|
- //if (viewContentViewModel.OpenBOTA == true && bOTAContent.TabItemAnnotation.IsSelected)
|
|
|
- //{
|
|
|
- // AnnotationContentViewModel viewModel = GetAnnotationContentViewModel(bOTAContentViewModel, out AnnotationContent annotation);
|
|
|
|
|
|
if (viewModel != null)
|
|
|
{
|
|
@@ -1088,7 +1066,6 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
int annotindex = editEvent.AnnotIndex;
|
|
|
viewModel.DeleteModifiedAnnot(pageindex, annotindex);
|
|
|
}
|
|
|
- //}
|
|
|
ExitAnnotationTool();
|
|
|
viewContentViewModel.SelectedPrpoertyPanel("PropertyPanelContent", null);
|
|
|
break;
|
|
@@ -1188,9 +1165,9 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
{
|
|
|
hoverRect = new Rect(
|
|
|
e.PaintRect.Left - 2,
|
|
|
- e.PaintRect.Top + 4,
|
|
|
+ e.PaintRect.Top + 5,
|
|
|
e.PaintRect.Width + 4,
|
|
|
- e.PaintRect.Height + 4);
|
|
|
+ e.PaintRect.Height + 2);
|
|
|
}
|
|
|
|
|
|
Pen hoverPen = new Pen(new SolidColorBrush(Color.FromArgb(0xff, 0x11, 0x8A, 0xff)), 1);
|