|
@@ -76,9 +76,6 @@ namespace Compdfkit_Tools.PDFControl
|
|
pdfViewerControl.MouseLeftButtonDownHandler += PDFToolManager_MouseLeftButtonDownHandler;
|
|
pdfViewerControl.MouseLeftButtonDownHandler += PDFToolManager_MouseLeftButtonDownHandler;
|
|
pdfViewerControl.MouseLeftButtonUpHandler -= PdfViewerControl_MouseLeftButtonUpHandler;
|
|
pdfViewerControl.MouseLeftButtonUpHandler -= PdfViewerControl_MouseLeftButtonUpHandler;
|
|
pdfViewerControl.MouseLeftButtonUpHandler += PdfViewerControl_MouseLeftButtonUpHandler;
|
|
pdfViewerControl.MouseLeftButtonUpHandler += PdfViewerControl_MouseLeftButtonUpHandler;
|
|
- //this.pdfViewerControl.AnnotActiveHandler += PDFViewer_AnnotActiveHandler;
|
|
|
|
- //this.pdfViewerControl.AnnotEditHandler -= PdfViewer_AnnotEditHandler;
|
|
|
|
- //this.pdfViewerControl.AnnotEditHandler += PdfViewer_AnnotEditHandler;
|
|
|
|
pdfViewerControl.MouseRightButtonDownHandler -= PDFViewControl_MouseRightButtonDownHandler;
|
|
pdfViewerControl.MouseRightButtonDownHandler -= PDFViewControl_MouseRightButtonDownHandler;
|
|
pdfViewerControl.MouseRightButtonDownHandler += PDFViewControl_MouseRightButtonDownHandler;
|
|
pdfViewerControl.MouseRightButtonDownHandler += PDFViewControl_MouseRightButtonDownHandler;
|
|
}
|
|
}
|
|
@@ -103,45 +100,6 @@ namespace Compdfkit_Tools.PDFControl
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
- //private void PdfViewer_AnnotEditHandler(object sender, List<AnnotEditEvent> e)
|
|
|
|
- //{
|
|
|
|
- // if (e != null && e.Count > 0)
|
|
|
|
- // {
|
|
|
|
- // if (e[0].EditAction == ActionType.Del)
|
|
|
|
- // {
|
|
|
|
- // if (pdfViewerControl.MouseMode == MouseModes.AnnotCreate && pdfViewerControl.ToolManager.CurrentAnnotArgs is EraseArgs)
|
|
|
|
- // {
|
|
|
|
- // return;
|
|
|
|
- // }
|
|
|
|
- // SetAnnotEventData(null);
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
- // if (e[0].EditAction == ActionType.Modify && e[0].EditAnnotArgs != null && e[0].EditAnnotArgs.EventType == AnnotArgsType.AnnotSticky)
|
|
|
|
- // {
|
|
|
|
- // CPDFNoteUI tempUI = annotationPanel as CPDFNoteUI;
|
|
|
|
- // if (tempUI == null || tempUI.annotAttribEvent == null)
|
|
|
|
- // {
|
|
|
|
- // tempUI = tempAnnotationPanel as CPDFNoteUI;
|
|
|
|
- // }
|
|
|
|
- // if (tempUI == null || tempUI.annotAttribEvent == null)
|
|
|
|
- // {
|
|
|
|
- // tempUI = pdfNoteUI;
|
|
|
|
- // }
|
|
|
|
- // if (tempUI != null && tempUI.annotAttribEvent != null)
|
|
|
|
- // {
|
|
|
|
- // AnnotAttribEvent oldEvent = tempUI.annotAttribEvent;
|
|
|
|
- // oldEvent.Attribs[AnnotAttrib.NoteText] = e[0].EditAnnotArgs.Content;
|
|
|
|
- // tempUI.SetPresentAnnotAttrib(oldEvent);
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // if (e[0].EditAction == ActionType.Add && e[0].EditAnnotArgs.EventType == AnnotArgsType.AnnotStamp)
|
|
|
|
- // {
|
|
|
|
- // pdfViewerControl.SetMouseMode(MouseModes.PanTool);
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- //}
|
|
|
|
-
|
|
|
|
public void UnLoadPDFViewHandler()
|
|
public void UnLoadPDFViewHandler()
|
|
{
|
|
{
|
|
if (this.pdfViewerControl != null)
|
|
if (this.pdfViewerControl != null)
|
|
@@ -157,7 +115,7 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
|
|
|
private void AnnotationControl_Unloaded(object sender, RoutedEventArgs e)
|
|
private void AnnotationControl_Unloaded(object sender, RoutedEventArgs e)
|
|
{
|
|
{
|
|
- UnLoadPDFViewHandler();
|
|
|
|
|
|
+ // UnLoadPDFViewHandler();
|
|
}
|
|
}
|
|
|
|
|
|
private UIElement GetAnnotationPanel()
|
|
private UIElement GetAnnotationPanel()
|
|
@@ -980,62 +938,6 @@ namespace Compdfkit_Tools.PDFControl
|
|
pdfViewerControl.SetToolType(ToolType.CreateAnnot);
|
|
pdfViewerControl.SetToolType(ToolType.CreateAnnot);
|
|
pdfViewerControl.SetCreateAnnotType(C_ANNOTATION_TYPE.C_ANNOTATION_INK);
|
|
pdfViewerControl.SetCreateAnnotType(C_ANNOTATION_TYPE.C_ANNOTATION_INK);
|
|
}
|
|
}
|
|
- //if (pdfViewerControl != null)
|
|
|
|
- //{
|
|
|
|
- // CPDFFreehandUI freehandUI = sender as CPDFFreehandUI;
|
|
|
|
- // if (e)
|
|
|
|
- // {
|
|
|
|
- // annotArgs = pdfViewerControl.ToolManager.CurrentAnnotArgs;
|
|
|
|
- // eraseArgs = new EraseArgs();
|
|
|
|
- // eraseArgs.UIBorderColor = Color.FromArgb(0x1A, 0x00, 0x00, 0x00);
|
|
|
|
- // eraseArgs.UIFillColor = Color.FromArgb(0x1A, 0x00, 0x00, 0x00);
|
|
|
|
-
|
|
|
|
- // if (freehandUI != null)
|
|
|
|
- // {
|
|
|
|
- // eraseArgs.Thickness = freehandUI.GetEraseThickness();
|
|
|
|
- // }
|
|
|
|
- // else
|
|
|
|
- // {
|
|
|
|
- // eraseArgs.Thickness = 1;
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
- // disableClean = true;
|
|
|
|
- // pdfViewerControl.PDFToolManager.SetToolType(ToolType.CreateAnnot);
|
|
|
|
- // pdfViewerControl.SetToolParam(eraseArgs);
|
|
|
|
- // disableClean = false;
|
|
|
|
- // EmptyMessage.Visibility = Visibility.Collapsed;
|
|
|
|
- // }
|
|
|
|
- // else
|
|
|
|
- // {
|
|
|
|
- // pdfViewerControl.PDFToolManager.SetToolType(ToolType.CreateAnnot);
|
|
|
|
- // FreehandAnnotArgs freehandAnnotArgs = annotArgs as FreehandAnnotArgs;
|
|
|
|
- // if (freehandAnnotArgs == null)
|
|
|
|
- // {
|
|
|
|
- // freehandAnnotArgs = new FreehandAnnotArgs();
|
|
|
|
-
|
|
|
|
- // freehandAnnotArgs.InkColor = Colors.Red;
|
|
|
|
- // freehandAnnotArgs.Transparency = 1;
|
|
|
|
- // freehandAnnotArgs.LineWidth = 1;
|
|
|
|
- // annotArgs = freehandAnnotArgs;
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
- // if (freehandUI != null)
|
|
|
|
- // {
|
|
|
|
- // freehandUI.PropertyChanged -= CPDFAnnotationControl_PropertyChanged;
|
|
|
|
- // Dictionary<AnnotAttrib, object> attribDict = new Dictionary<AnnotAttrib, object>();
|
|
|
|
- // attribDict[AnnotAttrib.Color] = freehandAnnotArgs.InkColor;
|
|
|
|
- // attribDict[AnnotAttrib.Transparency] = freehandAnnotArgs.Transparency;
|
|
|
|
- // attribDict[AnnotAttrib.Thickness] = freehandAnnotArgs.LineWidth;
|
|
|
|
- // attribDict[AnnotAttrib.NoteText] = freehandAnnotArgs.Content;
|
|
|
|
-
|
|
|
|
- // AnnotAttribEvent annotEvent = AnnotAttribEvent.GetAnnotAttribEvent(freehandAnnotArgs, attribDict);
|
|
|
|
- // freehandUI.SetPresentAnnotAttrib(annotEvent);
|
|
|
|
- // freehandUI.PropertyChanged += CPDFAnnotationControl_PropertyChanged;
|
|
|
|
- // freehandUI.ClearAnnotAttribEvent();
|
|
|
|
- // }
|
|
|
|
- // pdfViewerControl.SetToolParam(freehandAnnotArgs);
|
|
|
|
- // }
|
|
|
|
- //}
|
|
|
|
}
|
|
}
|
|
|
|
|
|
public void CreatTempAnnotationPanel(BaseAnnot baseAnnot)
|
|
public void CreatTempAnnotationPanel(BaseAnnot baseAnnot)
|