|
@@ -219,11 +219,35 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ //注释列表同步选中
|
|
|
+ var list = e.GetPageAnnotsIndex();
|
|
|
+ bool isTabItemAnnotation = IsBOTATabItemShow(out BOTAContentViewModel bOTAContentViewModel, out BOTAContent bOTAContent, "TabItemAnnotation");
|
|
|
+
|
|
|
+ if (viewContentViewModel.OpenBOTA == true && isTabItemAnnotation == true && bOTAContent.TabItemAnnotation.IsSelected == true && list != null && list.Count > 0)
|
|
|
+ {
|
|
|
+ if (list.Keys.Count == 0)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var pageindex = new List<int>(list.Keys);
|
|
|
+ List<int> annotes = new List<int>();
|
|
|
+ list.TryGetValue(pageindex[0], out annotes);
|
|
|
+ int annoteindex = annotes[0];
|
|
|
+ AnnotationContentViewModel viewModel = GetAnnotationContentViewModel(bOTAContentViewModel, out AnnotationContent annotation);
|
|
|
+
|
|
|
+ if (viewModel != null)
|
|
|
+ {
|
|
|
+ viewModel.ScrollToAnnot(pageindex[0], annoteindex, annotation.AnnotationList);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+
|
|
|
viewContentViewModel.SelectedPrpoertyPanel("PropertyPanelContent", null);
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private bool isShapAnnot(AnnotHandlerEventArgs annot)
|
|
@@ -348,10 +372,10 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if(e.AnnotEventArgsList.Count == 1)
|
|
|
+ if (e.AnnotEventArgsList.Count == 1)
|
|
|
{
|
|
|
var selectedAnnot = e.AnnotEventArgsList[0];
|
|
|
- switch(selectedAnnot.EventType)
|
|
|
+ switch (selectedAnnot.EventType)
|
|
|
{
|
|
|
case AnnotArgsType.AnnotHighlight:
|
|
|
case AnnotArgsType.AnnotUnderline:
|
|
@@ -384,9 +408,9 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
else
|
|
|
{
|
|
|
bool isHigh = true;//是否为高亮
|
|
|
- foreach(var item in e.AnnotEventArgsList)
|
|
|
+ foreach (var item in e.AnnotEventArgsList)
|
|
|
{
|
|
|
- if(isHightAnnot(item) == false)
|
|
|
+ if (isHightAnnot(item) == false)
|
|
|
{
|
|
|
isHigh = false;
|
|
|
break;
|
|
@@ -395,7 +419,7 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
|
|
|
e.PopupMenu = SelectMultiAnnotMenu(sender, isHigh);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
if (e.PopupMenu != null)
|
|
|
{
|
|
@@ -544,12 +568,12 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
switch (editEvent.EditAction)
|
|
|
{
|
|
|
case ActionType.Add:
|
|
|
-
|
|
|
+
|
|
|
bool isTabItemAnnotation = IsBOTATabItemShow(out BOTAContentViewModel bOTAContentViewModel, out BOTAContent bOTAContent, "TabItemAnnotation");
|
|
|
|
|
|
if (viewContentViewModel.OpenBOTA == true && isTabItemAnnotation == true)
|
|
|
{
|
|
|
- AnnotationContentViewModel viewModel = GetAnnotationContentViewModel(bOTAContentViewModel);
|
|
|
+ AnnotationContentViewModel viewModel = GetAnnotationContentViewModel(bOTAContentViewModel, out AnnotationContent annotation);
|
|
|
|
|
|
if (viewModel != null)
|
|
|
{
|
|
@@ -564,7 +588,7 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
isTabItemAnnotation = IsBOTATabItemShow(out bOTAContentViewModel, out bOTAContent, "TabItemAnnotation");
|
|
|
if (isTabItemAnnotation)
|
|
|
{
|
|
|
- AnnotationContentViewModel viewModel = GetAnnotationContentViewModel(bOTAContentViewModel);
|
|
|
+ AnnotationContentViewModel viewModel = GetAnnotationContentViewModel(bOTAContentViewModel, out AnnotationContent annotation);
|
|
|
|
|
|
if (viewModel != null)
|
|
|
{
|
|
@@ -579,7 +603,7 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
isTabItemAnnotation = IsBOTATabItemShow(out bOTAContentViewModel, out bOTAContent, "TabItemAnnotation");
|
|
|
if (bOTAContent.TabItemAnnotation.IsSelected)
|
|
|
{
|
|
|
- AnnotationContentViewModel viewModel = GetAnnotationContentViewModel(bOTAContentViewModel);
|
|
|
+ AnnotationContentViewModel viewModel = GetAnnotationContentViewModel(bOTAContentViewModel, out AnnotationContent annotation);
|
|
|
|
|
|
if (viewModel != null)
|
|
|
{
|