|
@@ -716,22 +716,22 @@ namespace PDF_Office.ViewModels.BOTA
|
|
|
DialogParameters value = new DialogParameters();
|
|
|
value.Add(ParameterNames.Annotation, data);
|
|
|
dialogs.ShowDialog(DialogNames.AddAnnotationDialog, value, e =>
|
|
|
- {
|
|
|
- if (e.Result == ButtonResult.OK && e.Parameters != null)
|
|
|
- {
|
|
|
- //PdfViewer.UndoManager.CanSave = true;
|
|
|
- // if (e.Parameters.ContainsKey(ParameterNames.Annotation) && e.Parameters.ContainsKey(ParameterNames.AnnotEvent))
|
|
|
- // {
|
|
|
- // AnnotationHandlerEventArgs annotation = e.Parameters.GetValue<AnnotationHandlerEventArgs>(ParameterNames.Annotation);
|
|
|
-
|
|
|
- // //AnnotAttribEvent annotEvent = e.Parameters.GetValue<AnnotAttribEvent>(ParameterNames.AnnotEvent);
|
|
|
-
|
|
|
- // //annotEvent?.UpdateAttrib(AnnotAttrib.NoteText, annotation.MarkupContent);
|
|
|
- // //annotEvent?.UpdateAnnot();
|
|
|
-
|
|
|
- // }
|
|
|
- }
|
|
|
- });
|
|
|
+ {
|
|
|
+ if (e.Result == ButtonResult.OK && e.Parameters != null)
|
|
|
+ {
|
|
|
+ //PdfViewer.UndoManager.CanSave = true;
|
|
|
+ // if (e.Parameters.ContainsKey(ParameterNames.Annotation) && e.Parameters.ContainsKey(ParameterNames.AnnotEvent))
|
|
|
+ // {
|
|
|
+ // AnnotationHandlerEventArgs annotation = e.Parameters.GetValue<AnnotationHandlerEventArgs>(ParameterNames.Annotation);
|
|
|
+
|
|
|
+ // //AnnotAttribEvent annotEvent = e.Parameters.GetValue<AnnotAttribEvent>(ParameterNames.AnnotEvent);
|
|
|
+
|
|
|
+ // //annotEvent?.UpdateAttrib(AnnotAttrib.NoteText, annotation.MarkupContent);
|
|
|
+ // //annotEvent?.UpdateAnnot();
|
|
|
+
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
//if(data.EventType == AnnotArgsType.AnnotFreeText)
|
|
|
//{
|
|
@@ -804,6 +804,7 @@ namespace PDF_Office.ViewModels.BOTA
|
|
|
if (AnnotationListItems[k].PageIndex == pageIndex && AnnotationListItems[k].AnnotIndex == annotIndex)
|
|
|
{
|
|
|
AnnotationListItems.RemoveAt(k);
|
|
|
+ currentAnnotationArgs.RemoveAt(k);
|
|
|
UpdateAnnotListAfterDelete(pageIndex, annotIndex);
|
|
|
return;
|
|
|
}
|
|
@@ -818,6 +819,7 @@ namespace PDF_Office.ViewModels.BOTA
|
|
|
if (AnnotationListItems[k].PageIndex == pageIndex && AnnotationListItems[k].AnnotIndex == annotIndex)
|
|
|
{
|
|
|
AnnotationListItems.RemoveAt(k);
|
|
|
+ currentAnnotationArgs.RemoveAt(k);
|
|
|
UpdateAnnotListAfterDelete(pageIndex, annotIndex);
|
|
|
return;
|
|
|
}
|
|
@@ -1090,8 +1092,8 @@ namespace PDF_Office.ViewModels.BOTA
|
|
|
{
|
|
|
if (sender is ObservableCollection<AnnotationHandlerEventArgs> obsSender)
|
|
|
{
|
|
|
- currentAnnotationArgs.Clear();
|
|
|
- currentAnnotationArgs.AddRange(obsSender);
|
|
|
+ //currentAnnotationArgs.Clear();
|
|
|
+ //currentAnnotationArgs.AddRange(obsSender);
|
|
|
if (obsSender.Count < 1)
|
|
|
{
|
|
|
IsEmptyPanelVisibility = Visibility.Visible;
|